biod / sambamba

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

Discrepancy between samtools depth and Sambamba region #432

Closed wynstep closed 3 years ago

wynstep commented 4 years ago

Dear all, I am finding a big discrepancy in the calculation of BAM depth for a whole chromosome (chr4 in this example).

If I run the samtools command: samtools depth -a -r "chr4:0-191154275" 111056.bam | awk '{sum+=$3} END { print "Average = ",sum/191154275 I obtain the result: Average = 24.5936

BUT if I run the command with Sambamba: sambamba depth region -L "chr4:1-191154276" -t 10 -F '' -c 0 111056.bam I obtain: chr4 0 191154276 49213637 2.32988 111056

Am I doing something wrong? Could you please help me?

Sambamba version: 0.7.1 Unfortunately I cannot attach the file because it's too big, but I can do tests for you very rapidly.

pjotrp commented 4 years ago

Have a look at the raw data and tell us what you see.

pjotrp commented 3 years ago

No activity