Initialization
We initialize M, A and B matrices for overlap alignment and non-overlap alignment.
- Aligning Ai with B0 without a gap. Not possible, hence, First column of M is initialized with - \(\infty\).
- Aligning A0 with Bj without a gap. Not possible, hence, First row of M is initialized with - \(\infty\).
- M0,0 should have zero to begin the alignment using dynamic programming.
M | 0 | 1 | 2 | 3 | 4 | 5 |
0 | 0 | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) |
1 | - \(\infty\) | | | | | |
2 | - \(\infty\) | | | | | |
3 | - \(\infty\) | | | | | |
- Score of the best alignment between Ai and B0 that introduces a gap in A. Not possible, hence, First column of B is initialized with - \(\infty\).
- Score of the best alignment between A0 and Bj that results a gap in B. Not possible, hence, First row of A is initialized with - \(\infty\).
Overlap alignment
A | 0 | 1 | 2 | 3 | 4 | 5 |
0 | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) |
1 | 0 | | | | | |
2 | 0 | | | | | |
3 | 0 | | | | | |
B | 0 | 1 | 2 | 3 | 4 | 5 |
0 | - \(\infty\) | 0 | 0 | 0 | 0 | 0 |
1 | - \(\infty\) | | | | | |
2 | - \(\infty\) | | | | | |
3 | - \(\infty\) | | | | | |
Non-overlap alignment
A | 0 | 1 | 2 | 3 | 4 | 5 |
0 | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) | - \(\infty\) |
1 | -22 | | | | | |
2 | -29 | | | | | |
3 | -36 | | | | | |
B | 0 | 1 | 2 | 3 | 4 | 5 |
0 | - \(\infty\) | -22 | -29 | -36 | -43 | -50 |
1 | - \(\infty\) | | | | | |
2 | - \(\infty\) | | | | | |
3 | - \(\infty\) | | | | | |