Open simonjuleseric2 opened 1 month ago
Hi, could you share your code for creating the annotation object and the subsequent pipeline until CNV.bin()
?
Here is the code I'm using:
library(minfi) library(conumee) library(conumee2.0) library(minfiData) library(CopyNeutralIMA) library(readr)
sample_sheet <- read_csv("M:/IPA/IUPA/USERS_PUBLIC/SBU/Recherche/idat_files/EPICV2_2/samplesheet.csv") rgSet<- CNV.import(array_type = "EPICv2", 'M:/IPA/IUPA/USERS_PUBLIC/SBU/Recherche/idat_files/EPICV2_2', sample_sheet=sample_sheet) rgSet.sentrix2name<-'samplex'
RGsetCtrl <- getCopyNeutralRGSet("IlluminaHumanMethylationEPIC") MsetCtrl <- preprocessIllumina(RGsetCtrl) MsetCtrl2<-mapToGenome(MsetCtrl)
data(exclude_regions) data(detail_regions) anno <- CNV.create_anno(array_type = "EPICv2", exclude_regions = exclude_regions, detail_regions = detail_regions)
d.data <- CNV.load(rgSet) c.data <- CNV.load(MsetCtrl) colnames(c.data@intensity)<-colnames(MsetCtrl)
anno@probes<- anno@probes[(anno@probes@ranges@NAMES %in% rownames(c.data@intensity)) & (anno@probes@ranges@NAMES %in% rownames(d.data@intensity))]
y <- CNV.fit(d.data, c.data, anno) y<-CNV.detail(CNV.bin(y))
y <- CNV.segment(y, min.width=3)
CNV.genomeplot(y)
I'm importing an EPICv2 sample locally and using CopyNeutralIMA for controls
Thank you so much for sharing your code! The error occurs due to the manipulation of the probe set within the annotation object. Probes are being removed from the object after the binning step which causes some bins to not contain probes anymore, hence the segmentation fails.
I'm aware that you're doing that to create an overlap between the EPIC and EPICv2 probes. Unfortunately, this is not supported yet. Ideally, you would use control samples that were generated with EPICv2 as well. We are currently working on an update that fixes this issue. It will be posted next week. Best regards!
When calling CNV.segment, get the following error:
"Erreur dans if (min(weights) <= 0) stop("all weights should be positive") : valeur manquante là où TRUE / FALSE est requis"
This was done when trying to analyze EPICv2 samples