Question: Error in if (all(x <= minReadCount) & lambda <= minReadCount) { : missing value where TRUE/FALSE needed
0
gravatar for s1812756
5 months ago by
s18127560
s18127560 wrote:

Dear Dr Klambauer,

I met an error when using singlecn.mops. At the modelling part, it runs well at the beginning, but when operating on NW_020228985.1, an error occurred as below, but it runs well when I try it using the same reference genome. Will it matter if the reference genome is not in the same directory?

......
Reference sequence:  NW_020228924.1
Reference sequence:  NW_020228957.1
Reference sequence:  NW_020228985.1
Error in if (all(x <= minReadCount) & lambda <= minReadCount) { : 
  missing value where TRUE/FALSE needed
Calls: singlecn.mops -> lapply -> FUN -> .singlecn.mops
Execution halted

Thank you Mengyuan Li

cn.mops error cnmops • 93 views
ADD COMMENTlink modified 5 months ago by Martin Morgan ♦♦ 24k • written 5 months ago by s18127560

You have NAs in x probably.

ADD REPLYlink written 4 months ago by asafpr0

Thank you. And, I finally found that problem. The solution is to use "samtools view name.bam | awk '{print $3}' | uniq -c" to get the read count from the BAM file. And use the chromosome names in the second line as refSeqNames parameter

ADD REPLYlink written 4 months ago by s18127560

For what it's worth sequence names are available from within R using Rsamtools quickly and easily, for example, after running example(countBam) to get a path to a bam file fl

> seqnames(seqinfo(BamFile(fl)))
[1] "seq1" "seq2"
> idxstatsBam(fl)$seqnames
[1] seq1 seq2
Levels: seq1 seq2
> seqnames(seqinfo(BamFile(fl)))
[1] "seq1" "seq2"
ADD REPLYlink written 4 months ago by Martin Morgan ♦♦ 24k
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 16.09
Traffic: 325 users visited in the last hour