Skip to content
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

Merged
merged 10 commits into from
Feb 24, 2023
Merged

Smith-Waterman Algorithm #292

merged 10 commits into from
Feb 24, 2023

Conversation

ragnorc
Copy link
Contributor

@ragnorc ragnorc commented Feb 23, 2023

No description provided.

align/align.go Outdated
alignB = string(stringB[j-1]) + alignB
i--
j--
} else if matrix[i][j] == matrix[i-1][j]+scoring.GapPenalty {
Copy link
Collaborator

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

Copy link
Contributor Author

@ragnorc ragnorc Feb 24, 2023

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 {
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@TimothyStiles
Copy link
Collaborator

TimothyStiles commented Feb 24, 2023

Thank you @ragnorc this PR was excellent! I've added some documentation and formatting and refactored some variables. Going to merge this and then we can work on adding weight matrices mentioned in #290.

@TimothyStiles TimothyStiles merged commit 94f185b into bebop:main Feb 24, 2023
@ragnorc
Copy link
Contributor Author

ragnorc commented Feb 25, 2023

Thank you @ragnorc this PR was excellent! I've added some documentation and formatting and refactored some variables. Going to merge this and then we can work on adding weight matrices mentioned in #290.

Awesome, thank you! Working on the weight matrices now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants