Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--OT and --OB suggestions by mbias produce "Invalid bounds string" #112

Open
DaGaMs opened this issue Feb 18, 2021 · 7 comments
Open

--OT and --OB suggestions by mbias produce "Invalid bounds string" #112

DaGaMs opened this issue Feb 18, 2021 · 7 comments

Comments

@DaGaMs
Copy link

DaGaMs commented Feb 18, 2021

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...

@dpryan79
Copy link
Owner

dpryan79 commented Mar 4, 2021

That's weird, thanks for reporting this. I'll try to track down this bug.

@dpryan79
Copy link
Owner

dpryan79 commented Mar 5, 2021

@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.

@DaGaMs
Copy link
Author

DaGaMs commented Mar 9, 2021

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
[...]

@DaGaMs
Copy link
Author

DaGaMs commented Aug 20, 2021

I just tried with 0.6.0 and I still get Invalid bounds string with any pattern that contains a 0

@jganbat-fn
Copy link

jganbat-fn commented Oct 11, 2022

@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 😅

@voudiou
Copy link

voudiou commented Feb 9, 2023

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 !

@jganbat-fn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants