scSemiProfiler.utils.global_stop_checking

scSemiProfiler.utils.global_stop_checking(name, representatives, n_targets=2, celltype_key='celltypes')[source]

Checking if further representative selection is needed for the global mode. n_target samples will be randomly selected from the representatives as the dummy target samples. Other representatives will be used for infer the dummy target samples. A list of inferred samples and the corresponding round truth will be returned for the user to examine the similarity and decide if further representative selection is needed. Information regarding cell type deconvolution performance will also be presented.

Parameters
  • name (str) – Project name.

  • representatives (list) – List of representative samples.

  • cluster_labels – List of cluster labels.

  • n_target – The number of dummy targets.

  • celltype_key (str) – The key in adata.obs for storing cell types

Return type

typing.Tuple[list, list]

Returns

  • real_target_list – List of real-profiled target ground truth

  • inferred_target_list – List of inferred target data for comparison

Example

>>> import scSemiProfiler as semi
>>> from scSemiProfiler.utils import *
>>> name = 'project_name'
>>> representatives = [6, 10, 5, 7]
>>> real_target_list, inferred_target_list = global_stop_checking(name = name, representatives =representatives, n_target = 2 )
>>> # downstram analysis comparing real targets and inferred targets