regvelo.tools.perturbation_effect

regvelo.tools.perturbation_effect(adata_perturb, adata, terminal_state)[source]

Compute change in fate probabilities towards terminal states after perturbation. Negative values correspond to a decrease in probabilities, while positive values indicate an increase.

Parameters:
  • adata_perturb (AnnData) – Annotated data matrix of perturbed GRN.

  • adata (AnnData) – Annotated data matrix of unperturbed GRN.

  • terminal_state (str | list[str]) – List of terminal states to compute probabilities for.

Return type:

AnnData

Returns:

: Annotated data object with the following fields added:

  • adata.obs[f"perturbation effect on {state}"]: Change in fate probabilities towards terminal state state after perturbation, where state is one of the terminal states specified in terminal_state.