correctBatchCYT {CytoTree} | R Documentation

## correctBatchCYT

### Description

Remove batch effect in CYT object

### Usage

    correctBatchCYT(
      object,
      batch = NULL,
      par.prior = TRUE,
      mean.only = TRUE,
      verbose = FALSE,
      ...
    )

### Arguments

`object` | a CYT object
`batch` | vector. Batch covariate (only one batch allowed)
`par.prior` | logical. TRUE indicates parametric adjustments will be used, FALSE indicates non-parametric adjustments will be used.
`mean.only` | logical. FALSE If TRUE ComBat only corrects the mean of the batch effect (no scale adjustment)
`verbose` | logical. Whether to show log information
`...` | Parameters passing to `ComBat` function

### Value

A CYT object with corrected batch effects

### See Also

`findKNN`

### Examples

    cyt.file <- system.file("extdata/cyt.rds", package = "CytoTree")
    cyt <- readRDS(file = cyt.file)
    plot.meta <- fetchPlotMeta(cyt)
    batch <- as.numeric(plot.meta$stage)
    cyt <- correctBatchCYT(cyt, batch = batch)

[Package CytoTree version 1.0.3 Index]