Compocyte.core.base.hierarchy_base¶
Classes
Add explanation |
- class Compocyte.core.base.hierarchy_base.HierarchyBase[source]¶
Bases:
objectAdd explanation
- set_cell_relations(root_node, dict_of_cell_relations, obs_names, temp_paths)[source]¶
Once set, cell relations can only be changed one node at a time, using supplied methods, not by simply calling defining new cell relations
- ensure_depth_match(dict_of_cell_relations, obs_names)[source]¶
Check if the annotations supplied in .obs under obs_names are sufficiently deep to work with the hierarchy provided.
- ensure_unique_nodes(dict_of_cell_relations)[source]¶
Check if keys within the hierarchy are unique across all levels as that is a requirement for uniquely identifying graph nodes with networkx.
- make_classifier_graph()[source]¶
Compute directed graph from a given dictionary of cell relationships.
- get_children_obs_key(parent_node)[source]¶
Get the obs key under which labels for the following level in the hierarchy are saved. E. g. if you get_children_obs_key for T cells, it will return the obs key for alpha beta T cell labels and so on.