# Why is bwa-mem the standard algorithm when using bwa?

The industry standard for aligning short reads seems to be bwa-mem. However, in my tests I have seen that using bwa backtrack (bwa-aln + bwa-sampe + bwa-samse) performs better. It is slightly slower, but gives significantly better results in terms of both sensitivity and specificity. I have tested it using the genome in a bottle data and public samples (NA12878 and NA12877 among others) and found that backtrack consistently outperformed bwa-mem.

So why is bwa-mem the standard? Am I wrong and other tests have shown the opposite? I don't really see how since I tested using the most common datasets and validation data. Is it that the slight increase in efficiency outweighs the decrease in performance?

The only other explanation I can see is that bwa backtrack is designed specifically for Illumina reads and all my tests have been on Illumina data. Is it just that bwa-mem is "sequencer agnostic"? So that we can use the same algorithm irrespective of what sequencing platform is used? In that case, it makes sense to use backtrack for if we only deal with Illumina data and mem if we can have different sequencers. But, if so, seeing as Illumina is so widespread, why isn't backtrack used more often on Illumina data? I feel I must be missing something.

• Heng Li would be the best person to respond to this.... Also it might be worth citing existing benchmarks or giving details of those which you have run. – Matt Bashton Jun 3 '17 at 14:03
• There is always the bwa mem paper too arxiv.org/pdf/1303.3997.pdf – Matt Bashton Jun 3 '17 at 14:06
• @MatthewBashton yes, I know. Unfortunately, I don't have them in a form that's easy to show and I ran them more than a year ago now so they might not even be relevant anymore. I am hoping that others have seen similar issues and know why one would be preferred over the other. Or that a review article has been published comparing them and my pubmed-fu just failed me. If not, I guess I'll rerun them myself, look into it more deeply and post a new question. – terdon Jun 3 '17 at 14:06
• What's your read length? bio-bwa.sourceforge.net recommends mem as best for >70 bp. It would be interesting to see a reproducible benchmark if you've found otherwise – blmoore Jun 3 '17 at 17:54
• Hi @terdon; our sequencing core team has looked at BWA-MEM vs backtrack for several data sets and have consistently found that MEM is both faster and more accurate than backtrack. We've also found that if you have significant quality drop-offs at the tail backtrack's performance suffers heavily... and that's another advantage of MEM: you don't need quality trimming, where backtrack needs reads to be mapped in full-length, which we have observed independently of, and in addition to Heng Li (see this thread). – Wyatt McDonnell Jun 3 '17 at 18:30

bwa mem is newer, faster, and [should be] more accurate, particularly for longer reads.
From the bwa man page (presumably in Heng Li's own words):