% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{make.projection}
\alias{make.projection}
\title{Project a query scRNA-seq dataset onto a reference atlas}
\usage{
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
)
}
\arguments{
\item{query}{Query data, either as single Seurat object or as a list of Seurat object}

\item{ref}{Reference Atlas - if NULL, downloads the default TIL reference atlas}

\item{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.}

\item{query.assay}{Which assay slot to use for the query (defaults to DefaultAssay(query))}

\item{direct.projection}{If true, apply PCA transformation directly without alignment}

\item{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.}

\item{STACAS.correction.scale}{Slope of sigmoid function used to determine strength of batch effect correction.}

\item{STACAS.k.anchor}{Integer. For alignment, how many neighbors (k) to use when picking anchors.}

\item{STACAS.k.weight}{Number of neighbors to consider when weighting anchors.
Default is "max", which disables local anchor weighting.}

\item{skip.normalize}{By default, log-normalize the count data.
If you have already normalized your data, you can skip normalization.}

\item{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)}

\item{ortholog_table}{Dataframe for conversion between ortholog genes
(by default package object \code{Hs2Mm.convert.table})}

\item{scGate_model}{scGate model used to filter target cell type from query data
(if NULL use the model stored in \code{ref@misc$scGate})}

\item{ncores}{Number of cores for parallel execution (requires \link{BiocParallel})}

\item{progressbar}{Whether to show a progress bar for projection process or not (requires \link{BiocParallel})}
}
\value{
An augmented Seurat object with projected UMAP coordinates on the reference map
}
\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:
\itemize{
 \item{pre-processing: optional steps which might include pre-filtering of cells by markers using `scGate`,
data normalization, and ortholog conversion.}
 \item{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)}
 \item{embedding of corrected query data in the reduced-dimensionality spaces (PCA and UMAP) of the reference map.}
}
}
\details{
See \link{load.reference.map} to load or download a reference atlas. See
also \link{ProjecTILs.classifier} to use ProjecTILs as a cell type classifier.
}
\examples{
data(query_example_seurat)
ref <- load.reference.map()
make.projection(query_example_seurat, ref=ref)
}
