Bucketing: Spectral data reduction

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Bucketing.R

Description

Reduces the number of data points by aggregating intensities into buckets.

Usage

1
2
Bucketing(Spectrum_data, width = FALSE, mb = 500, boundary = NULL, 
          intmeth = c("r", "t"), tolbuck = 10^-4, verbose = FALSE)

Arguments

Spectrum_data

Matrix containing the spectra in ppm, one row per spectrum.

width

If width is TRUE, then m represents the buckets width, otherwise, it represents the number of buckets.

mb

The number of buckets OR the buckets' width. If mb represents the number of buckets, it should be an integer smaller or equal to the number of frequencies in Spectrum_data.

boundary

Numeric vector of left and right boundaries for ppm integration.

intmeth

Type of bucketing: rectangular ("r") or trapezoidal ("t"). See details below.

tolbuck

Tolerance threshold to check if the buckets of the original spectra are of constant length.

verbose

If"TRUE", will print processing information.

Details

It is important to note that the input spectrum can have its ppm axis in increasing or decreasing order and it does not have to be equispaced.

Bucketing has two main interests:

The ppm interval of Spectrum_data, let's say [a,b] where a > b, is divided into mb buckets of size (a-b)/mb. The new ppm scale contains the m centers of these intervals. The spectral intensity at these centers is the integral of the initial spectral intensity on this bucket using either trapezoidal or rectangular integration.

Value

Spectrum_data

The matrix of spectra with their new ppm axis.

Author(s)

Benoît Legat, Bernadette Govaerts & Manon Martin

References

Martin, M., Legat, B., Leenders, J., Vanwinsberghe, J., Rousseau, R., Boulanger, B., & Govaerts, B. (2018). PepsNMR for 1H NMR metabolomic data pre-processing. Analytica chimica acta, 1019, 1-13.

Rousseau, R. (2011). Statistical contribution to the analysis of metabonomics data in 1H NMR spectroscopy (Doctoral dissertation, PhD thesis. Institut de statistique, biostatistique et sciences actuarielles, Université catholique de Louvain, Belgium).

Examples

1
2
require(PepsNMRData)
Bucket.spec <- Bucketing(Data_HS_sp$Spectrum_data_HS_10, mb = 500)

ManonMartin/SOAP-NMR documentation built on Nov. 26, 2021, 8:46 p.m.