You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume you intend to compute global pairwise alignments, i.e. Needleman Wunsch. Implicitly, you are initializing your first row and first column with 0, which I think is not correct. Traditionally, it is initialized as i * gapcost (c.f. http://rna.informatik.uni-freiburg.de/Teaching/index.jsp?toolName=Needleman-Wunsch#), in your code that should translate to V[i-1, 0] + A[i-1, 0]. Otherwise, leading gaps in both sequences do NOT get penalized and it would be half way towards an "end gap free" algorithm.
What's missing for a real "end gap free" implementation is that you find your global optimum as the max in the last col and row of your DP matrix.
Therefore, I am confused about what version you really want to implement here?
The text was updated successfully, but these errors were encountered:
I assume you intend to compute global pairwise alignments, i.e. Needleman Wunsch. Implicitly, you are initializing your first row and first column with
0
, which I think is not correct. Traditionally, it is initialized asi * gapcost
(c.f. http://rna.informatik.uni-freiburg.de/Teaching/index.jsp?toolName=Needleman-Wunsch#), in your code that should translate toV[i-1, 0] + A[i-1, 0]
. Otherwise, leading gaps in both sequences do NOT get penalized and it would be half way towards an "end gap free" algorithm.deepblast/deepblast/nw.py
Lines 89 to 93 in ab48e4f
What's missing for a real "end gap free" implementation is that you find your global optimum as the max in the last col and row of your DP matrix.
Therefore, I am confused about what version you really want to implement here?
The text was updated successfully, but these errors were encountered: