make.projection | R Documentation |
This function allows projecting ("query") single-cell RNA-seq datasets onto a reference map (i.e. a curated and annotated scRNA-seq dataset). To project multiple datasets, submit a list of Seurat objects with the query parameter. The projection consists of 3 steps:
pre-processing: optional steps which might include pre-filtering of cells by markers using 'scGate', data normalization, and ortholog conversion.
batch-effect correction: uses built-in STACAS algorithm to detect and correct for batch effects (this step assumes that at least a fraction of the cells in the query are in the same state than cells in the reference)
embedding of corrected query data in the reduced-dimensionality spaces (PCA and UMAP) of the reference map.
make.projection(
query,
ref = NULL,
filter.cells = TRUE,
query.assay = NULL,
direct.projection = FALSE,
STACAS.anchor.coverage = 0.7,
STACAS.correction.scale = 100,
STACAS.k.anchor = 5,
STACAS.k.weight = "max",
skip.normalize = FALSE,
fast.umap.predict = FALSE,
ortholog_table = NULL,
scGate_model = NULL,
ncores = 1,
progressbar = TRUE
)
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. |
query.assay |
Which assay slot to use for the query (defaults to DefaultAssay(query)) |
direct.projection |
If true, apply PCA transformation directly without alignment |
STACAS.anchor.coverage |
Focus on few robust anchors (low STACAS.anchor.coverage) or on a large amount of anchors (high STACAS.anchor.coverage). Must be number between 0 and 1. |
STACAS.correction.scale |
Slope of sigmoid function used to determine strength of batch effect correction. |
STACAS.k.anchor |
Integer. For alignment, how many neighbors (k) to use when picking anchors. |
STACAS.k.weight |
Number of neighbors to consider when weighting anchors. Default is "max", which disables local anchor weighting. |
skip.normalize |
By default, log-normalize the count data. If you have already normalized your data, you can skip normalization. |
fast.umap.predict |
Fast approximation for UMAP projection. Uses coordinates of nearest neighbors in PCA space to assign UMAP coordinates (credits to Changsheng Li for the implementation) |
ortholog_table |
Dataframe for conversion between ortholog genes
(by default package object |
scGate_model |
scGate model used to filter target cell type from query data
(if NULL use the model stored in |
ncores |
Number of cores for parallel execution (requires BiocParallel) |
progressbar |
Whether to show a progress bar for projection process or not (requires BiocParallel) |
See load.reference.map to load or download a reference atlas. See also ProjecTILs.classifier to use ProjecTILs as a cell type classifier.
An augmented Seurat object with projected UMAP coordinates on the reference map
data(query_example_seurat)
ref <- load.reference.map()
make.projection(query_example_seurat, ref=ref)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.