Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flashton2003
Created August 17, 2019 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flashton2003/5b32c53b56fb9b73935b871a87298ee4 to your computer and use it in GitHub Desktop.
Save flashton2003/5b32c53b56fb9b73935b871a87298ee4 to your computer and use it in GitHub Desktop.
import dendropy as dpy
tree = dpy.Tree.get_from_path('/path/to/tree.nxs', 'nexus')
for nd in tree.postorder_node_iter():
if nd.is_internal():
nd_annot = nd.annotations.values_as_dict()
print nd_annot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment