ComBat adjusted object
bc_combat.Rd
This function returns a pmart object that has been undergone ComBat batch effect correction
Arguments
- omicsData
an object of the class 'pepData', 'proData', 'metabData', 'lipidData', or 'nmrData', usually created by
as.pepData
,as.proData
,as.metabData
,as.lipidData
, oras.nmrData
, respectively.- use_groups
logical argument indicating if the group designation should be applied to the data for batch correction. Defaults to FALSE. If TRUE, ComBat runs with both a batch effect and a group designation
Examples
library(malbacR)
library(pmartR)
data("pmart_amide")
pmart_amide <- edata_transform(pmart_amide,"log2")
pmart_amide <- group_designation(pmart_amide,main_effects = "group",batch_id = "batch")
pmart_amide <- normalize_global(pmart_amide,subset_fn = "all",norm_fn = "median",
apply_norm = TRUE,backtransform = TRUE)
amide_combat <- bc_combat(omicsData = pmart_amide, use_groups = FALSE)
#> Found3batches
#> Adjusting for0covariate(s) or covariate level(s)
#> Found3562Missing Data Values
#> Standardizing Data across genes
#> Fitting L/S model and finding priors
#> Finding parametric adjustments
#> Adjusting the Data