Skip to contents

Applies probabilistic quotient normalisation (PQN) to NMR spectra, optionally preceded by total area normalisation and binning.

Usage

pqn(X, iref = NULL, TArea = FALSE, add_DilF = "dquot", bin = NULL)

Arguments

X

A numeric matrix or data.frame. Each row is a sample spectrum, and each column is a chemical shift variable.

iref

Integer vector of row indices in X used to compute the reference spectrum. If NULL, all rows are used.

TArea

Logical. If TRUE, total area normalisation is applied before PQN.

add_DilF

Character. Name of global variable to store dilution factors. Set to NULL to disable.

bin

Optional named list for binning (e.g., list(ppm = ppm, width = 0.05)). If NULL, binning is not applied.

Value

A matrix with the same dimensions as X, containing PQN-normalised spectra.

Details

PQN accounts for sample dilution effects by normalising each spectrum using the median quotient relative to a reference spectrum. This reference is typically the median spectrum of QC samples or the entire dataset.

Total area normalisation (TArea = TRUE) may help standardise sample intensities, but can distort profiles in some cases.

If binning is applied, the function uses a reference spectrum computed on binned data.

References

Dieterle F, Ross A, Schlotterbeck G, Senn H (2006). Probabilistic Quotient Normalization as Robust Method to Account for Dilution of Complex Biological Mixtures. Analytical Chemistry, 78(13), 4281–4290.

Examples

data(covid)
X <- covid$X

Xn <- pqn(X, add_DilF = "dilutionFactor")
plot(dilutionFactor)