sfaira.versions.metadata.OntologyHierarchical.get_effective_leaves¶
- OntologyHierarchical.get_effective_leaves(x: List[str]) List[str] ¶
Get effective leaves in ontology given set of observed nodes.
The effective leaves are the minimal set of nodes such that all nodes in x are ancestors of this set, ie the observed nodes which represent leaves of a sub-DAG of the ontology DAG, which captures all observed nodes.
- Parameters
x – Observed node IDs.
- Returns
Effective leaves.