ProjecTILs.classifier | R Documentation |
Apply label transfer to annotate a query dataset with the cell types of a reference object. Compared to Run.ProjecTILs, only cell labels are returned. The low-dim embeddings of the query object (PCA, UMAP) are not modified.
ProjecTILs.classifier(
query,
ref = NULL,
filter.cells = TRUE,
split.by = NULL,
reduction = "pca",
ndim = NULL,
k = 5,
nn.decay = 0.1,
min.confidence = 0.2,
labels.col = "functional.cluster",
overwrite = TRUE,
ncores = 1,
...
)
query |
Query data, either as single Seurat object or as a list of Seurat object |
ref |
Reference Atlas - if NULL, downloads the default TIL reference atlas |
filter.cells |
Pre-filter cells using 'scGate'. Only set to FALSE if the dataset has been previously subset to cell types represented in the reference. |
split.by |
Grouping variable to split the query object (e.g. if the object contains multiple samples) |
reduction |
The dimensionality reduction used to assign cell type labels |
ndim |
The number of dimensions used for cell type classification |
k |
Number of neighbors for cell type classification |
nn.decay |
Weight decay for internal nearest neighbors (between 0 and 1) |
min.confidence |
Minimum confidence score to return cell type labels (otherwise NA) |
labels.col |
The metadata field with label annotations of the reference, which will be transferred to the query dataset |
overwrite |
Replace any existing labels in |
ncores |
Number of cores for parallel processing |
... |
Additional parameters to make.projection |
See load.reference.map to load or download a reference atlas. See Run.ProjecTILs to embed the query in the same space of the reference
The query object with a additional metadata columns containing predicted cell labels and confidence scores for the predicted cell labels If cells were filtered prior to projection, they will be labeled as 'NA'
data(query_example_seurat)
ref <- load.reference.map()
q <- ProjecTILs.classifier(query_example_seurat, ref=ref)
table(q$functional.cluster, useNA="ifany")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.