Skip to content

voelkerh/plotly_phylotree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plotly PhyloTree Extension

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:

Installation

pip install plotly-phylotree

Usage

1. Basic Tree

  • 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()

Alt text

2. Basic Tree with specified maximum display level

  • 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()

Alt text

3. Tree with specified distances

  • 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()

Alt text

4. Tree without labels

  • 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()

Alt text

Contributing

Suggestions for improvement are welcome. As this is a small side project, please allow some time for answers and revision.

License

MIT License

About

This package extends Plotly to plot phylogenetic trees from Newick strings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages