Skip to contents

Removes standard chemical shift regions from 1D \(^1\)H NMR spectra typically excluded from metabolomics analysis.

Usage

excise1d(X, ppm)

Arguments

X

Numeric matrix. NMR spectra with rows representing samples and columns representing chemical shift variables.

ppm

Numeric vector. Chemical shift positions (in ppm), must match number of columns in X.

Value

A list with:

  • Xc: Numeric matrix with excised chemical shift regions removed.

  • ppc: Numeric vector of ppm values corresponding to Xc.

Details

The following regions are removed:

  • Upfield noise: min(ppm) to 0.25 ppm

  • Residual water: 4.5 to 5.2 ppm

  • Urea region: 5.5 to 6.0 ppm

  • Downfield noise: 9.7 ppm to max(ppm)

Author

Torben Kimhofer

Examples

set.seed(1)
ppm <- seq(0, 10, length.out = 1000)
X <- matrix(rnorm(100 * length(ppm)), nrow = 100)
result <- excise1d(X, ppm)
dim(result$Xc)
#> [1] 100 825
length(result$ppc)
#> [1] 825