decoupler.get_contrast

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

Computes simple contrast between two conditions from pseudo-bulk profiles. After genertaing pseudo-bulk profiles with dc.get_pseudobulk, computes Differential Expression Analysis using scanpy’s rank_genes_groups function between two conditions.

Parameters:
adataAnnData

Input pseudo-bulk AnnData object.

group_colstr

Column of obs where to extract the groups names.

condition_colstr

Column of obs where to extract the condition names.

conditionstr

Name of the condition to test inside condition_col.

referencestr

Name of the reference to use inside condition_col.

methodstr

Method to use for scanpy’s rank_genes_groups function.

Returns:
Returns logfoldchanges and p-values per gene.