scSemiProfiler.utils.assemble_representatives

scSemiProfiler.utils.assemble_representatives(name, celltype_key='celltypes', sample_info_keys=['states_collection_sum'], rnd=2, batch=2, gtsc='example_data/scdata.h5ad', gtbulk='example_data/bulkdata.h5ad')[source]

Assemble previous round of inferred representative data and annotate the cell type. The real-profiled representatives in the current round is also provided for comparison.

Parameters
  • name (str) – Project name

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

  • sample_info_keys (list) – Keys for other sample-level information to be stored in the assembled dataset

  • rnd (int) – The round of semi-profiling to assemble. For example, select the second round (2 batches of representatives) using rnd = 2

  • batch (int) – The representative selection batch size

  • gtsc (str) – Path to ground truth data

  • gtbulk (str) – Path to bulk data

Return type

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

Returns

  • realrepdata – The real-profiled representative dataset

  • infrepdata – The inferred representative dataset

Example

>>> real_rep, inferred_rep = assemble_representatives(name,celltype_key='celltypes',sample_info_keys = ['states_collection_sum'],rnd=2,batch=2)