Local alignment. Gapped local alignment scores and the corresponding directed paths for two subsequences
A(0,10] = TATATGCCTT and
B(0,10] = CCATTGCACA of sequences drawn from the nucleotide alphabet {A,C,G,T}. The nucleotide scoring matrix in the figure is commonly used in applications:
S(
a,b) = 4 if
a =
b and −5 otherwise and the affine gap penalty Δ(
g) = 2 +
g. The vertex (
i,j) = (10,10) is in the northeast corner of the figure with the origin (0,0) at the southwest corner. The cell (
i,j) corresponding to the letter pair (
Ai,
Bj) displays the corresponding local score
Ŝi,j. A local score of 0 indicates that no path of positive weight ends at the corresponding point. The optimal local path, which ends at point (8,9), e.g., consists of eight edges, in order: 2 northeast, 1 east, 3 northeast, 1 north, and 1 northeast. It corresponds to the optimal local sequence alignment of
A(0,10] and
B(0,10],

The local score
Ŝ8,9 = 4 + 4 − 3 + 4 + 4 + 4 − 3 + 4 = 18 is the sum of the corresponding edges and represents the path of greatest weight ending at point (8,9). The score is also the greatest weight of any path within the rectangle displayed, so it also corresponds to the local maximum score
M̂10,10 = 18.