scSemiProfiler.utils.compare_umaps

scSemiProfiler.utils.compare_umaps(semidata, name='testexample', representatives='testexample/status/init_representatives.txt', cluster_labels='testexample/status/init_cluster_labels.txt', celltype_key='celltypes', save=None)[source]

Compare the real-profiled and semi-profiled datasets by plotting them in a same UMAP

Parameters
  • semidata (anndata._core.anndata.AnnData) – Semi-profiled dataset

  • name (str) – Project name

  • representatives (str) – Path to the txt file storing the representative information

  • cluster_labels (str) – Path to the txt file storing the cluster label information

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

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

Return type

typing.Tuple[anndata._core.anndata.AnnData, anndata._core.anndata.AnnData, anndata._core.anndata.AnnData]

Returns

  • combdata – Combined dataset, with real-profiled cells in the front

  • gtdata – Real-profiled dataset

  • semidata – Semi-profiled dataset

Example

>>> combined_data,gtdata,semidata = compare_umaps(
>>>             semidata = semisdata, # assembled semi-profiled dataset
>>>             name = name,
>>>             representatives = name + '/status/init_representatives.txt',
>>>             cluster_labels = name + '/status/init_cluster_labels.txt',
>>>             celltype_key = 'celltypes'
>>>             )