TreeNode.
subsets
()[source]¶Return all sets of names that come from self and its descendants
State: Experimental as of 0.4.0.
Compute all subsets of tip names over self, or, represent a tree as a set of nested sets.
Returns: | A frozenset of frozensets of str |
---|---|
Return type: | frozenset |
See also
Examples
>>> from skbio import TreeNode
>>> tree = TreeNode.read(["(((a,b)c,(d,e)f)h)root;"])
>>> subsets = tree.subsets()
>>> len(subsets)
3