andersen-lab / ivar

iVar is a computational package that contains functions broadly useful for viral amplicon-based sequencing.
https://andersen-lab.github.io/ivar/html/
GNU General Public License v3.0
115 stars 39 forks source link

Discrepancy between samtools depth and TOTAL_DEPTH in ivar #167

Closed Paururo closed 9 months ago

Paururo commented 1 year ago

Hi! I'm having a challenge understanding how TOTAL_DEPTH is calculated in ivar. When I compare the total depth reported by ivar with what I observe in IGV or count with samtools depth, there is a noticeable discrepancy, and I'm not sure why this is the case. This is confusing me because I'm not able to find any detailed documentation on how ivar calculates TOTAL_DEPTH.

Could you please provide some clarification on how TOTAL_DEPTH is calculated in ivar? Are there specific filters or criteria that ivar applies when calculating total depth? This information would greatly help me to understand the observed discrepancies.

Thank you very much for your help!

Paula

cmaceves commented 1 year ago

Hi @Paururo thanks for reaching out! Would you mind giving me a more specific example, such as a small snippet of a bam file, and the command you're using both for samtools depth and ivar? I suspect it might have something to do with gapped vs ungapped depth, but it's hard to know for sure without the commands.