-
Notifications
You must be signed in to change notification settings - Fork 24
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 neighbour-joining tree performance #641
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
alimanfoo
commented
Oct 15, 2024
•
edited
Loading
edited
- Use anjl instead of biotite to build neighbour-joining trees, which is capable of building trees for 20,000+ samples in around 5 minutes. Resolves Neighbour-joining tree performance #627.
- Cache the results of tree construction to avoid repeated computation.
- Use anjl for tree plotting.
- Also work towards Anopheles refactor #366.
- Along the way, fix issues encountered when plotting and data includes missing values.
- Create a new module malariagen_data.anoph.distance.
- Add a class AnophelesDistanceAnalysis.
- Move the public method biallelic_pairwise_distances() and associated private methods from the AnophelesDataResource class to the new AnophelesDistanceAnalysis class.
- Add a public method njt() to the new class which returns an array Z and which also saves results to the results cache.
- Add a private method _njt() which is called from within njt() to run the actual neighbour-joining if the result is not cached, calling biallelic_pairwise_distances() internally to obtain a distance matrix then anjl.rapid_nj() to compute a tree.
- Add a public method plot_njt() to the new class which calls njt() first to obtain a tree then calls anjl.plot() to create a plot.
- Remove the plot_njt() method from the AnophelesDataResource class.
- Add AnophelesDistanceAnalysis as a parent class of AnophelesDataResource.
- Add tests to get coverage of the new AnophelesDistanceAnalysis class.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
leehart
approved these changes
Oct 17, 2024
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.
Awesome. Thanks @alimanfoo 👍
alimanfoo
added
the
BMGF-068808
Work supported by BMGF grant INV-068808 (MalariaGEN 2024-2027).
label
Dec 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.