This package extends Plotly to create interactive plots of phylogenetic trees from Newick strings. It can be used with plotly.py and can also be integrated into Dash Apps.
See also:
- Newick format - https://en.wikipedia.org/wiki/Newick_format
- Plotly - https://github.com/plotly/plotly.py
pip install plotly-phylotree- Labels shown by default
- No distances specified in Newick string
from phylotree import create_phylogenetic_tree
newick_str = "(A,(B,C)D)E;"
fig = create_phylogenetic_tree(newick_str)
fig.show()- Display level specifies level up to which tree is plotted. Defaults to np.inf.
from phylotree import create_phylogenetic_tree
newick_str = "(A,(B,C)D)E;"
fig = create_phylogenetic_tree(newick_str, display_level=1)
fig.show()- Labels shown by default
- Distances specified in Newick string
from phylotree import create_phylogenetic_tree
newick_str = "(Bovine:0.69395,(Gibbon:0.36079,(Orang-Utan:0.33636,(Gorilla:0.17147,(Chimp:0.19268,Human:0.11927):0.08386):0.06124):0.15057):0.54939,Mouse:1.21460)"
fig = create_phylogenetic_tree(newick_str)
fig.show()- Labels deactivated
- Distances specified
from phylotree import create_phylogenetic_tree
newick_str = "(Bovine:0.69395,(Gibbon:0.36079,(Orang-Utan:0.33636,(Gorilla:0.17147,(Chimp:0.19268,Human:0.11927):0.08386):0.06124):0.15057):0.54939,Mouse:1.21460)"
fig = create_phylogenetic_tree(newick_str, show_labels=False)
fig.show()Suggestions for improvement are welcome. As this is a small side project, please allow some time for answers and revision.
MIT License



