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

Add helper to convert Bio.Phylo trees to PyTorch #2557

Merged
merged 5 commits into from
Jul 15, 2020
Merged

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Jul 14, 2020

Addresses #2426

This adds a helper bio_phylo_to_times() to extract coalescent time statistics from a Bio.Phylo tree object. This is convenient because Bio.Phylo provides parsers for most phylogeny tree formats, including Newick and NEXUS. Note this does not add a new dependency to Pyro: the code is duck typed and works whenever biopython is installed (it is not installed by default because biopython requires Python 3.6+).

I plan to document this helper in a new tutorial section #2558. I had already used a version of this helper in previous tutorial sketches.

Tested

  • added unit tests
  • built docs locally.

@fritzo fritzo added this to the 1.4 release milestone Jul 14, 2020
@fritzo fritzo requested a review from eb8680 July 14, 2020 03:11
Copy link
Member

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fritzo
Copy link
Member Author

fritzo commented Jul 14, 2020

Thanks for reviewing!

@fritzo
Copy link
Member Author

fritzo commented Jul 15, 2020

@eb8680 ready to merge?

@eb8680 eb8680 merged commit acde6b5 into dev Jul 15, 2020
@fritzo fritzo deleted the sir-phylo-helper branch September 27, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants