I use cn.mops to run CNV test in one sample without control. My data is Targeted sequencing data. It runs good until the plotting procedure.
I use the command line as follows:
> library(cn.mops) > BAMFiles <- list.files(pattern=".bam$") > segments <- read.table("targetRegions.bed",sep="\t",as.is=TRUE) > gr <- GRanges(segments[,1],IRanges(segments[,2],segments[,3])) > X <- getSegmentReadCountsFromBAM(BAMFiles,GR=gr,mode="paired",) > resCNMOPS <- exomecn.mops(X) > resCNMOPS <- calcIntegerCopyNumbers(resCNMOPS) > plot(resCNMOPS,which=5)
and I got the errors:
dev.new(): using pdf(file="Rplots1.pdf") Error in .local(x, ...) : Selected unknown CNVR for plotting.
It seems that there is some problem with the CNV region.
Then I change the code into:
This time there is no error. BUT there is no output file either.
I checked my resCNMOPS, It's like this:
I think that the results seems fine. So I wonder what's wrong with the plotting. Is it because my target regions are not consecutive?
Thank you for your time.