4 Sequence Alignment
Learn how sequence alignments compare DNA, RNA, and protein sequences, how scoring choices shape alignments, and how to assess their biological meaning and limitations.
What an alignment represents
arranges DNA, RNA, or protein sequences so that likely corresponding positions appear in the same columns. It can help reveal conserved regions, substitutions, and insertions or deletions, abbreviated as indels. An alignment is a model of positional correspondence, not proof that every aligned residue shares the same evolutionary history.
: global and local
A compares two sequences. The choice between global and depends on the biological question and on which parts of the sequences are expected to correspond.
spans the full lengths of both sequences. It is useful when they are similar in length and expected to correspond end to end. The classic Needleman–Wunsch method finds an optimal under a chosen scoring scheme.
finds the best-matching subsections and leaves unrelated flanking regions unaligned. It is useful for locating a shared domain or motif within longer sequences. The classic Smith–Waterman method finds an optimal .
For example, a possible alignment is:
The dash marks a gap. Here, the alignment proposes that one sequence has a missing or inserted base relative to the other. Other gap placements may also be plausible, especially in repetitive or weakly conserved regions.
Scoring substitutions and gaps
An aligner scores an alignment to compare possible arrangements. A simple DNA scoring scheme might reward a match and penalize a mismatch. Protein alignments usually use a , such as BLOSUM or PAM, because some amino-acid replacements are more compatible than others. BLOSUM matrices are derived from conserved protein sequence blocks, and the choice of matrix affects which similarities are favored.
Many methods use an , which penalizes opening a gap more than extending one:
Here, is the gap length, is the gap-opening penalty, and is the per-residue extension penalty. This scheme tends to favor one longer gap over several separate short gaps. Changing the or gap penalties can change the preferred alignment, so an alignment is optimal only under its specified scoring model.
A (MSA) aligns three or more sequences in shared columns. It can reveal patterns that are difficult to see in separate pairwise comparisons, including conserved motifs and positions that vary among members of a protein family.
Many MSA programs use an approximate, progressive strategy. They estimate sequence similarities, build a guide tree, align the closest sequences or groups first, and then add more distant ones. This approach makes large problems computationally manageable, but early alignment errors can affect later steps. Different tools or settings can therefore produce different alignments, particularly for highly divergent sequences.
An MSA can be evaluated with a sum-of-pairs score, which adds scores for residue pairs across columns, or summarized with a consensus sequence and conservation measures. These summaries are useful, but a high-scoring MSA is not automatically biologically correct: the scoring model may favor an alignment that does not reflect true positional homology.
Interpreting , , and gaps
is the proportion of compared positions with exactly the same residue. may also count conservative amino-acid replacements, depending on a defined matrix or reporting convention.
Conserved columns contain the same or chemically similar residues across many sequences. They may point to functional or structural constraints, but conservation alone does not identify a residue’s role. Gaps suggest possible indels, but do not by themselves show where or when an evolutionary insertion or deletion occurred. Gap-rich or poorly conserved regions often have less certain positional correspondence.
Assessing evidence and coverage
Interpret an alignment in context, not from its score alone. Check whether it spans the expected region, whether the sequences are comparable in length and type, and whether gaps cluster in plausible variable regions. For an MSA, inspect whether proposed conserved patterns persist across the sequences rather than being driven by a few similar entries.
For local database-search alignments, a high score alone does not establish biological significance. BLAST reports an , estimating how many alignments with a score at least as good would be expected by chance in a search of that size; lower values generally indicate stronger evidence against a chance match. Also inspect alignment length and query coverage, since a strong short match may describe only one region of a longer sequence.
Sequence can support common ancestry, but a single alignment—especially a short or low-complexity match—is not conclusive evidence of homology. Consider statistical evidence, biological context, and independent evidence where available. Aligned positions are hypotheses about biological correspondence that may need validation.