Skip to content

Instantly share code, notes, and snippets.

@ElDeveloper
Created May 8, 2014 02:52
Show Gist options
  • Save ElDeveloper/d902bd5a54b13e8cb5af to your computer and use it in GitHub Desktop.
Save ElDeveloper/d902bd5a54b13e8cb5af to your computer and use it in GitHub Desktop.
>>> from skbio.core.tree import TreeNode
>>> tr = TreeNode.from_newick("(((A:.1,B:1.2)C:.6,(D:.9,E:.6)F:.9)"
... "G:2.4,(H:.4,I:.5)J:1.3)K;")
>>> tdbl = tr.descending_branchlength()
>>> sdbl = tr.descending_branchlength(['A','E'])
>>> print tdbl, sdbl
8.9 4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment