This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting descriptive metrics from variant reads in BAM

Hello all!

I would like to extract the following descriptive metrics from BAM:

  • mean base quality
  • mapping quality
  • mean position in read for variant reads

I would like to go through a VCF and find those metrics for variant-supporting reads directly from BAM. I can do it using pysam, but I was wondering if there is an out-of-the-box solution that is ready and perhaps computationally more efficient. Any help is welcome!

Thanks in advance!

P.S. I also know that VarDict Java does it for candidate locations, but sometimes I need it for locations not recognized by VarDict's algorithm. But in general, such an output (TSV) would be perfect.

snp bam

1 answer

Thanks for the advice! Many of these are actually very useful, but I still wonder - is there a way to get mean BQ, MQ and position, and not the results of the rank sum test?

Log in to answer this question.