skbio.core.tree.TreeNode.subset

TreeNode.subset()[source]

Returns set of names that descend from specified node

Get the set of name on tips that descend from this node.

Returns:

frozenset

The set of names at the tips of the clade that descends from self

Examples

>>> from skbio.core.tree import TreeNode
>>> tree = TreeNode.from_newick("((a,(b,c)d)e,(f,g)h)i;")
>>> sorted(tree.subset())
['a', 'b', 'c', 'f', 'g']