correctBatchFSPY {flowSpy} | R Documentation

## correctBatchFSPY

### Description

Remove batch effect in FSPY object

### Usage

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

### Arguments

`object` | An FSPY 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

An FSPY object after removing batch effect

An FSPY object with corrected batch effects

### See Also

`findKNN`

### Examples

    if (FALSE) {
      plot.meta <- fetchPlotMeta(fspy)
      batch <- as.numeric(plot.meta$stage)
      fspy <- correctBatchFSPY(object, batch = batch)
    }

[Package flowSpy version 1.4.0 Index]