omicverse.single.AnnotationRef#
- class omicverse.single.AnnotationRef(adata_query, adata_ref, celltype_key='celltype')[源代码]#
Reference-based label transfer helper for single-cell annotation.
- 参数:
adata_query (AnnData) – Query AnnData that needs cell-type annotation.
adata_ref (AnnData) – Reference AnnData with known cell-type labels.
celltype_key (str) – Column name in
adata_ref.obscontaining reference cell-type labels.
- 返回:
Initializes concatenated query/reference data and checks feature overlap.
- 返回类型:
None
Methods
__init__(adata_query, adata_ref[, celltype_key])predict([method, n_neighbors, pred_key, ...])Transfer reference labels to query cells using weighted kNN.
preprocess([mode, n_HVGs, batch_key])Preprocess concatenated query/reference data for robust label transfer.
train([method])Train/compute an integrated embedding used for reference label transfer.