cn.MOPS error: Error in if (WL >= sl[i]) { : missing value where TRUE/FALSE needed
0
1
Entering edit mode
@hugomagalhaes-15060
Last seen 6.3 years ago

Dear Günter,

When running getReadCountsFromBAM(BAMFiles), I got the following error:

Error in if (WL >= sl[i]) { : missing value where TRUE/FALSE needed

I think I understand why the error comes up, since my reference has over 2000 scaffolds, instead of chromosomes, and you have a line in the function where you do this:

sl <- as.integer(unique(sl))

Since some scaffolds have the same length, when you do this "unique", the length of the object "sl" will be different from the length of "sn".

So, the "for" loop is running from "1:m", with "m" being the length of "sn", and since "m" is bigger then the length of "sl", at some point, "sl[i]" will be inexistent, originating this error.

Is there any way to fix this? Can I just remove the "unique" line? Or will it influence the rest of the function causing downstream errors?

cn.mops • 1.8k views
ADD COMMENT
0
Entering edit mode

I encountered the same error too running cn.mops on a BAM file obtained mapping sequence reads to hg38 reference.

Was removing "unique" a good solution to the problem? 

ADD REPLY
0
Entering edit mode

I just recently used the cn.mops on a BAM file obtained by mapping sequence reads to the bovine reference and got the same error. Is there fix for this that has been discovered? 

ADD REPLY

Login before adding your answer.

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