scSemiProfiler.utils.celltype_signature_comparison

scSemiProfiler.utils.celltype_signature_comparison(gtdata, semisdata, celltype_key, top_n_degs=3, save=None)[source]

Use dotplot to compare the cell type signatures found using the real-profiled dataset and the semi-profiled datset.

Parameters
  • gtdata (anndata._core.anndata.AnnData) – The real-profiled dataset

  • semisdata (anndata._core.anndata.AnnData) – The semi-profiled dataset

  • celltype_key (str) – The key in .obs specifying the cell type labels

  • save – Path within the ‘figures’ folder to save the plot

  • top_n_degs (int) – Top n DEGs used for each cell type in the dotplot

Return type

typing.Tuple[float, float, list]

Returns

Tuple[float, float, List] (A tuple containing two floats and a list: Pearson correlation of dot sizes, dot colors, and a list of signature genes.)

Example

>>> celltype_signature_comparison(gtdata=gtdata,semisdata=semisdata,celltype_key='celltypes')