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
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
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
Can you please run "traceback()" directly after the error occurs and post it here?
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
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Hello,
Did you find a solution for this problem?
Thanks