Next: Tabular computation of optimal
Up: Pairwise Alignment
Previous: Models for Inexact Matching
Global Alignment
Example 2.5
Given a string
"ACBCDDDB" and a string
"CADBDAD", one possible
alignment will be:
A C - - B C D D D B
| | | | |
- C A D B - D A D -
A more useful than the general case is the following problem:
Problem 2.6
INPUT: Two strings S and T |T|=m, |S|=n (n and m
are of roughly the same magnitude)
QUESTION: Establish
the optimal alignment according to the alignment quality (or scoring) which will be defined next.
Lemma 2.7
V(A,B) has the following properties:
Proof:Base condition:
The only way to align the first i elements of the string S with zero elements of the string T is
to align each of the elements with a space in the string T. The score for that operation is by definition
for each of the i elements and
for the total sum.
Similarly, the expression
follows from matching the
first j elements of T with i blanks in string S.
Proof:Recurrence relation:
Let us consider an optimal alignment of
and
.
We shall distinguish between three cases according to the three possible scoring for the three operations are:
- Aligning Si with Tj: The score in this case is the score of the operation
plus the score of aligning i-1 elements of S with j-1 elements of T, namely,
- Aligning Si with a space character in string T:
The score in this case is the score of the indel operation
plus the score of aligning the previous
i-1 elements of S with j elements of T (Since the space
is not an original character of T),
- Aligning Tj with a space character in string S:
Similar to the previous case, the score will be
Next: Tabular computation of optimal
Up: Pairwise Alignment
Previous: Models for Inexact Matching
Itshack Pe`er
1999-01-03