Trimmed EPIC array data analysed by conumee and minfi (CNV.create_anno : how to revise the annotation object?)
2
0
Entering edit mode
3.2 years ago
Amir • 0

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

450k minfi conumee trimming EPIC • 1.4k views
ADD COMMENT
0
Entering edit mode
2.6 years ago

Hey did you figure this out, I am having the same problem. I don't think the NAs come from the probes/anno overlap though, looking at the code you supplied it looks fine- I was doing the same and mine are consistent in numbers. In the next step I only load in the matching probes with: CN_data<-CNV.load(mSetSqFlt[names(anno@probes),])

I then put this into the CNV.fit

The problem I was getting with NAs appears to be specific to the last bin on each chromosome, with the left over bins not having probes that bind there, therefore getting an NA (?). I think it is something in the CNV.segment default settings and how it splits the bins.

ADD COMMENT
0
Entering edit mode
2.6 years ago

Assuming you have called your CNV.fit object "x" then you can run the following three pieces of code before you call CNV.genomeplot

x@bin$ratio[which(is.na(x@bin$ratio))]<-"0"

x@bin$ratio<-as.numeric(x@bin$ratio)

x@bin$shift<-as.numeric(x@bin$shift)

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

ADD COMMENT

Login before adding your answer.

Traffic: 1533 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6