regvelo.preprocessing.filter_genes

regvelo.preprocessing.filter_genes(adata)[source]

Filter genes in an AnnData object to ensure each gene has at least one upstream regulator in the GRN.

The function iteratively refines the skeleton matrix to maintain only genes with regulatory connections. Only used by soft_constraint=False RegVelo model.

Parameters:

adata (AnnData) –

Annotated data object containing:

  • gene expression data,

  • a prior regulatory network in adata.uns["skeleton"],

  • a list of regulators in adata.uns["regulators"].

Return type:

AnnData

Returns:

: Updates adata with the following field:

  • adata.uns["skeleton"].