msNormalizeSNV: Standard Normal Variate Intensity Normalization

Description Usage Arguments Details Value References See Also Examples

Description

Normalizes the input spectrum via the Standard Normal Variate (SNV) transformation defined as X[t] = (X[t] - mean(X))/stdev(X), where X is the spectrum.

Usage

1
msNormalizeSNV(x, process="msNormalizeSNV")

Arguments

x

A vector containing a uniformly-sampled real-valued time series.

process

A character string denoting the name of the process to register with the (embedded) event history object of the input after processing the input data. This process is not updated if it already exists in the event history. Default: "msNormalizeSNV".

Details

This function can also produce scale-based normalization transformations if the input is a (partial) sum over multiresolution decomposition (MRD) components formed by taking a discrete wavelet transform of the input spectrum and subsequently inverting each level of the transform back to the "time" domain. The resulting components of the MRD form an octave-band decomposition of the original spectrum, and can be summed together to reconstruct the original spectrum. Summing only a subset of these components can be viewed as a denoising operation if the "noisy" components are excluded from the summation. The result is then normalized by the standard deviation of the sum of the details. As this function merely calls the msDenoiseMRD function with the argument normalize=TRUE, see that function for more details.

Value

A vector containing the scale-based normalization of the input spectrum.

References

I.S. Helland, T. Naes and T. Isaksson, Related versions of the multiplicative scatter correction method for preprocessing spectroscopic data, Chemometrics and Intelligent Laboratory Systems, 29:233–241, 1995.

T.W. Randolph, Scale-based normalization of spectral data, Cancer Biomarkers, 2:135–144, 2006.

T.W. Randolph and Y. Yasui, Multiscale Processing of Mass Spectrometry Data, Biometrics, 62:589–97, 2006.

See Also

msNormalize, msNormalizeTIC, msDenoiseWavelet, wavDaubechies, wavDWT, wavMODWT, wavMRD, eventHistory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (!exists("qcset")) data("qcset", package="msProcess")

## obtain a subset of a mass spectrum and add some
## noise
x <- qcset[5000:7000,1]
sd.noise <- 2
set.seed(100)
x$intensity <- x$intensity + rnorm(length(x), sd=sd.noise)
mz <- x$mz

## sum over specified MODWT MRD details and
## normalize
y <- msDenoise(x, FUN="mrd", levels=6:8, keep.smooth=FALSE)
z <- msNormalizeSNV(y)

## plot the results
old.plt <- par("plt")
par(plt=c(0.08,1,0.5,0.95))
plot(mz, x$intensity, type="l", xaxt="n", xlab="", ylab="xnoise")
par(plt=c(0.08,1,0.12,0.5), new=TRUE)
plot(mz, z$intensity, type="l", xlab="m/z", ylab="Normalized (D6+D7+D8)")
par(plt=old.plt)

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.