pegasus.pseudo.markers

pegasus.pseudo.markers(pseudobulk, head=None, de_key='deseq2', alpha=0.05)[source]

Extract pseudobulk DE results into a human readable structure.

This function extracts information from data.varm[de_key], and return as a human readible dictionary of pandas DataFrame objects.

Parameters
  • pseudobulk (UnimodalData) – Pseudobulk data matrix with rows for cells and columns for genes.

  • head (int, optional, default: None) – List only top head genes. If None, show any DE genes.

  • de_key (str, optional, default, deseq2) – Keyword of DE result stored in data.varm.

  • alpha (float, optional, default: 0.05) – q-value threshold for getting significant DE genes. Only those with q-value of MWU test no less than alpha are significant, and thus considered as DE genes.

Returns

results – A Python dictionary containing DE results. This dictionary contains two keywords: ‘up’ and ‘down’. ‘up’ refers to up-regulated genes, which should have ‘log2FoldChange’ > 0.5. ‘down’ refers to down-regulated genes, which should have ‘log2FoldChange’ < 0.5.

Return type

Dict[str, pd.DataFrame]

Examples

>>> markers = pg.pseudo.markers(pseudobulk)