biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
563 stars 105 forks source link

Sambamba depth -q error #458

Open MatthieuBeukers opened 3 years ago

MatthieuBeukers commented 3 years ago

With Sambamba v0.7.0, running the following command:

sambamba depth region -L /path/to/bedfile.bed -F 'mapping_quality >= 20 and not duplicate and not failed_quality_control and not secondary_alignment' -o /path/to/bamfile.bam_coverage -t 6 -q 10 -m /path/to/bamfile.bam

results in the following error: sambamba-depth: Cannot open or create file '10' : No such file or directory

My BED file has no header and only three tab separated columns (chromosome names are not preceded by 'chr'). Supplying the parameters in a different order also made no difference. The error does not appear when -q 10 is removed from the command (although Sambamba does output several GB of text in a few minutes). The same command does work with Sambamba v0.6.5.

Note: I could determine from the release notes for v0.7.1 whether this issue was adressed.

pjotrp commented 3 years ago

If you send me an example that does this that I can reproduce locally, I can take a look.

pjotrp commented 3 years ago

I just confirmed

./bin/sambamba-0.8.0 depth region test/issue_204.bam -L 2:166868600-166868813 -T 15 -T 20 -q 10 -T 25 -m > test.txt 
sambamba-depth: Cannot open or create file '10' : No such file or directory