
Seurat label transfer
transfer_labels_seurat_sc.RdSeurat's FindTransferAnchors(reduction = "cca") between the kept cells of
both experiments on shared genes, then TransferData(): the anchor labels
weighted per query cell in weight_embedding. For RNA to ATAC the query is
the gene activity from gene_activity_sc() and the weights come
from the ATAC LSI, as in the Signac vignette; RNA to RNA works the same with
the query PCA.
The predictions and their confidence are written to the query's obs as
predicted_<label_column> and confidence_<label_column>.
Usage
transfer_labels_seurat_sc(
reference,
query,
label_column,
weight_embedding,
features = NULL,
transfer_params = params_sc_seurat_transfer(),
seed = 42L,
.verbose = TRUE
)Arguments
- reference
SingleCellsclass. The annotated experiment (RNA).- query
SingleCellsclass. The experiment to label (RNA or gene activity), matched to the reference ongene_id.- label_column
String. Reference obs column with the labels. Missing labels form a level of their own.
- weight_embedding
Numeric matrix. Kept query cells x dimensions for the weights, e.g. the
"lsi"embedding of the ATAC side. Rows are matched to the query by position; with row names, those are checked against the kept query cells.- features
Optional character vector. Gene ids to anchor on.
NULLuses the reference HVGs. Only those in both experiments are used.- transfer_params
List. Output of
params_sc_seurat_transfer().- seed
Integer. Seed of the kNN backend.
- .verbose
Boolean or integer. Controls verbosity.