A wrapper for transferring reference cell labels to the query via KNN method.

LabelTransfer(
  seu.q,
  reference,
  reduction.q = "ref.umap",
  ref.emb.col = paste0("UMAP_", 1:2),
  ref.label.col = "cluster.name",
  k = 10
)

Arguments

seu.q

A query Seurat object.

reference

Reference model.

reduction.q

Reduction name storing projected reference embeddings. Default is 'ref.umap'.

ref.emb.col

The column names storing the reference embeddings in reference model.

ref.label.col

The column name storing the cell labels to be transferred.

k

The K param for KNN model. Default is 10.

Value

A Seurat object. The predicted cell type is store in 'knn.pred.celltype' column.