Cn.mops error: Error in if (sum(rds.counts) == 0) { : missing value where TRUE/FALSE needed
5
0
Entering edit mode
daijieqiong ▴ 10
@daijieqiong-14784
Last seen 6.9 years ago
Dear Dr Klambauer, I met a problem when using cn.mops for CNV analysis for my WGS samples. It worked fine when I did the test run with two samples. However, when I run more than 10 samples, the error message comes out at the first bam file reading procedure. > library(cn.mops) > bamfiles <- list.files(path="/data/daij/project/CNV/bam",pattern=".bam$",full.names=T) > bamfiles > bamDataRanges <- getReadCountsFromBAM(bamfiles,refSeqName=c("chr1","chr2", "chr3", "chr4", "chr5","chr6", "chr7", "chr8","chr9","chr10", "chr11", "chr12","chr13","chr14", "chr15", "chr16","chr17","chr18", "chr19","chr20","chr21","chr22"),WL=50000 Error in if (sum(rds.counts) == 0) { : missing value where TRUE/FALSE needed Calls: getReadCountsFromBAM -> <anonymous> I Have tried different WL from the default to 1000, 5000, 10000 to 50000, but got the same error message all the time. Could you please kindly help to figure out what is going on? Thanks very much! Jieqiong Dai
software error cn.mops • 2.9k views
ADD COMMENT
1
Entering edit mode
@gunter-klambauer-5426
Last seen 3.8 years ago
Austria

Hello Jieqiong Dai,

It is really hard to diagnose the problems but it seems that the "getReadCountsFromBAM" function does not find any reads in your BAM files. Have you tried setting the parameter "mode" to "paired" or "unpaired"? Have you upgraded cn.mops and R to the latest version? Do your BAM files contain reads at all or could they have problems?
You can also use a different procedure to calculate read counts: e.g. use samtools to count and then read the resulting files with R's "read.table". In this case you skip "getReadCountsFromBAM" and go directly to "cn.mops".

Please let me know what the results of these tests are!

Regards,

Günter

ADD COMMENT
1
Entering edit mode
daijieqiong ▴ 10
@daijieqiong-14784
Last seen 6.9 years ago

Hi Günter,

Thanks very much for you reply.

yes, I found one of my bam files has some issue to cause the problem after checking them one by one.

Problem has solved after removing that sample.

 

Jieqiong

 

ADD COMMENT
0
Entering edit mode
daijieqiong ▴ 10
@daijieqiong-14784
Last seen 6.9 years ago

Hi Günter,

I did some test with the bam file that can not be processed by getReadCountsFromBAM. I found that when I run it with each chromosome one by one, it is fine. But when I run it with all the chromosome at the same time, it shows "Error in if (sum(rds.counts) == 0) { : missing value where TRUE/FALSE needed Calls: getReadCountsFromBAM -> <anonymous>"

Do you have any idea about that?

Thanks,

Jieqiong

ADD COMMENT
0
Entering edit mode
@gunter-klambauer-5426
Last seen 3.8 years ago
Austria

Can you please run "traceback()" directly after the error occurs and post it here?

ADD COMMENT
0
Entering edit mode
daijieqiong ▴ 10
@daijieqiong-14784
Last seen 6.9 years ago

 

Hi Günter,

it shows that:

> bamDataRanges1 <- getReadCountsFromBAM("/data/daij/project/CNV/new/SCD151-3.bam",refSeqName=c("chr1","chr2", "chr3", "chr4", "chr5","chr6", "chr7", "chr8","chr9","chr1Identified the following reference sequences:  HPV16_Ref,chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY,chrM

Using chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22 as reference.

 

 PLEASE BE PATIENT... this might take a while. Consider using the parallel version of this function

 

Using parallel version of this function.

Error in checkForRemoteErrors(val) : 

  one node produced an error: missing value where TRUE/FALSE needed

 

> traceback()

7: stop("one node produced an error: ", firstmsg, domain = NA)

6: checkForRemoteErrors(val)

5: staticClusterApply(cl, fun, length(x), argfun)

4: clusterApply(cl, x = splitList(X, length(cl)), fun = lapply, 

       fun, ...)

3: do.call(c, clusterApply(cl, x = splitList(X, length(cl)), fun = lapply, 

       fun, ...), quote = TRUE)

2: parallel::parLapply(cl, BAMFiles, exomeCopy::countBamInGRanges, 

       granges = GR, ...)

1: getReadCountsFromBAM("/data/daij/project/CNV/new/SCD151-3.bam", 

       refSeqName = c("chr1", "chr2", "chr3", "chr4", "chr5", "chr6", 

           "chr7", "chr8", "chr9", "chr10", "chr11", "chr12", "chr13", 

           "chr14", "chr15", "chr16", "chr17", "chr18", "chr19", 

           "chr20", "chr21", "chr22"), parallel = 36)

>

Thanks very much,

Jieqiong

ADD COMMENT
0
Entering edit mode

Hello,

Did you find a solution for this problem?

Thanks

ADD REPLY

Login before adding your answer.

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