116 4 Super Pairwise Alignment
Step 4.2.1 Estimate the first mutation position i
1
in T :
1. Initialize i = j = 0 and calculate w(A, B; i, j, n). If
w(A, B; i, j, n)=w ≥ θ
,
then let
ˆ
i
1
= 0. This means the shifting mutation occurs at the
beginning of [1,n]. Otherwise, go to step 4.2.1-(2).
2. In Step 4.2.1, procedure 1, if w ≤ θ, meaning no shifting mutation
occurs in [1,n], we put the starting point forward and consider
i = j = n −τ. Next, we calculate the corresponding w(A, B; i, j, n).
If
w(A, B; i, j, n)=w ≤ θ,
then let i = j =2(n − τ) and repeat Step 4.2.1, procedure 2 until
w(A, B; i, j, n) >θ.Letk
1
be the integer satisfying the following
requirements:
w(A, B; i, j, n)=w ≤ θ
if i = j = k
1
(n − τ), and w(A, B; i, j, n)=w>θif i = j =
(k
1
+1)(n −τ ). Proceed to Step 4.2.1, procedure 3 or procedure 4.
3. For i = j =(k
1
+1)(n − τ), if w(A, B; i, j, n)=w ≥ θ
,thenset
ˆ
i
1
=(k
1
+1)(n − τ). Otherwise, go to Step 4.2.1, procedure 4.
4. Following Step 4.2.1, procedures 1–3, we have θ<w<θ
if i =
j =(k
1
+1)(n − τ). Therefore, for the same n, compute w
=
w(A, B; i + h, j + h, n). If w
>w,calculate
ˆ
i
1
according to (4.17).
Otherwise, repeat Step 4.2.1, procedures 1–4 for the larger h and n,
until w
>w.
Therefore, through the use of Step 4.2.1, we may estimate
ˆ
i
1
of i
1
.
Step 4.2.2 Estimate
1
based on the estimation
ˆ
i
1
of the first mutation po-
sition in T . Typically,
w
A, B;
ˆ
i
1
+ ,
ˆ
i
1
,n
,w
A, B;
ˆ
i
1
,
ˆ
i
1
+ , n
,=1, 2, 3, ··· .
If pair (
ˆ
i
1
+ ,
ˆ
i
1
)orpair(
ˆ
i
1
,
ˆ
i
1
+ )satisfiesw ≤ θ =0.3or0.4, where
w is its corresponding sliding window function, then this is the length
of the shifting mutation. Specifically:
1. If w(A, B;
ˆ
i
1
+ ,
ˆ
i
1
,n) ≤ θ,wenotethat
ˆ
1
= − and we insert
virtual symbols into sequence B following the position
ˆ
i
1
, while
keeping sequence A invariant.
2. If w(A, B;
ˆ
i
1
,
ˆ
i
1
+ , n) ≤ θ,wenotethat
ˆ
1
= and we insert
virtual symbols into sequence A following the position
ˆ
i
1
, while
keeping sequence B invariant.
Through the use of these two steps, we may estimate the local mutation
mode T
1
= {(i
1
,
1
)}, and its corresponding locally uniform alignment
(C
1
,D
1
). It is decomposed as follows:
C
1
=(C
1,1
,A
2,1
) ,D
1
=(D
1,1
,B
2,1
) .