This is a test version of Biostars. For the public version, visit https://www.biostars.org.
mpileup mapping quality

Hello,

When using samtools mpileup with -s option, I get a 7th column with mapping quality. I realise the mapping quality in SAM format is calculated for a given read. I wonder what does a mapping quality mean for a single base position as it is the case in mpileup? Below is an example:

NW_008793873.1  12      A       1       .       @       H
NW_008793873.1  13      G       2       .^S.    AB      HS
NW_008793873.1  14      A       2       ..      @B      HS
NW_008793873.1  15      C       2       ..      @B      HS
NW_008793873.1  16      g       2       ..      BC      HS
NW_008793873.1  17      a       2       ..      A@      HS

How can I interpret and use the mapping quality field for filtering bases?

Thank you!

samtools mapq

1 answer

These are Sanger-encoded quality scores. I cannot confirm if the given score is the max MAPQ over the position, the average, the median, or the min (or something else).

Sanger encoding goes from characters 33 to 126 on the ASCII scale, covering the MAPQ range 0 to 93, as per Table 1 from: The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants.

You can look up your ASCII codes here: https://pt.wikipedia.org/wiki/ASCII

Kevin

Log in to answer this question.