regvelo.plotting.plot_TF_regulon¶
- regvelo.plotting.plot_TF_regulon(adata, rgv_model, cluster_key, TF, terminal_state_to_plot, coef_targets, coef_regulators, n_hits=10, device='cpu')[source]¶
Plot a TF’s regulon ranking, regulatory network, and cell-resolved weights.
Loads
rgv_model, builds the inferred GRN and the mixed GRN (prioradata.uns['skeleton']x inferred), and for both edge directions (targetsof the TF andregulatorsof the TF) draws, forterminal_state_to_plot:a ranking plot of the top
n_hitsregulon edges (by coefficient score), andthe corresponding signed regulatory-network diagram, once using the mixed GRN and once using the inferred GRN to sign the edges.
Finally, it draws per-cell GRN-weight UMAPs (via
plot_grn_weight()) for the inferred-GRN top-hit targets and top-hit regulators.- Parameters:
adata (anndata.AnnData) – AnnData used to train
rgv_model. Must containuns["skeleton"](the prior-GRN adjacency) and a UMAP embedding. Updated in place with the per-cell edge-weight columns added byplot_grn_weight().rgv_model (str) – Path to a saved, trained RegVelo model directory (as produced by
REGVELOVI.save). Loaded viaREGVELOVI.load(rgv_model, adata)and used to infer the GRN.cluster_key (str) –
adata.obscolumn passed torgv.tl.inferred_grn(the GRN grouping).TF (str) – The transcription factor of interest. Must be a key of both
coef_targetsandcoef_regulatorsand a gene inadata.var_names.terminal_state_to_plot (str) – The single terminal state to rank edges for. Must match a column name in the coefficient tables in
coef_targets/coef_regulators.coef_targets (dict of str to DataFrame) – Per-TF target and regulator coefficient tables, keyed by TF, as returned by
regvelo.tl.compute_TF_regulon().coef_regulators (dict of str to DataFrame) – Per-TF target and regulator coefficient tables, keyed by TF, as returned by
regvelo.tl.compute_TF_regulon().n_hits (int, optional) – Number of top edges to show per ranking plot / network. Default
10.device (str, optional) – Device used for GRN inference (e.g.
"cuda:0"or"cpu"). Default"cpu".
- Return type:
- Returns:
: None
Figures are drawn (ranking plots, network diagrams, and weight UMAPs); no value is returned.