regvelo.tools.regulation_scanning

regvelo.tools.regulation_scanning(model, adata, n_states, cluster_label, terminal_states, TF, target, effect=0.001, method='likelihood', **kwargs)[source]

Perform transcription factor (TF) scanning and perturbation analysis on a gene regulatory network.

Parameters:
  • model (str) – Path to the pretrained REGVELOVI model.

  • adata (AnnData) – Annotated data matrix.

  • n_states (int) – Number of macrostates to compute.

  • cluster_label (str) – Key in adata.obs used for grouping cells into clusters.

  • terminal_states (list[str] | None) – List of terminal state labels. If None, will be inferred by GPCCA.

  • TF (list[str]) – List of transcription factor genes to perturb.

  • target (list[str]) – List of target genes to perturb downstream of each TF.

  • effect (float) – Value to assign when blocking a regulation (default: 1e-3).

  • method (Literal['likelihood', 't-statistics']) – Method to use in abundance_test() ("likelihood" or "t-statistics").

  • **kwargs (Any) – Additional keyboard parameters passed on to in_silico_block_regulation_simulation().

Return type:

dict[str, list[str] | list[Series]]

Returns:

: Dictionary with keys:

  • "links": formatted regulator -> target strings.

  • "coefficient": perturbation coefficients.

  • "pvalue": FDR-adjusted p-values.