BWA optional fields not outputted in the final BAM/SAM
1
1
Entering edit mode
8.6 years ago
mab ▴ 20

In the BWA man page, it is said that BWA should output a certain number of optional fields like X0, X1, XO, etc... However, when I run BWA mem, none of them are produced (some of them would be extremely useful for the project I'm dealing with right now).

Could someone shed lights on this?

Thanks

alignment next-gen • 2.4k views
3
Entering edit mode
8.6 years ago
matted 7.7k

This thread on the bio-bwa mailing list addresses your question. The summary is that bwa mem does not output those tags. Heng Li, the author, states:

Bwa-mem is unable to compute accurate X0 due to algorithmic restrictions. You can derive XM from CIGAR and NM. XT:A:M is not applicable to bwa-mem. XT:A:U and XT:A:R can be derived from mapping quality.

1
Entering edit mode

Thanks for the info. Should be included in the BWA man page...

0
Entering edit mode

I once said on Biostars that my 'go-to phrase for avoiding a question' is "it corrupts the file"; but now it is definitely "due to algorithmic restrictions".

This works in so many more scenarios too. Forgotten birthday presents. Overboiling the water when cooking pasta. Walking into people in public. All sorts.