fix typo when indexing into gap scores in forward pass #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi DeepBLAST team,
while trying out the Aligning proteins example from your Wiki page, I noticed somewhat undefined behaviour when trying to align two specific sequences when loading the DeepBLAST model on the CPU:
Running this example sometimes succeeds, but often prints a different alignment string for every re-run, which it should'nt. The calculated alignments also differ from the alignment that gets calculated when running the model on the GPU with the same input sequences.
Other times the program crashes with errors like
RuntimeError: Function 'NeedlemanWunschFunctionBackward' returned nan values in its 0th output.
orIndexError: index -30 is out of bounds for dimension 0 with size 29
.I fixed these errors for myself by adjusting the indices that are used in the
_forward_pass_numba
function in nw.py to access the gap scores/penalties. This also looks like it is maybe just a typo.