run.rpca: Run rPCA for batch correction

View source: R/run.rpca.R

run.rpcaR Documentation

Run rPCA for batch correction

Description

Use Seurat rPCA to do batch correction. For more details on rPCA, see https://satijalab.org/seurat/articles/integration_rpca.html.

Usage

run.rpca(dat, use.cols, batch.col, reference = NULL, k.anchor = 5)

Arguments

dat

NO DEFAULT. A data.table

use.cols

NO DEFAULT. A vector of character column names to apply batch correction to.

batch.col

Character. The column in the data in data.table that identifies which batch each cell belongs to.

reference

DEFAULT NULL. Whether to align to batches to a given batch. If yes, then supply this parameter with the name of the batch you want to align the other batches to.

k.anchor

DEFAULT 5. Passed to Seurat's FindIntegrationAnchors function. Essentially, it determines the number of neighbors (k) to use when Seurat's FindIntegrationAnchors is picking anchors.

Value

batch corrected data.table


ImmuneDynamics/Spectre documentation built on Oct. 12, 2024, 7:55 p.m.