MethylDackel
MethylDackel copied to clipboard
--OT and --OB suggestions by mbias produce "Invalid bounds string"
I ran MethylDackel mbias
on a WGBS file (mapped with bwameth.py) and got:
>$ MethylDackel mbias -@ 4 -q 5 -r chr7 hg38.fa GSM4505863_md.bam GSM4505863_mbias_chr7
Suggested inclusion options: --OT 2,0,0,115 --OB 0,124,11,0
Now I just copy-pasted this to MethylDackel extract
, but I get a warning Invalid bounds string, 2,0,0,115
:
>$ MethylDackel extract --OT 2,0,0,115 --OB 0,124,11,0 -@ 4 --mergeContext -q 5 -o GSM4505863 hg38.fa GSM4505863_md.bam
Invalid bounds string, 2,0,0,115
Invalid bounds string, 0,124,11,0
I'm guessing this is because the handling of the 0
doesn't work in version 0.5.1, from all I can tell. changing the 0's to 1/150 "fixed" it. The same problem affects -nOT
and -nOB
, which also can't handle the 0, which for those arguments is particularly problematic. There must be some bug in the parser logic somewhere...
That's weird, thanks for reporting this. I'll try to track down this bug.
@DaGaMs Can you try this with version 0.5.2? I haven't changed any of the parsing for this in a number of releases, so I wonder if this is due to having linked against the wrong htslib version in 0.5.1.
I recompiled 0.5.2 with gcc-8.3.0 against htslib-1.11.0. I still get the same error:
MethylDackel extract -@ 2 -q 5 -l hg38_main.bed.gz --cytosine_report --OT 8,124,2,0 --OB 2,120,0,104 -o merged_701503 ref.fa ../Alignments/merged_701503_md.bam
Invalid bounds string, 8,124,2,0
Invalid bounds string, 2,120,0,104
[...]
I just tried with 0.6.0 and I still get Invalid bounds string
with any pattern that contains a 0
@DaGaMs and @dpryan79
So the error comes from errno != 0
somehow errno was not 0 when it first parses the argument. Maybe before the star of the program it should be initialized to 0, however doing some quick research says that is not a very prudent thing to do 😅
Hi, any news about this ?
I just got the same problem. Without 0 it runs fine, but with 0, I got the same Invalid bounds string
error.
The version is 0.6.1, and HTSlib 1.16
Thanks !
Hi, any news about this ? I just got the same problem. Without 0 it runs fine, but with 0, I got the same
Invalid bounds string
error. The version is 0.6.1, and HTSlib 1.16 Thanks !
I just re-initialized the errno variable at the beginning of parameter parsing and compiled it, i think that is safe since it is at the beginning.