What an alignment does
An alignment lines two sequences up so that matching positions sit in the same column. Where one sequence has extra bases or residues, gaps (-) are put in the other. The result shows where the two agree, where they differ and where something was inserted or deleted.
Align two sequences
- Open Pairwise Align DNA or Pairwise Align Protein.
- Paste the two sequences.
- Read the alignment with the identity, number of gaps and score underneath.
Both tools align the sequences end to end, a global alignment. That suits two versions of the same gene or protein. To find a short piece inside a long sequence, a pattern search is the better tool.
Gaps and scores
Each match adds to the score and each mismatch and gap takes away from it. Opening a gap costs more than making an existing one longer, which is called an affine gap penalty. It reflects biology: one insertion of six bases is more likely than six separate insertions of one. Protein alignments score mismatches with the BLOSUM62 matrix, which treats swaps between similar amino acids, such as leucine and isoleucine, as nearly matches.
Identity vs similarity
Identity is the percentage of aligned positions that are exactly the same. Similarity, for proteins, also counts positions with chemically similar amino acids. Two proteins can be 40% identical and 60% similar. For several sequences that are already aligned, Identity and Similarity gives the figures for every pair.