Skip to content

scdef.tl.get_hierarchy

get_hierarchy(model: scDEF, simplified: Optional[bool] = True, drop_factors: Optional[Sequence[str]] = None) -> Dict[str, Sequence[str]]

Get a dictionary containing the polytree contained in the scDEF graph.

Parameters:

Name Type Description Default
simplified Optional[bool]

whether to collapse single-child nodes

True
drop_factors Optional[Sequence[str]]

factors to drop from the hierarchy

None

Returns: hierarchy: the dictionary containing the hierarchy