skbio.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 six import StringIO
>>> from skbio import TreeNode
>>> tree = TreeNode.read(StringIO("((a,(b,c)d)e,(f,g)h)i;"))
>>> sorted(tree.subset())
['a', 'b', 'c', 'f', 'g']