Search
Question: Cn.mops error: Error in if (sum(rds.counts) == 0) { : missing value where TRUE/FALSE needed
0
gravatar for daijieqiong
5 weeks ago by
daijieqiong10
daijieqiong10 wrote:
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
ADD COMMENTlink modified 17 days ago • written 5 weeks ago by daijieqiong10
1
gravatar for Günter Klambauer
5 weeks ago by
Austria
Günter Klambauer490 wrote:

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 COMMENTlink written 5 weeks ago by Günter Klambauer490
1
gravatar for daijieqiong
4 weeks ago by
daijieqiong10
daijieqiong10 wrote:

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 COMMENTlink written 4 weeks ago by daijieqiong10
0
gravatar for daijieqiong
18 days ago by
daijieqiong10
daijieqiong10 wrote:

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 COMMENTlink written 18 days ago by daijieqiong10
0
gravatar for Günter Klambauer
18 days ago by
Austria
Günter Klambauer490 wrote:

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

ADD COMMENTlink written 18 days ago by Günter Klambauer490
0
gravatar for daijieqiong
17 days ago by
daijieqiong10
daijieqiong10 wrote:

 

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 COMMENTlink written 17 days ago by daijieqiong10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 460 users visited in the last hour