Normalization data by the median value of the nearest QC samples. For each metabolite, the values (eg. raw peak area data) were divided by the median value of nearest QC samples (eg. the nearest three QC samples). To identify the nearest QC samples, @assayData should be ordered by the injection order.

## Usage

nearestQC_norm(
object,
n_nearest_QCsample = 3,
feature_platform = "PLATFORM",
QC_ID_pattern = "MTRX",
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.

n_nearest_QCsample

Number of nearest QC samples to calculate the median value. The default value is 3 (an outlier QC sample might be used if only n_nearest_QCsample = 1).

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".

test

test the function for the first 20 columns.

verbose

## Value

A Metabolite object after normalization.

batch_norm, QCmatrix_norm