mmc.Hierarchy.add_subset()
- Hierarchy.add_subset(name, parent_classification, values, color='#FFFFFF', **kwargs)
Add a Subset beneath a Classification node. Checks if it is correctly positioned in the tree before adding.
- Parameters:
name (
str) – Name of the Subset node. Names must be unique and should not contain an asterisk.parent_classification (
str) – Name of the Classification node that should parent this new node.values (
Union[List[str],List[List[str]],Dict[str,str]]) – list of str (e.g. [‘pos’,’any’,’neg’]) or list of list of strings (e.g. [[‘pos’,’any’,’neg’],[‘any’,’pos’,’neg’]]) The values used to define subsets. Lists of str should be the same length (and order) as the markers of the parent classification node. Lists of lists are joined as logical or’s. This can also be provided as a dict, which is sent to hc_defs(), allowing for more complex definitions. See hc_defs for more details.color (
str(default:'#FFFFFF')) – Hex code (including the #) that defines the color associated with the subset when displaying the hierarchy or making color dictionaries**kwargs – arguments to pass to Subset class constructor