regvelo.tools.inferred_grn¶
- regvelo.tools.inferred_grn(vae, adata, label=None, group=None, cell_specific_grn=False, data_frame=False)[source]¶
Infer the gene regulatory network (GRN) using a trained RegVelo VAE model.
- Parameters:
vae (
REGVELOVI) – TrainedREGVELOVImodel with a v_encoder that supports GRN inference.adata (
AnnData) – Annotated data matrix containing cell-specific information and gene expression layers.label (
Optional[str]) – Column name inadata.obsspecifying cell type or grouping labels.group (
Union[str,list[str],None]) –Groups of cells to analyze.
"all"orNone: use all cells.list of str: subset to these groups from
adata.obs[label].
cell_specific_grn (
bool) – IfTrue, compute a cell-specific GRN using individual cell data.data_frame (
bool) – IfTrueandcell_specific_grnisFalse, return the GRN as apandas.DataFrame.
- Return type:
ndarray|DataFrame- Returns:
: numpy.ndarray or pandas.DataFrame
The inferred GRN as an array or DataFrame. For cell-specific GRN, always returns an array.