Skip to content

Smith-Waterman Algorithm - #292

Merged
TimothyStiles merged 10 commits into
bebop:mainfrom
ragnorc:smith-waterman
Feb 24, 2023
Merged

Smith-Waterman Algorithm#292
TimothyStiles merged 10 commits into
bebop:mainfrom
ragnorc:smith-waterman

Conversation

@ragnorc

@ragnorc ragnorc commented Feb 23, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread 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
Copy Markdown
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

@ragnorc ragnorc Feb 24, 2023

Copy link
Copy Markdown
Contributor Author

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

Comment thread align/align.go Outdated
alignA = "-" + alignA
alignB = string(stringB[j-1]) + alignB
j--
} else {

Copy link
Copy Markdown
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
Copy Markdown
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

TimothyStiles commented Feb 24, 2023

Copy link
Copy Markdown
Collaborator

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

ragnorc commented Feb 25, 2023

Copy link
Copy Markdown
Contributor Author

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.

2 participants