
MetCorR: GAM-based batch/order correction for metabolomics peak table
Source:R/MetCorR.R
MetCorR.Rd
Corrects intensity matrices using GAM fits on QC samples. Two modes:
y ~ s(order)
y ~ s(order, batch)
Arguments
- method
Integer; 1 or 2. Default 2. 1 - one feature mode, only run order; 2 - two features mode, run order & batch index.
- int_data
A data.frame of intensities (rows = samples, cols = features).
- order
Numeric or coercible; injection order per sample (length = nrow(int_data)).
- class
Character or factor; sample class/labels per sample (length = nrow(int_data)).
- batch
Numeric or coercible; batch index per sample (length = nrow(int_data)). Required for method 2.
- qc_label
Pattern used to identify QC rows in class via
grep(qc_label, class)
.