Skip to main content
VierApparatus
On this page
  1. References

Level 07 · Bioinformatics and Computational Biology

Sequence Alignment

The methods of pairwise sequence alignment in depth, covering the scoring of matches and gaps, the global and local dynamic programming algorithms, the affine gap model that treats a run of gaps as a single event, the choice of a substitution matrix for proteins and nucleotides, and the interpretation of an alignment as a hypothesis about homology, with the checks that prevent a high score from being mistaken for evidence of relatedness.

1 min read · Updated

Listen to this moduleComing soon

Learning objectives

  • Compute the optimal global and local alignment of two short sequences by dynamic programming and explain each step.
  • Choose a substitution matrix and gap penalties for a given level of sequence divergence and justify the choice.

Sequence alignment is the first method of comparative biology. Two sequences are arranged so that their residues line up, gaps are inserted where one sequence has lost or gained material, and the arrangement is scored. The introductory topic gave the concepts. This topic works through the methods: the dynamic programming that finds the best arrangement, the penalties that decide how gaps are priced, the matrices that decide how substitutions are scored and the statistics that tell a strong alignment from one that a random pair of sequences could also produce.

The chapters take the algorithms in the order a practitioner meets them. Needleman and Wunsch (1970) give the global method, which aligns whole sequences, and Smith and Waterman (1981) give the local method, which finds the best shared region. The gap model, the substitution matrices and the significance of a score follow, and the last chapters cover the practical choices and the errors that most often corrupt an alignment.

An alignment is always a model. It assumes that the aligned residues descend from a common ancestral residue, and every parameter encodes an assumption about how sequences change. The topic keeps that assumption in view, so that the reader treats an alignment as a hypothesis to be checked against the biology and not as a fact.

Chapters in this module

  • Alignment as a Model

    Why a sequence alignment is a model of evolutionary history rather than a direct observation, the assumptions built into an alignment about homology, insertion and deletion, and substitution, how a score is a summary of these assumptions and why a reader must consider which assumptions a particular alignment depends on.

  • Dynamic Programming Step by Step

    The dynamic programming method for global alignment worked through in detail, covering the scoring matrix, the recurrence that gives the best score for each cell from its three neighbours, the initialisation of the first row and column, the traceback that recovers the alignment and the time and memory cost of the method as the sequence lengths grow.

  • Local Alignment and the Zero Floor

    The Smith-Waterman method for local alignment, covering the zero floor that lets an alignment start and end anywhere, the search for the highest-scoring cell in the matrix, the traceback that stops when the score reaches zero, the difference between a local and a global alignment for sequences with a shared domain and the reasons a local alignment can misrepresent the length of the relationship.

  • Gap Penalties and Affine Gaps

    How gaps are scored in sequence alignment, the linear gap penalty and its limits, the affine gap model that charges a larger penalty for opening a gap than for extending it, the biological reasons for preferring one long gap to several short ones, the choice of penalty values and their effect on the alignment, with the checks that show an alignment is not an artefact of the penalty.

  • Substitution Matrices and BLOSUM

    How a substitution matrix assigns a score to every pair of residues, how the BLOSUM matrices were derived from aligned blocks of related proteins at different levels of sequence identity, why a matrix chosen for close relatives performs poorly for distant ones, how the matrix is paired with gap penalties and how a matrix is selected for a particular divergence.

  • Scores and Significance

    How the score of an alignment is converted into a statistical measure of significance, the expected distribution of scores for unrelated sequences, the raw score and the bit score, the E-value that depends on the size of the search space and the cautions needed before a significant alignment is taken as evidence of homology or of shared function.

  • Pairwise Alignment in Practice

    How a pairwise alignment is carried out with software in practice, covering the input preparation and the choice of sequence type, the parameter settings and their recording, the inspection of an alignment for regions of low confidence, the output formats that carry an alignment and the checks that confirm the software has aligned the intended sequences.

  • Common Errors in Alignments

    The errors most often found in pairwise alignments, including the alignment of unrelated sequences because of composition, the misplacement of gaps in low-complexity regions, the choice of a matrix that does not suit the divergence, the use of sequences from the wrong organism or the wrong reading frame, and the way each error is detected by the checks and comparisons described in the topic.

References

  1. Needleman, S. B., & Wunsch, C. D. (1970). A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 48(3), 443-453. https://doi.org/10.1016/0022-2836(70)90057-4
  2. Smith, T., & Waterman, M. (1981). Identification of common molecular subsequences. Journal of Molecular Biology, 147(1), 195-197. https://doi.org/10.1016/0022-2836(81)90087-5
  3. Henikoff, S., & Henikoff, J. G. (1992). Amino acid substitution matrices from protein blocks. Proceedings of the National Academy of Sciences, 89(22), 10915-10919. https://doi.org/10.1073/pnas.89.22.10915
  4. Altschul, S. F., Gish, W., Miller, W., Myers, E. W., & Lipman, D. J. (1990). Basic local alignment search tool. Journal of Molecular Biology, 215(3), 403-410. https://doi.org/10.1016/S0022-2836(05)80360-2
  5. Sandve, G. K., Nekrutenko, A., Taylor, J., & Hovig, E. (2013). Ten Simple Rules for Reproducible Computational Research. PLoS Computational Biology, 9(10), e1003285. https://doi.org/10.1371/journal.pcbi.1003285

Callouts marked Commentary or Speculation in the lesson separate interpretation and open questions from established findings.