correct_batch_effects {proBatch} | R Documentation |
Batch correction method allows correction of continuous sigal drift within batch and discrete difference across batches.
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, ...)
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 |
discreteFunc |
function to use for discrete
batch correction ( |
batch_col |
column in |
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 |
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 |
data_matrix
-size data matrix with batch-effect
corrected by fit and discrete functions
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)