RunCanek: RunCanek

View source: R/RunCanek.R

RunCanekR Documentation

RunCanek

Description

Runs Canek integration.

Usage

RunCanek(x, ...)

## S3 method for class 'Seurat'
RunCanek(
  x,
  batches = NULL,
  slot = "data",
  assay = NULL,
  features = NULL,
  selection.method = "vst",
  nfeatures = 2000,
  fvf.nfeatures = 2000,
  integration.name = "Canek",
  debug = FALSE,
  correctEmbeddings = TRUE,
  pcaDim = NULL,
  maxLoop = 5,
  loopTol = 0.001,
  ...
)

## S3 method for class 'SingleCellExperiment'
RunCanek(
  x,
  batches = NULL,
  assay = "logcounts",
  integration.name = "Canek",
  debug = FALSE,
  ...
)

## S3 method for class 'list'
RunCanek(x, ...)

Arguments

x

object with expression counts or list of matrices.

...

additional arguments passed down to methods, e.g. ncores to parallelize MNN pair finding (see CorrectBatches; defaults to 1, sequential).

batches

for S4 objects the column containing batch information.

slot

slot used for Seurat objects (default: data).

assay

assay used for Seurat objects. If NULL (default), an existing "SCT" assay is preferred over the object's default assay.

features

optional vector of features to use for correction.

selection.method

method used for FindVariableFeatures on Seurat objects when features is NULL.

nfeatures

number of features returned by SelectIntegrationFeatures.

fvf.nfeatures

number of features returned by FindVariableFeatures.

integration.name

name for the integrated assay.

debug

whether to store information about correction vector.

correctEmbeddings

whether to perform the correction on PCA embeddings instead of gene expression (Seurat objects only).

pcaDim

number of PCA dimensions to use when correctEmbeddings is TRUE. If NULL (default), it is inferred from the object's existing "pca" reduction; if none is found, used 30 as default with a warning. When correctEmbeddings is TRUE and a "pca" reduction already exists on the object, it is reused directly instead of being recomputed. If the assay in use is SCTransform-normalized and no "pca" reduction exists, an error is raised instead of computing one internally, since SCTransform fit separately per batch produces residuals that are not on a comparable scale across batches.

maxLoop

number of times to iterate the correction (correctEmbeddings = TRUE only), using each iteration's corrected result as the input to the next. Defaults to 5.

loopTol

average change in median correction magnitude used to stop iterating early. Defaults to 1e-3. Ignored if maxLoop = 1.

Value

An object of the appropriate type.


Canek documentation built on July 18, 2026, 1:06 a.m.