Entering edit mode
6.7 years ago
arunsub
•
0
Hey everyone,
I recently started using BWA-MEM for aligning reads to the human genome.
Can anyone tell me why BWA-MEM does not report the true score of the alignment (corresponding to the MD tag) in the AS tag?
Thanks. Any inputs appreciated.
Thanks Istvan, my question was more about the value in the AS tag.
test3 0 chr20 47606481 60 100M * 0 0 AAAAAAAAAAATCAGTTTTCCACTGAGGAATGTCCATGATGAAGCAGCAACACTACACCTGGCCCTCATTCCCTTTTTTCCTTAAGTACCTTTCACTGAA 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 NM:i:2 MD:Z:29T68T1 AS:i:93 XS:i:0
Computing score from MD we get 90, but the value reported is 93. I know that BWA-MEM keeps track of true score, but any reason why it is not reported as part of AS tag?
I vaguely recall reading a statement either in the (BWA manual or the SAM spec) though I am unable to find it now, how the alignment score may not match the MD tag or CIGAR strings. It struck me as odd, back then but has to do with the way things work. CIGAR and MD can be determined faster than an alignment score. And that is one reason why the AS is not required to be present by default.
I would trust the score in the AS as being the correct one rather than the one computed from MD tags.
In this 2013 thread Heng Li explain why AS can be different than score computed from MD or CIGAR. It might explain your observation.