TreeNode.
root_at
(node)[source]¶Return a new tree rooted at the provided node.
State: Experimental as of 0.4.0.
This can be useful for drawing unrooted trees with an orientation that reflects knowledge of the true root location.
Parameters: | node : TreeNode or str
|
---|---|
Returns: | TreeNode
|
Raises: | TreeError
|
See also
Examples
>>> from skbio import TreeNode
>>> tree = TreeNode.read(["(((a,b)c,(d,e)f)g,h)i;"])
>>> print(tree.root_at('c'))
(a,b,((d,e)f,(h)g)c)root;