CardamomOT.tools.plot_results_kov

Plotting and analysis utilities for KO/OV perturbation results.

Functions

plot_results_sim_kov(p, combo[, stim, prior, ...])

Compare wild-type simulation to a KO/OV perturbation (UMAP).

compare_cell_types(p, combo_name[, split, stim, ...])

Compare cell-type proportions between wild-type and a KO/OV perturbation.

Module Contents

CardamomOT.tools.plot_results_kov.plot_results_sim_kov(p, combo, stim=1.0, prior=1.0, project_on_full=False, normtransform=False, logtransform=True)

Compare wild-type simulation to a KO/OV perturbation (UMAP).

Parameters:
  • p (str) – Path to the project directory (trailing slash included).

  • combo (str) – Perturbation label, e.g. "KO_Gata6_OV_none".

  • stim (float) – Stimulus-edge penalisation value used during inference.

  • prior (float) – Prior-network weighting value used during inference.

  • project_on_full (bool) – If True, fit UMAP on NB mixture and project others.

  • normlog (bool) – Apply normalisation and log1p before UMAP.

CardamomOT.tools.plot_results_kov.compare_cell_types(p, combo_name, split='full', stim=1.0, prior=1.0, label_key='cell_type')

Compare cell-type proportions between wild-type and a KO/OV perturbation.

Trains a classifier on the observed data, predicts cell types on WT trajectories, WT simulation, and the perturbation simulation, then plots stacked bar proportions for all three.

Parameters:
  • p (str) – Path to the project directory (trailing slash included).

  • combo_name (str) – Perturbation label, e.g. "KO_CHGA_OV_none".

  • split (str) – Data split used to load the reference data ("full" or "train").

  • stim (float) – Stimulus value used during inference.

  • prior (float) – Prior value used during inference.

  • label_key (str) – obs key used to store/read cell-type predictions.