modelling_norm: LOESS normalization

View source: R/process.R

modelling_normR Documentation

LOESS normalization

Description

Normalization data by machine learning modelling, eg. locally estimated scatterplot smoothing (LOESS) on QC samples in each batch. For each metabolite, the values (eg. raw peak area data) were divided by the median value of QC samples in that batch. QC samples and metabolite batches should be specified (see parameters below).

Usage

modelling_norm(
  object,
  method = c("LOESS", "KNN", "XGBoost"),
  feature_platform = "PLATFORM",
  QC_ID_pattern = "MTRX",
  span = 0.75,
  degree = 2,
  k = 3,
  test = FALSE,
  verbose = TRUE
)

Arguments

object

A Metabolite object. In the feature annotation slot 'feature', a platform column should be provided for metabolite measurement platform (eg. 'PLATFORM'). The values in the 'PLATFORM' column (eg. 'Neg', 'Polar', 'Pos Early', and 'Pos Late') are column names in the sample annotation 'sample' to determine the batches of samples.

method

Modelling method for the normalization, currently support LOESS and KNN.

feature_platform

The column name of feature platform for metabolite measurements (eg. 'PLATFORM').

QC_ID_pattern

A character pattern to determine QC samples. Default value: "MTRX".

span

default value 0.4

degree

default value 2

k

Number of neighbors in KNN modelling (default value 3)

test

test the function for the first 20 columns.

verbose

print log information.

Value

A Metabolite object after normalization.

See Also

batch_norm


metabolomicsR documentation built on April 29, 2022, 9:05 a.m.