regvelo.metrics.cellfate_perturbation¶
- regvelo.metrics.cellfate_perturbation(perturbed, baseline, terminal_state=None, terminal_indices=None, method='likelihood', solver='gmres')[source]¶
Compute depletion likelihood or score for TF perturbation.
- Parameters:
perturbed (
dict[str,AnnData]) – Dictionary mapping TF candidate names to their perturbedAnnDataobjects, each containing precomputed fate probabilities underobsm["lineages_fwd"].baseline (
AnnData) – UnperturbedAnnDataobject with precomputed fate probabilities underobsm["lineages_fwd"].terminal_state (
Union[str,Sequence[str],None]) – One or more terminal states for which depletion scores are computed.terminal_indices (
Optional[dict[str,list[str]]]) – Dictionary mapping each terminal state to the list of cell indices (obs_names) belonging to it.method (
Literal['likelihood','t-statistics']) – Scoring method to use: - “t-statistics”: uses t-statistics. - “likelihood”: uses ROC AUC score.solver (
Union[str,Literal['direct','gmres','lgmres','bicgstab','gcrotmk']]) – Linear system solver used by CellRank’s GPCCA estimator when computing fate probabilities. Supported options include: - “direct”: direct solver. - “gmres”: Generalized Minimal Residual method (default). - “lgmres”: Loose GMRES. - “bicgstab”: BiConjugate Gradient Stabilized method. - “gcrotmk”: GCROTMK solver. Choice of solver may affect performance and numerical stability.
- Return type:
DataFrame- Returns:
: DataFrame summarizing depletion scores and significance statistics.