Mapping quality in `vg giraffe`
Entering edit mode
3 months ago
Wenhai • 0

I ran vg giraffe to get the GAF file. I have some questions about the 12th column, that is mapping quality(MAPQ). The difference of MAPQ standard between aligners makes me confused.

I found MAPQ is in the range[0, 60] which similar with bwa-mem, but I don not find a good explanation.Through reading some questions in vg github, I only know low MAPQ means reads multimapped and MAPQ 60 means reads aligned very well. And I found the MAPQ of unmapped reads is also 0.

So the MAPQ only reflect whether reads map to multiple locations? How about base mismatch? How can I get the unique mapping?

Could someone kindly provide an explanation? I would greatly appreciate anyone who can assist me with this.

vg • 462 views
Entering edit mode
3 months ago
Xian ▴ 60

You can find a complete definition of how giraffe finds mapq's in the supplement of the paper:

Mapping quality is the phred-scaled probability that the read was mapped incorrectly. So if an alignment gets a mapq of 60, then there is a 1/1,000,000 chance that it is incorrectly mapped. In giraffe, we estimate this by finding multiple locations where the read could map. If a read maps to two places equally well, then there is a 50% chance that the final alignment is correct, so it gets a mapq of 3. If a read maps perfectly to one location and also to a second location with base mismatches, then the second mapping is less likely but still possible so giraffe would return the first mapping with a mapq somewhere between 3 and 60, depending on how good the second mapping looks.

So the mapq does take into account base mismatches (and gaps), but only to see how good the final alignment is relative to other potential alignments. You could have an alignment with a bunch of mismatches that still gets mapq60 because there were no other possible alignments.

You can filter alignments by mapq with vg filter -q

Entering edit mode

Many thanks.


Login before adding your answer.

Traffic: 2520 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6