Mapping quality in `vg giraffe`
1
0
Entering edit mode
12 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 • 829 views
ADD COMMENT
3
Entering edit mode
12 months ago
Xian ▴ 80

You can find a complete definition of how giraffe finds mapq's in the supplement of the paper: https://www.science.org/doi/10.1126/science.abg8871#supplementary-materials

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

ADD COMMENT
0
Entering edit mode

Many thanks.

ADD REPLY

Login before adding your answer.

Traffic: 1380 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6