decoupler.get_contrast

decoupler.get_contrast(adata, group_col, condition_col, condition, reference=None, method='t-test')

Computes Differential Expression Analysis using scanpy’s rank_genes_groups function between two conditions from pseudo-bulk profiles.

Parameters:
adataAnnData

Input pseudo-bulk AnnData object.

group_colstr, None

Column of obs where to extract the groups names, for example cell types. If None, do not group.

condition_colstr

Column of obs where to extract the condition names, for example disease status.

conditionstr

Name of the condition to test inside condition_col.

referencestr

Name of the reference to use inside condition_col. If ‘rest’ or None, compare each group to the union of the rest of the group.

methodstr

Method to use for scanpy’s rank_genes_groups function.

Returns:
logFCsDataFrame

Dataframe containing log-fold changes per gene.

p_valsDataFrame

Dataframe containing p-values per gene.