
Module 5: Sequence Alignments
Performing pairwise alignments of 2 sequences can be thought of as a more complicated search for similarities between the
sequences. The end product of algorithms employed here would be an "optimal alignment" of the two sequences.
 Based on differences between two sequences, one can calculate the "cost" of aligning the two sequences by using
replacements, deletions and insertions ("Editing"). An optimal alignment of any sequences is the one with the minimal total
cost of all editing functions between the 2 sequences. The following example of comparing 2 sequences using two different
alignments illustrates a simplistic view of this concept.
Here, the alignment on the left is the optimal one since it "costs' only 2 editing functions (2 deletions) versus the
cost of 4 editing functions (2 deletions and 2 substitutions) for the alignment on the right.
 Optimal alignments of 2 sequences can also be obtained employing dynamic programming methods such as the Needleman and
Wunsch global alignment algorithm or the Smith and Waterman local alignment algorithm.
Global alignments are not effective for two highly diverged sequences which may share a common functional domain.

