This function performs batch centering correction of each feature. Optionally, the scale of batches can be equalized across batches.The selected QC types (reference_qc_types) are used to calculate the medians and align all other qc types based on them. The correction can be applied to one of three variables: "intensity", "norm_intensity", or "conc". The correction can be applied on top of previous corrections or replace all previous batch corrections.
Usage
correct_batch_centering(
data = NULL,
variable,
reference_qc_types,
correct_location = TRUE,
correct_scale = FALSE,
replace_previous = TRUE,
log_transform_internal = TRUE,
...
)
Arguments
- data
A MidarExperiment object containing the data to be corrected. This object must include information about QC types and measurements.
- variable
The variable to be corrected. Must be one of "intensity", "norm_intensity", or "conc".
- reference_qc_types
A character vector specifying the QC types to be used as reference for batch centering.
- correct_location
A logical value indicating whether to align the median locations (centers) of the batches. Defaults to TRUE.
- correct_scale
A logical value indicating whether to scale the batches to the same level (equalize scale). Defaults to FALSE.
- replace_previous
A logical value indicating whether to replace any previous batch correction or apply the new correction on top. Defaults to TRUE (replace).
- log_transform_internal
A logical value indicating whether to log-transform the data internally during correction. Defaults to TRUE.
- ...
Additional parameters that can be passed to the batch correction function.