Run.ProjecTILs: Project a query scRNA-seq dataset onto a reference atlas

View source: R/main.R

Run.ProjecTILsR Documentation

Project a query scRNA-seq dataset onto a reference atlas

Description

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.

This function acts as a wrapper for make.projection and cellstate.predict

Usage

Run.ProjecTILs(
  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",
  ...
)

Arguments

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, based on majority voting of nearest neighbors between reference and query.

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 of the reference to annotate the clusters

...

Additional parameters to make.projection

Details

See load.reference.map to load or download a reference atlas. See also ProjecTILs.classifier to use ProjecTILs as a cell type classifier.

Value

An augmented Seurat object with projected UMAP coordinates on the reference map and cell classifications

Examples

data(query_example_seurat)
ref <- load.reference.map()
q <- Run.ProjecTILs(query_example_seurat, ref=ref, fast.umap.predict=TRUE)
plot.projection(ref=ref, query=q)

carmonalab/ProjecTILs documentation built on April 13, 2025, 10:04 p.m.