Question: .bam mpileup mapping quality
gravatar for saar.armon
12 months ago by
saar.armon0 wrote:

Hey everyone, and before anything else, thanks for the help!

I started working on a new project with low coverage dna seq. The project use .bam files and mpileup using samtools. After a lot of readings, i found out that the data uses sanger FASTQ mapping quality. Notice: i work on readings with no ref bases, if it changes anything.

I am trying to understand if there will allways be a reading map quality after the sign of a new read, which is to say: will it allways be in the format of '^XB' where X stands for the read quality and B stands for the base in the read?

Thanks again for the help, and if there is an older post about it, i will be happy if you can give me a link.

For example, my pileups look like that:

Chr_name pos ref 3 GG^]G etc...

ADD COMMENTlink modified 12 months ago by jkbonfield400 • written 12 months ago by saar.armon0

Hello saar.armon and welcome to biostars,

could you please explain how the mpileup was created? There should be 6 columns and not just 5 (see here and here).

The qualities given in a mpileup are not mapping qualities (saying how good the entire read maps over the whole read length) instead they are base qualities (estimated probability that the base that was called at this position in the given read is not wrong).

fin swimmer

ADD REPLYlink written 12 months ago by finswimmer13k

The bit after the ^ in the sequence column is the mapping quality. You're referring to the next column which contains base qualities.

Note that that the mapping quality may have been modified by the BAQ algorithm (see mpileup -B option).

ADD REPLYlink written 12 months ago by jkbonfield400
gravatar for jkbonfield
12 months ago by
jkbonfield400 wrote:

The answer to this is both yes and no depending on interpretation of the question.

The mapping quality is only shown for the first base in the alignment, and if that base has been filtered out (e.g. due to use of the -Q option) then the corresponding ^x part is also filtered out and it will not be shown on whichever base first appears. That said, if you do see a ^ symbol then it will also always be followed by the mapping quality.

This isn't very helpful sadly. If you absolutely need to see all mapping qualities then you'll need to use -Q 0 and potentially do your own base quality filtering later.

ADD COMMENTlink modified 12 months ago • written 12 months ago by jkbonfield400
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1243 users visited in the last hour