Applies probabilistic quotient normalisation (PQN) to NMR spectra, optionally preceded by total area normalisation and binning.
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. IfNULL
, 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)
). IfNULL
, binning is not applied.
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.