skbio.tree.TreeNode.from_bptree#

classmethod TreeNode.from_bptree(bp)[source]#

Construct a tree from a balanced-parentheses BPTree.

Parameters:
bpskbio.tree.BPTree

The balanced-parentheses tree to convert.

Returns:
TreeNode

The tree represented as a TreeNode. The type matches the class on which this method is called, so subclasses are preserved.