Apply per-batch model adjustment of feature abundances

withinBatchAdjust adjusts feature abundances within each batch based on the model provided with parameter models (which are fitted using the withinBatchFit() function.

withinBatchAdjust(
  x,
  models,
  batch = x$batch,
  assay = "norm",
  log.transform = TRUE,
  ...
)

Arguments

x

SummarizedExperiment with the feature abundances that should be adjusted.

models

list of per-batch feature-wise model fits as returned by withinBatchFit().

batch

factor defining the batch assignment of samples in x.

assay

character(1) with the name of the assay matrix in x that should be adjusted. Defaults to "norm".

log.transform

logical(1) defining whether the model fit has been performed in log scale and the adjustment is also to be performed in log scale. Note that even if log.transform is TRUE adjusted feature abundances are returned in natural scale.

...

additional arguments to be passed to xcms:::applyModelAdjustment.

Value

SummarizedExperiment (input object x) with the feature abundances of assay assay adjusted based on the provided models models.

Author

Johannes Rainer