cellstate.predict | R Documentation |
This function uses a nearest-neighbor algorithm to predict a feature (e.g. the cell state) of the query cells. Distances between cells in the reference map and cells in the query are calculated in a reduced space (PCA or UMAP) and the feature is assigned to query cells based on a consensus of its nearest neighbors in the reference object.
cellstate.predict(
ref,
query,
reduction = "pca",
ndim = NULL,
k = 5,
min.confidence = 0.2,
nn.decay = 0.1,
labels.col = "functional.cluster"
)
ref |
Reference Atlas |
query |
Seurat object with query data |
reduction |
The dimensionality reduction used to calculate pairwise distances. One of "pca" or "umap" |
ndim |
How many dimensions in the reduced space to be used for distance calculations |
k |
Number of neighbors to assign the cell type |
min.confidence |
Minimum confidence score to return cell type labels (otherwise NA) |
nn.decay |
Weight decay for internal nearest neighbors (between 0 and 1) |
labels.col |
The metadata field of the reference to annotate the clusters (default: functional.cluster) |
The query object submitted as parameter, with two additional metadata slots for predicted state and its confidence score
data(query_example_seurat)
ref <- load.reference.map()
q <- make.projection(query_example_seurat, ref=ref)
q <- cellstate.predict(ref, query=q)
table(q$functional.cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.