cascade.graph.annotate_explanation
- cascade.graph.annotate_explanation(digraph, ctfact, causal_map, cutoff=0.1)[source]
Annotate counterfactual explanation to the causal graph
- Parameters:
digraph (
DiGraph) – Causal graph (fromexport_causal_graph())ctfact (
AnnData) – Dataset with counterfactual explanation (fromexplain())causal_map (
DataFrame) – Causal map (fromexport_causal_map())cutoff (
float) – Minimal cutoff of absolute total change for a gene to be annotated with contributions (small changes cannot be reliably annotated)
- Return type:
- Returns:
Annotated causal graph
Tip
It is strongly recommended to limit cells to a single perturbation for use as
ctfact.