hovestadtlab / conumee2

MIT License
3 stars 6 forks source link

Error in creating annotation object for CNV.fit #6

Open maximus3219 opened 5 months ago

maximus3219 commented 5 months ago

I created a MSet combining EPICv2 with EPICv1 and/or 450K. I created different annotation using CNV.create_anno with different array types - "EPICv2"/"EPIC"/"450k"/"overlap" The overlap options seem to be valid for overlap between EPIC and 450K only.

Whenever I run CNV.fit, it just shows this error:

Error in .local(query, ref, anno, ...) : query intensities not given for all probes.

Any step-by-step tutorial how I can get rid of this as an end-user? Thanks.

Best Regards, Max

simonjuleseric2 commented 3 months ago

Hi I'm not involved with the conumee team but I had the same issue so I'm taking the liberty to answer. In my case, I had to select the probes that were in both the controls and the sample to analyse using:

anno@probes<- anno@probes[(anno@probes@ranges@NAMES %in% rownames(c.data@intensity)) & (anno@probes@ranges@NAMES %in% rownames(d.data@intensity))]

with c.data beeing the controls adter cnv.load and d.data being my sample.

I hope it helps

Ind2022 commented 3 months ago

Thanks for your answer related to cnv.fit. I have been trying to run conumee2.0 with EPICv2 without any success. With you suggestion, I am able to create cnv.fit but it fails in cnv.segment. The error is : Error in if (min(weights) <= 0) stop("all weights should be positive") : missing value where TRUE/FALSE needed

My assumption is eventhough we are subsetting the probes in annotation object by matching probes from control set and data but actual bins which are created while constructing the annotation remain same.

So is there any way I change the bin in annotation object for EPICv2 matching both control and data.

Please suggest, Thanks.

simonjuleseric2 commented 3 months ago

Indeed this is my mistake, subsetting the probes is problematic. apparently, an updated version of the conumee vignette should come out very shortly, hopefully it will make it clearer

bjarnedae commented 1 month ago

Hi, thank you for reaching out! We released an update to our package that addresses this issue. Please see the Quick Start Guide for details.

I assume that your query cohort comprises IDATs from multiple array generations (EPIC, EPICv2 and 450k), correct? Please specify anno <- CNV.create_anno(array_type = c("450k", "EPIC", EPICv2"). Subsequently, load the IDATs for every array type separately with the SeSAMepackage and use the resulting CNV.data objects forCNV.fit(). After that, you can combine the objects with CNV.combine(). In case you still want to subset the probe set, you can do so with CNV.create_anno(features = ...).

I hope our tutorial is helpful for your analysis.

Best regards, Bjarne