-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smith-Waterman Algorithm #292
Conversation
align/align.go
Outdated
alignB = string(stringB[j-1]) + alignB | ||
i-- | ||
j-- | ||
} else if matrix[i][j] == matrix[i-1][j]+scoring.GapPenalty { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this condition isn't covered by tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Just changed the test case to have gaps on both alignment strings: 98b16bf
align/align.go
Outdated
alignA = "-" + alignA | ||
alignB = string(stringB[j-1]) + alignB | ||
j-- | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any case where this can happen? Shouldn't panic but should return an error if this case is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure this case should never happen. It would mean that the matrix was constructed erroneously or there is a bug somewhere.
No description provided.