Return the sum of the distance between self and ancestor
Parameters: | ancestor : TreeNode
|
---|---|
Returns: | float
|
Raises: | NoParentError
NoLengthError
|
See also
Examples
>>> from skbio.core.tree import TreeNode
>>> tree = TreeNode.from_newick("((a:1,b:2)c:3,(d:4,e:5)f:6)root;")
>>> root = tree
>>> tree.find('a').accumulate_to_ancestor(root)
4.0