How bwa-mem assigns QMAP and proper pair status?
1
1
Entering edit mode
10.0 years ago
amirmhzadeh ▴ 90

Hi,

I have been dealing with this question for a while now and there seems to be no source of information on this topic. Given that:

BWA assigns a Phred-like quality score to each read (MapQ) based on match uniqueness, sequence identity, end-pairing, and insert size that is intended to indicate confidence of read placement accuracy in the genome.

I am wondering if any of you good people of BioStars knows how exactly does bwa-mem assign QMAP and proper pair status?

Cheers,

alignment bwa-mem bwa • 3.1k views
ADD COMMENT
2
Entering edit mode
10.0 years ago
amirmhzadeh ▴ 90

Not receiving any reply here forced me into analyzing the bwa source code. After few hours of playing around with the code and testing it with some dummy fastq files, the following line seemed to be the only line that is relevant to what I was looking for (i.e. determining properness of a pair):

if (!pes[d].failed && dist >= pes[d].low && dist <= pes[d].high) extra_flag |= 2;

This line is located in bwamem_pair.c file of the bwa package. Interestingly, there is no effort made to change the mapQ score after determining whether or not a pair is proper. So I just assumed that properness does not have any effect on mapQ score. I tried to change all the sequences to "proper paired" by getting rid of the "if" condition and raise the properness flag (i.e. 0X2). No changes were observed in the the previously observed mapQ scores. Can it be that properness does not have any effect on mapQ score?

ADD COMMENT

Login before adding your answer.

Traffic: 1877 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