This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mapping score in pileup file generated from Samtools

Can anyone tell me why there is no mapping score for every base pair read in the pileup file generated by Samtools? According to the Samtools manual, the ASCII character following "^" gives the mapping quality of the read. However, only a few reads are preceded by "^", say "TTTttt^Kttt". In my opinion, here K gives the mapping quality of the read t directly after it.

next-gen

1 answer

The caret ("^") is only present at the start of read segments (i.e., the beginning of a read, unless it's spliced or such). Particularly if you just look at a sub-region, then you'll miss many read starts/ends.

You're correct that the base quality follows the mapping quality.

I see what you mean. Then if I'm going to filter out all the reads with low mapping quality, I should do it during the process of generating pileup file, right? In generating the pileup file, we are able to specify the option and remove the short read sequences with mapping quality less than the predetermined value.

Correct, it's easier to filter beforehand than after the fact.

Log in to answer this question.