Subset Optimisation by Reference Matching (STORM)
Arguments
- X
Numeric matrix or dataframe where each row represents a NMR spectrum and each column a chemical shift variable.
- ppm
num array of chemical shift variables, matched to columns in X
- b
int, expected signal width / chemical shift window size, provided as positive integer in chemichal shift space
- q
num, p value threshold for including spectral variable in the updated reference
- idx.refSpec
int, reference spectrum defined as row index for X
- shift
num array, min and max chemical shift value defining narrow boundary of the target signal
Details
The STORM algorithm can be used to subselect NMR spectra based on a spectrocopic target signal to match multiplicity and chemical shift position. The output are row-indices for X, defining the optimal spectral subset that is typically used as input for STOCSY.
References
Posma, Joram M., et al. "Subset optimization by reference matching (STORM): an optimized statistical approach for recovery of metabolic biomarker structural information from 1H NMR spectra of biofluids." Analytical chemistry 84.24 (2012): 10694-10701.
See also
stocsy
Other NMR:
alignSegment()
,
binning()
,
cvanova()
,
get_idx()
,
lw()
,
matspec()
,
noise.est()
,
normErectic()
,
read1d()
,
read1d_raw()
,
stocsy1d_metabom8-class
Examples
set.seed(123)
n <- 100; S <- 1000
ppm <- seq(10, 0, length.out = S)
gauss <- function(x, c, w, h) h * exp(-((x - c)^2) / (2 * w^2))
sig1 <- gauss(ppm, 7, 0.05, 10)
sig2 <- gauss(ppm, 3.5, 0.1, 8)
sig3 <- gauss(ppm, 1, 0.07, 5)
spectra <- matrix(0, n, S)
for(i in 1:n) {
spectra[i, ] <- sig1 + sig2 + rnorm(S, 0, 0.1)
if(i <= 25) spectra[i, ] <- spectra[i, ] + sig3
}
tt=storm(X=spectra, ppm=ppm, b=30, q=0.05, idx.refSpec=1, shift=c(0.75,1.25))