correct_batch_effects {proBatch}R Documentation

Batch correction method allows correction of continuous sigal drift within batch and discrete difference across batches.

Description

Batch correction method allows correction of continuous sigal drift within batch and discrete difference across batches.

Usage

correct_batch_effects(data_matrix, sample_annotation,
  fitFunc = "loess_regression", discreteFunc = c("MedianCentering",
  "ComBat"), batch_col = "MS_batch",
  feature_id_col = "peptide_group_label",
  sample_id_col = "FullRunName", measure_col = "Intensity",
  sample_order_col = "order", abs_threshold = 5, pct_threshold = 0.2,
  ...)

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

fitFunc

function to use for the fit (currently only loess_regression available)

discreteFunc

function to use for discrete batch correction (MedianCentering or ComBat)

batch_col

column in sample_annotation that should be used for batch comparison

feature_id_col

name of the column with feature/gene/peptide/protein ID used in the long format representation df_long. In the wide formatted representation data_matrix this corresponds to the row names.

sample_id_col

name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)

measure_col

if df_long is among the parameters, it is the column with expression/abundance/intensity, otherwise, it is used internally for consistency

sample_order_col

column, determining the order of sample MS run, used as covariate to fit the non-linear fit

abs_threshold

the absolute threshold to filter data for curve fitting

pct_threshold

the percentage threshold to filter data for curve fitting

...

other parameters, usually of normalize_custom_fit, and fit_func

Value

data_matrix-size data matrix with batch-effect corrected by fit and discrete functions

Examples

batch_corrected_matrix <- correct_batch_effects(
example_proteome_matrix, example_sample_annotation, 
discreteFunc = 'MedianCentering', 
batch_col = 'MS_batch',  
span = 0.7,
abs_threshold = 5, pct_threshold = 0.20)


[Package proBatch version 1.0.0 Index]