where s(xi,yj) is the score of aligning xi and yj, F(i,j) is the maximum score of the alignments of x1,…,xi and y1,…,yj. Assume that d>0 and that score g(k) is given to a gap of length k. Answer the following questions (1) – (5).
(1) Show the general form of g(k).
(2) Show the initial values F(i,0) for i=1,…,m and F(0,j) for j=1,…,n, so that the maximum score of the alignments of the two sequences x1,…,xm and y1,…,yn is obtained as F(m,n) after updating the iterative formula (A) for i=1,…,m and j=1,…,n. Notice that F(0,0)=0.
(3) Evaluate the computational time of calculating the maximum score of the alignments of the two sequences x1,…,xm and y1,…,yn, and describe it by using m and n.
(4) When updating formula (A) for i=1,…,m and j=1,…,n, π(i,j) is defined as follows:
Among the values of F(i−1,j−1)+s(xi,yj), F(i−1,j)−d and F(i,j−1)−d,
when F(i−1,j−1)+s(xi,yj) is the maximum, π(i,j)=(i−1,j−1),
otherwise, when F(i−1,j)−d is the maximum, π(i,j)=(i−1,j),
otherwise, π(i,j)=(i,j−1).
Briefly explain, within five lines, about the role of π(i,j) in the alignment algorithm.
The general form of g(k), which is the score given to a gap of length k, is typically represented as g(k)=−dk where d is a positive penalty for each gap. This linear form assumes a constant penalty for each gap, reflecting the simple gap penalty model.
The computational time of calculating the maximum score of the alignments involves filling in an m×n matrix F. For each cell (i,j) in this matrix, we compute the value using the iterative formula, which takes constant time O(1). Since there are m×n cells, the overall time complexity is:
The role of π(i,j) is to record the source of the maximum value for F(i,j), indicating the optimal move that leads to the current cell. This allows us to trace back from F(m,n) to F(0,0) to reconstruct the optimal alignment path between the two sequences.
Durbin, R., Eddy, S., Krogh, A., & Mitchison, G. (1998). Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids. Cambridge University Press. Chap. 2