skbio.tree.TreeNode.subset

TreeNode.subset()[source]

Returns set of names that descend from specified node

State: Experimental as of 0.4.0.

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

Returns

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

Return type

frozenset

Examples

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