Global and local alignment
A global alignment (Needleman–Wunsch) aligns two sequences from end to end and suits sequences of similar length that are related along their whole length. A local alignment (Smith–Waterman) finds the best-scoring region shared by the two sequences and ignores the rest, which suits a domain inside a longer protein or a read against a longer reference.
Both are computed exactly by dynamic programming. This tool uses affine gap penalties, in which opening a gap costs more than extending it, so a single long indel is preferred to many short ones, as in real sequence evolution.
Scoring
DNA is scored with a match reward of +2 and a mismatch penalty of −3, with a gap-open penalty of 5 and a gap-extension penalty of 2. Proteins are scored with the BLOSUM62 substitution matrix, a gap-open penalty of 11 and an extension penalty of 1, similar to the BLASTP defaults. A gap of length L costs open + extend × (L − 1).
Reading the result
In the middle line, | marks an identical position, : a positive BLOSUM62 score (a conservative substitution in proteins), . a mismatch and a space a gap. Identity is the fraction of aligned columns with identical residues; the alignment score depends on the scoring scheme and is only comparable between alignments scored the same way.