scanpy.get.rank_genes_groups_df(adata, group, *, key='rank_genes_groups', pval_cutoff=None, log2fc_min=None, log2fc_max=None, gene_symbols=None) results in the form of a DataFrame.

adata : AnnDataAnnData

Object to get results from.

group : strstr

Which group (as in’s groupby argument) to return results from.

key : strstr (default: 'rank_genes_groups')

Key differential expression groups were stored under.

pval_cutoff : float, NoneOptional[float] (default: None)

Minimum adjusted pval to return.

log2fc_min : float, NoneOptional[float] (default: None)

Minumum logfc to return.

log2fc_max : float, NoneOptional[float] (default: None)

Maximum logfc to return.

gene_symbols : str, NoneOptional[str] (default: None)

Column name in .var DataFrame that stores gene symbols. Specifying this will add that column to the returned dataframe.


>>> import scanpy as sc
>>> pbmc = sc.datasets.pbmc68k_reduced()
>>>, groupby="louvain", use_raw=True, n_genes=pbmc.shape[1])
>>> dedf = sc.get.rank_genes_groups_df(pbmc, group="0")
Return type