glue_genes.glue_single_cell.qt.diff_gene_exp.get_gene_diff_exp#

glue_genes.glue_single_cell.qt.diff_gene_exp.get_gene_diff_exp(subset1, subset2, data)#

Get differential gene expression for two subsets over a dataset

Uses scanpy rank_genes_groups with just one group (subset1) and one reference set (subset2) and method=wilcoxon.

Note that this copies the relevant subsets into memory as otherwise this won’t work on anndata in disk-backed mode:

(the above is technically for a different scanpy function, but the same problem occurs for rank_genes_groups)

Parameters:
subset1Subset

The highest ranked genes are expressed more in this subset.

subset2Subset

The reference subset. The lowest ranked genes are expressed more in this subset.

dataDataAnnData

The gene expression (X) matrix connecting genes and cells.

show_warningbool, optional

Whether to show a warning dialog if the subset is not valid. Default is True.