Question: cn.MOPS error: Error in if (WL >= sl[i]) { : missing value where TRUE/FALSE needed
1
gravatar for hugo.magalhaes
15 months ago by
hugo.magalhaes10 wrote:

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 • 483 views
ADD COMMENTlink written 15 months ago by hugo.magalhaes10

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 REPLYlink written 13 months ago by simone.maestri0

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 REPLYlink written 5 months ago by blett0
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: 405 users visited in the last hour