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 namecelltype_key (
str) – The key in .obs specifying the cell type informationsample_info_keys (
list) – Keys for other sample-level information to be stored in the assembled datasetrnd (
int) – The round of semi-profiling to assemble. For example, select the second round (2 batches of representatives) using rnd = 2batch (
int) – The representative selection batch sizegtsc (
str) – Path to ground truth datagtbulk (
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)