skbio.tree.TreeNode.subsets#

TreeNode.subsets()[source]#

Return all sets of names that come from self and its descendants.

Compute all subsets of tip names over self, or, represent a tree as a set of nested sets.

Returns:
frozenset

A frozenset of frozensets of str

Examples

>>> from skbio import TreeNode
>>> tree = TreeNode.read(["(((a,b)c,(d,e)f)h)root;"])
>>> subsets = tree.subsets()
>>> len(subsets)
3