runSCANORAMA: Apply the mutual nearest neighbors (MNN) batch effect...

View source: R/runBatchCorrection.R

runSCANORAMAR Documentation

Apply the mutual nearest neighbors (MNN) batch effect correction method to SingleCellExperiment object

Description

SCANORAMA is analogous to computer vision algorithms for panorama stitching that identify images with overlapping content and merge these into a larger panorama.

Usage

runSCANORAMA(
  inSCE,
  useAssay = "logcounts",
  batch = "batch",
  assayName = "SCANORAMA",
  SIGMA = 15,
  ALPHA = 0.1,
  KNN = 20,
  approx = TRUE
)

Arguments

inSCE

Input SingleCellExperiment object

useAssay

A single character indicating the name of the assay requiring batch correction. Scanorama requires a transformed normalized expression assay. Default "logcounts".

batch

A single character indicating a field in colData that annotates the batches of each cell; or a vector/factor with the same length as the number of cells. Default "batch".

assayName

A single characeter. The name for the corrected assay. Will be saved to assay. Default "SCANORAMA".

SIGMA

A numeric scalar. Algorithmic parameter, correction smoothing parameter on Gaussian kernel. Default 15.

ALPHA

A numeric scalar. Algorithmic parameter, alignment score minimum cutoff. Default 0.1.

KNN

An integer. Algorithmic parameter, number of nearest neighbors to use for matching. Default 20.

approx

Boolean. Use approximate nearest neighbors, greatly speeds up matching runtime. Default TRUE.

Value

The input SingleCellExperiment object with assay(inSCE, assayName) updated.

References

Brian Hie et al, 2019

Examples

## Not run: 
data('sceBatches', package = 'singleCellTK')
logcounts(sceBatches) <- log1p(counts(sceBatches))
sceCorr <- runSCANORAMA(sceBatches, "ScaterLogNormCounts")

## End(Not run)

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.