Database searching with BLAST
Statement
Fast approximate matching against large databases.
Why it matters
sequence-alignment establishes dynamic programming as the exact, guaranteed-optimal method for aligning two sequences, but that guarantee comes at a computational cost — roughly proportional to the product of the two sequences' lengths — that becomes completely impractical once a query must be compared against every one of many millions of sequences in a modern database. BLAST is the standard practical answer: a heuristic that abandons the guarantee of finding the single best possible alignment in exchange for a dramatic, database-scale speed-up, making routine tasks such as identifying an unknown gene, finding homologous sequences across species, or annotating a newly sequenced genome computationally feasible at all.
Nearly every later step in a typical bioinformatics workflow — building a multiple alignment, constructing a phylogenetic-tree-construction, or interpreting a hidden-markov-models-based gene model — routinely begins with a BLAST search used to first identify a relevant, manageable set of candidate homologous sequences out of an otherwise enormous database.
Hypotheses
Proof
Result
Reading. BLAST approximates the exhaustive dynamic-programming search of sequence-alignment by restricting genuinely full alignment computation to only the small number of regions anchored by an exact short-word seed match, then assigns each surviving candidate alignment a rigorously calibrated statistical significance rather than relying on the raw score alone.
Scope. Effective and fast for finding regions of reasonably strong local similarity across large databases; because it depends on at least one exact seed word being present (Hypotheses), it can in principle miss true but short, weak, or highly diverged homologs that happen to contain no such exact match anywhere in their length.
Corollaries & converses
- sequence-alignment's exact dynamic-programming methods are not abandoned by BLAST but are instead applied locally, within Step 3's extension around each seed — BLAST is best understood as making full alignment tractable at database scale by restricting where it is applied, not as a wholesale replacement for it.
- hidden-markov-models-based profile search offers a complementary approach to homology detection, generally more sensitive to weak or highly diverged similarity than a single-sequence BLAST search, at the cost of greater computational expense — a standard follow-up when a BLAST search returns no significant hits but true remote homology is still suspected.
- Converse: a very low E-value for a given HSP, on its own, establishes only that the observed alignment score is highly unlikely to have arisen from chance similarity between unrelated sequences; it does not, by itself, establish that the two sequences share the same specific biological function, which requires additional evidence (Discussion's common misconception).
Fails without
- Drop the seed-existence assumption: a real but highly diverged homology containing no exact-matching short word anywhere in either sequence will simply never be found by the seed-and-extend heuristic, however statistically significant the true alignment actually is — the acknowledged trade-off against slower, exhaustive dynamic-programming alignment (sequence-alignment), which is guaranteed to find it.
- Use a scoring matrix mismatched to the sequences' true evolutionary divergence (e.g. a matrix tuned for close relatives applied to highly diverged sequences): the statistical calibration underlying E-value and bit-score interpretation no longer holds, and reported significance values become an unreliable guide to genuine homology.
Common errors
- Interpreting the E-value as a probability that must lie between \(0\) and \(1\); it is instead an expected count of chance matches, and can in principle exceed \(1\) for weak, statistically unremarkable alignments.
- Assuming BLAST performs an exhaustive, guaranteed-optimal search of the kind sequence-alignment's dynamic programming provides; it is a heuristic (Hypotheses) that can, in principle, miss a true but weak or short homology containing no matching seed word.
- Comparing raw alignment scores directly across two different searches run against databases of different sizes, rather than comparing E-values (which explicitly incorporate database size, Step 5) or bit scores (which are already normalised).
- Treating a statistically significant BLAST hit as automatic proof of shared biological function, rather than as evidence of statistically improbable sequence similarity that still requires further corroboration (Corollaries' Converse).
Discussion
BLAST (Basic Local Alignment Search Tool) was introduced by Stephen Altschul, Warren Gish, Webb Miller, Eugene Myers and David Lipman in 1990, explicitly engineered for the speed needed as sequence databases began growing far too large for exhaustive dynamic-programming search of every entry; a later, gapped version published in 1997 extended the original ungapped seed-and-extend algorithm to permit insertions and deletions within an HSP, considerably closer in flexibility to full Smith-Waterman-style local alignment while retaining the original seed-based speed advantage.
Different BLAST variants (BLASTN for nucleotide-nucleotide, BLASTP for protein-protein, BLASTX for translated-nucleotide-against-protein, and others) apply the identical seed-extend-evaluate framework developed here with different word lengths, scoring schemes, and translation steps suited to the specific sequence types being compared, rather than representing fundamentally different algorithms.
Common misconception: that a "BLAST hit" is synonymous with "homolog." As the Corollaries' converse notes, a significant E-value is strong statistical evidence against chance similarity but is not, by itself, definitive proof of evolutionary relationship or shared function — particularly for hits near the significance threshold, where corroborating evidence (reciprocal best hit, phylogenetic placement via phylogenetic-tree-construction, conserved functional motifs) is standard practice before drawing a firm conclusion.
Worked examples
Reading. The same underlying alignment quality is reported as a fixed bit score regardless of database size, but translates into a different E-value depending on exactly how large a "haystack" the "needle" was found in — searching a larger database makes any given score somewhat less individually surprising, purely as a matter of search-space size.
Scope. This is why bit score, not E-value, is the preferred quantity for comparing hit quality across searches run against different databases or database versions.
Problems
- Explain why doubling the size of the database searched, with the HSP score held fixed, roughly doubles the reported E-value for that HSP, using Step 5.
Solution
Step 5 gives \(E=Kmn\,e^{-\lambda S}\), which is directly proportional to \(n\) (database size) at fixed \(m\), \(S\), \(K\), and \(\lambda\). Doubling \(n\) therefore doubles \(E\) exactly, reflecting that the same alignment score is twice as likely to be matched by chance somewhere within a database twice as large. - Two HSPs from the same search have E-values of \(10^{-50}\) and \(0.2\) respectively. Which, if either, is more likely to represent genuine homology, and why does the second E-value not necessarily mean "no relationship"?
Solution
The HSP with \(E=10^{-50}\) is overwhelming statistical evidence of true homology, since a chance match of that quality is expected essentially never in a database of realistic size. \(E=0.2\) means roughly \(0.2\) such alignments are expected purely by chance in a database this size — not negligible, but also not necessarily meaningless; some genuine, especially short or weakly conserved, homologs do score in this marginal range, so an E-value around \(0.2\) is inconclusive on its own and would need corroborating evidence (Corollaries' Converse), not automatic dismissal. - A search using word length \(W=11\) (typical nucleotide default) fails to detect a true but highly diverged homology, while lowering \(W\) to \(7\) detects it successfully. Explain this outcome using the Hypotheses and Result's Scope.
Solution
Detection depends on the query and the true homolog sharing at least one exactly matching word of the chosen length (Hypotheses). A highly diverged homolog may have accumulated enough substitutions that no \(11\)-letter exact match remains anywhere between the two sequences, causing BLAST to miss the seed entirely (Result, Scope, "can in principle miss...diverged homologs"). A shorter word length of \(7\) is more likely to find at least one exactly matching short stretch by chance, at the cost of also generating many more spurious seed hits to filter through during Steps 2–4 — the standard sensitivity/speed trade-off in choosing \(W\).