correct_with_ComBat {proBatch} | R Documentation

## Adjusts for discrete batch effects using ComBat

### Description

Standardized input-output ComBat normalization ComBat allows users to adjust for batch effects in datasets where the batch covariate is known, using methodology described in Johnson et al. 2007. It uses either parametric or non-parametric empirical Bayes frameworks for adjusting data for batch effects. Users are returned an expression matrix that has been corrected for batch effects. The input data are assumed to be cleaned and normalized before batch effect removal.

### Usage

    correct_with_ComBat(data_matrix, sample_annotation,
      sample_id_col = "FullRunName", batch_col = "MS_batch",
      par.prior = TRUE)

### Arguments

`data_matrix` | features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. Usually the log transformed version of the original data
`sample_annotation` | data frame with sample ID, technical (e.g. MS batches) and biological (e.g. Diet) covariates
`sample_id_col` | name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)
`batch_col` | column in `sample_annotation` that should be used for batch comparison
`par.prior` | whether parametrical or non-parametrical prior should be used

### Value

`data_matrix`-size data matrix with batch-effect corrected by `ComBat`

### Examples

    combat_corrected_matrix <- correct_with_ComBat(
    example_proteome_matrix, example_sample_annotation)

[Package proBatch version 1.0.0 Index]