thebench.bio #1 Ecosystem for the Bio-Tech Industry
All Sequence Alignment questions

Question 11 of 20 Intermediate Concept

Why does BLAST use heuristics when dynamic programming can find the optimal alignment?

Short answer

Smith-Waterman dynamic programming guarantees the best-scoring local alignment, but its cost grows with the product of the two sequence lengths, which is slow across a whole database. BLAST first finds short word matches and extends only around them, trading a small loss of sensitivity for large gains in speed.

Why

Dynamic programming fills a matrix with one cell for each pair of positions in the two sequences. Each cell holds the best score of any alignment ending there, computed from its neighbors, so the best overall alignment is guaranteed under the chosen matrix and gap penalties. Needleman-Wunsch does this for global alignment and Smith-Waterman for local alignment.

Pearson's scoring matrix guide describes local alignments as rigorously calculated by Smith-Waterman and heuristically by BLASTP or FASTA. The cost is proportional to the query length times the database length, repeated for every search. BLAST avoids most of that work.

It looks for short word hits that score above a threshold, and extends only promising ones into full alignments. The gapped BLAST paper describes a new criterion for triggering extensions and a gapped heuristic that made the program about three times faster than the original. The price is that a real but weak similarity with no strong seed can be missed.

For most searches the loss is small, but for a critical distant relationship a rigorous search such as SSEARCH, or a profile method, is worth the time.

A strong answer covers

  • Dynamic programming guarantees the optimum for a scoring system
  • Cost scales with the product of sequence lengths
  • BLAST seeds with word hits and extends selectively
  • Heuristics can miss weak similarities with no strong seed
  • Use rigorous or profile searches when sensitivity matters most

Common mistakes

  • Believing BLAST alignments are guaranteed optimal
  • Thinking the optimal alignment is biologically correct regardless of the scoring system
  • Concluding no homolog exists because one BLAST search found none