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

Improve local alignment function #23

Open
Anaphory opened this issue May 11, 2017 · 1 comment
Open

Improve local alignment function #23

Anaphory opened this issue May 11, 2017 · 1 comment

Comments

@Anaphory
Copy link
Collaborator

(As remarked by @LinguList in #22 (comment))

Currently, the local keyword in distances.needleman_wunsch comes from an afterthought/experiment with local alignment, and while it works, the return value neglects to mention the prefix and suffix parts that were not aligned.

In order to not give the function different return values depending on a keyword argument, we should consider splitting that behaviour out to a different function (smith_waterman?) which then returns all of those values.

Re-using code may be easiest if the core (ll. 106–122 currently) is exported into a separate calculate_alignment_scores function?

@Anaphory
Copy link
Collaborator Author

Anaphory commented May 11, 2017

Alternatively, don't re-implement the wheel and look at eg. lingpy's various alignment methods and use the needleman_wunsch (Code in lingpy.algorithm.cython._malign.nw_align) and other alignment methods from there.

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

No branches or pull requests

1 participant