Hello,
I have received an EPIC array data where some samples have QC issue and ~20% of probes are failed. So I have done harsh trimming and kept around 600k probes in the dataset. However, I have an issue which originated at the annotation creation step below.
data("exclude_regions")
epic_dt$CNV_annotation <- CNV.create_anno(array_type = "EPIC", chrXY = TRUE, exclude_regions = exclude_regions)
epic_dt$CNV_annotation@probes <- subsetByOverlaps(epic_dt$CNV_annotation@probes, granges(epic_dt$GenomicMethylSet_Illumina))
I can not remove the probes/bins that I have removed from the whole dataset in the annotation object. Therefore, I will have quite a few NAs down the road. Do you have any idea how we can revise the annotation object according the remaining probes in the dataset. Thanks for your support.
This is the type of error that I get for instance down the road.
CNV.genomeplot(epic_dt$CNV_fit[[i]], chr = "all", chrX = T, chrY = T, centromere = F, detail = F, ylim = c(-2, 2), cols = c("blue", "dodgerblue", "dodgerblue", "lightgray", "red", "red", "red4"), set_par = F)
Error in rgb(x[1], x[2], x[3], maxColorValue = 255) :
color intensity NA, not in 0:255
Best regards, Amir
Assuming you have called your CNV.fit object "x" then you can run the following three pieces of code before you call CNV.genomeplot
This assigns the value of "0" to all of your NA values and means that you can plot them!
I think this is perhaps what CNV.check() used to do, but that function doesn't seem to exist anymore