regvelo.tools.TFScanning_func

regvelo.tools.TFScanning_func(model, adata, cluster_label=None, terminal_states=None, terminal_states_manual=None, KO_list=None, n_states=None, cutoff=0.001, method='likelihood', combined_kernel=False)[source]

Perform in silico TF regulon knock-out screening

Parameters:
  • model (str) – Path to the saved RegVelo model.

  • adata (AnnData) – Annotated data matrix.

  • cluster_label (Optional[str]) – Key in adata.obs to associate names and colors with terminal_states.

  • terminal_states (Union[str, list[str], dict[str, list[str]], Series, None]) – Subset of macrostates.

  • terminal_states_manual (Optional[dict]) – Dictionary of manually defined terminal states.

  • KO_list (Union[str, list[str], dict[str, list[str]], Series, None]) – List of TF names or combinations (e.g., [“geneA”, “geneB_geneC”]).

  • n_states (Union[int, list[int], None]) – Number of macrostates to compute.

  • cutoff (float | list[float]) – Threshold for determing which links need to be muted,

  • method (Literal['likelihood', 't-statistics']) – Method for quantifying perturbation effect.

  • combined_kernel (bool) – Whether to use a combined kernel (0.8*VelocityKernel + 0.2*ConnectivityKernel)

Return type:

dict[str, float | DataFrame]

Returns:

: Dictionary with keys TF, coefficient, and pvalue summarizing KO effects.