problems on the CNV detection by cn.mops using multiply WGS data
1
0
Entering edit mode
flzh628 • 0
@flzh628-10881
Last seen 7.7 years ago

Hi, I'm using the cn.mops package to detect CNV based on the 50X WGS data of PE150. When I use 44 samples data, it goes wrong as follows:

"Error in r@normalizedData[, sampleIdx, drop = FALSE] :
  subscript out of bounds
Calls: segplot -> segplot
Execution halted

And my script is as follows:

#! /public/home/bin
library(cn.mops)
BAMFiles44 <- list.files(path="/path/to/bam/files",pattern=".bam$")
CountsreadsAllx44 <- getReadCountsFromBAM(BAMFiles44,refSeqName=c(paste0("Chr",1:10)),mode="paired",WL=100,parallel=10)
(CountsreadsAllx44)
data(cn.mops)
ls()
head(XRanges[,2:5])
resCNMOPSAllx44 <- cn.mops(XRanges,parallel=10)
resCNMOPSAllx44 <- calcIntegerCopyNumbers(resCNMOPSAllx44)
head(X[,2:5])
resCNMOPSXAllx44 <- cn.mops(X,parallel=10)
resCNMOPSXAllx44 <- calcIntegerCopyNumbers(resCNMOPSXAllx44)
all(individualCall(resCNMOPSXAllx44)==individualCall(resCNMOPSAllx44))
(resCNMOPSAllx44)
cnvs(resCNMOPSAllx44)[1:5]
cnvr(resCNMOPSAllx44)[1,1:5]
(CNVRanges[15,1:5])
ranges(cnvr(resCNMOPSAllx44))[1:2]
ranges(cnvr(resCNMOPSAllx44)) %over% ranges(CNVRanges)
segplot(resCNMOPSAllx44,sampleIdx=1)
segplot(resCNMOPSAllx44,sampleIdx=2)
segplot(resCNMOPSAllx44,sampleIdx=3)
segplot(resCNMOPSAllx44,sampleIdx=4)

......

segplot(resCNMOPSAllx44,sampleIdx=44)
plot(resCNMOPSAllx44,which=1)
data(cn.mops)
resultAllx44 <- calcIntegerCopyNumbers(cn.mops(CountsreadsAllx44))
segmAllx44 <- as.data.frame(segmentation(resultAllx44))
CNVsAllx44 <- as.data.frame(cnvs(resultAllx44))
CNVRegionsAllx44 <- as.data.frame(cnvr(resultAllx44))
write.csv(segmAllx44,file="segmentationAllx44.csv")
write.csv(CNVsAllx44,file="cnvsAllx44.csv")
write.csv(CNVRegionsAllx44,file="cnvrAllx44.csv")
dev.off()

I want to know if there are any wrongs in my script and how to solve this problem. I'm looking forward to your reply. Thanks very much!

 

Best wishes,

Fengli Zhao

cn.mops • 976 views
ADD COMMENT
0
Entering edit mode
@gunter-klambauer-5426
Last seen 3.9 years ago
Austria

Hello Fengli Zhao,

Thanks for reporting this issue to me. Unfortunately, the segplot function is a bit buggy - it is derived from the DNAcopy package. Could you please export your workspace (readcounts, cnMOPS result object) and email it to me? I would also need the result of "sessionInfo()"!

Regards,

Günter

ADD COMMENT

Login before adding your answer.

Traffic: 448 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