Skip to contents

# run_cytonorm

Source: `R/batch_correction.R`
`run_cytonorm.Rd`

Wrapper function around `CytoNorm.normalize` from the CytoNorm package.

## Usage

    run_cytonorm(
      fcd,
      batch_var,
      keep_fcs = TRUE,
      output_dir = paste0("./CytoNorm_output_", Sys.Date()),
      files = NULL,
      data_path = NULL,
      anno_table = NULL
    )

## Arguments

fcd

  flow cytometry dataset

batch_var

  Column name of batch variable from `fcd$anno$cell_anno`.

keep_fcs

  Boolean whether to keep the normalized FCS files in `output_dir`.

output_dir

  Directory to save normalized FCS files temporary or permanently, if `keep_fcs == TRUE`.

files

  Vector of fcs file names of samples which should be normalized. By default all files contained in the flow cytometry dataset are used.

data_path

  File path to folder where .fcs files contained in the fcd are stored.

anno_table

  Path to the annotation table file.

## Value

fcd with a normalized expression data frame saved in `fcd$expr$norm`.

## Details

run_cytonorm

This function assumes that your fcd contains a trained model computed by `train_cytonorm`. The function performs normalization of the samples contained in your fcd. The normalized expression values are added to your fcd and by default FCS files with the normalized values are written to the `output_dir`. See [Van Gassen et al., 2019](https://doi.org/10.1002/cyto.a.23904) for more details on CytoNorm.