pjedge / longshot

diploid SNV caller for error-prone reads
MIT License
171 stars 26 forks source link

Wrong depth report in the DP tag #103

Closed wshuai294 closed 1 month ago

wshuai294 commented 2 months ago

Hi,

Thanks for the amazing tool!

I found the depth reported by longshot is much higher than samtools depth reports. In this locus, the depth of reported by samtools is ~8,000x , whereas the depth reported by longshot is 47,254x. I wonder if there is a bug caused by the too-high coverage.

HLA_A   1246    .       T       G       500     dn;dp   DP=47254;AC=78,43941;AM=2150;MC=0;MF=0.000;MB=0.000;AQ=12.59;GM=1;DA=8084;MQ10=1.00;MQ20=1.00;MQ30=1.00;MQ40=1.00;MQ50=1.00;PH=500.00,500.00,500.00,500.00,-0.00,500.00,500.00,500.00,500.00;SC=TCGCGGTCGCTGTTCTAAAGT;  GT:GQ:DP:PS:UG:UQ       1/1:500:47254:.:1/1:500.00

I hope you can help me with this. Thanks.

wshuai294 commented 1 month ago

This is caused by samtools depth -d parameter instead of longshot.

Usage: samtools depth [options] in1.bam [in2.bam [...]]
Options:
   -a                  output all positions (including zero depth)
   -a -a (or -aa)      output absolutely all positions, including unused ref. sequences
   -b <bed>            list of positions or regions
   -f <list>           list of input BAM filenames, one per line [null]
   -l <int>            read length threshold (ignore reads shorter than <int>)
   -d/-m <int>         maximum coverage depth [8000]
   -q <int>            base quality threshold
   -Q <int>            mapping quality threshold
   -r <chr:from-to>    region
      --input-fmt-option OPT[=VAL]
               Specify a single input file format option in the form
               of OPTION or OPTION=VALUE
      --reference FILE
               Reference sequence FASTA FILE [null]