I try to understand details of the Needleman–Wunsch algorithm and use an example from the book [Nello Cristianini, Matthew W. Hahn. Introduction to Computational Genomics. A Case Studies Approach, ].
To my opinion, the algorithm is described not very neatly, so the question arises.
Consider two sequences:
I: VIVALASVEGAS
II: VIVADAVIS
The first step is clear:
Also, the calculation of the score for diagonal neighbor is also clear,
because this is an alignment without a gap:
I: V
II: V
Unclear moment is the alignment for left (or above) neighbor. Say, the left neighbor
corresponds to this
I: V
II: -
or this
I: -
II: V
alignment?