Learn R Programming

mQTL.NMR (version 1.6.0)

peakPeaks: Peak picking algorithm

Description

Identification of peaks in metabolomic data based on the calculation of smoothed derivates using Savitzky-Golay filter. The peak is identified if derivative crosses zero, i.e. sign(X'(i))>sing(X'(i+1)).

Usage

peakPeaks(SpSmooth, dpDerivs, Sp)

Arguments

SpSmooth
a vector specifying smoothed spectrum
dpDerivs
a vector specifying smoothed derivative of the spectrum
Sp
a vector specifying the spectrum of intrest

Value

identified peaks

References

Veselkov,K. et al (2009) Recursive Segment-Wise Peak Alignment of Biological 1H NMR Spectra for Improved Metabolic Biomarker Recovery, Anal. Chem., 81(1), 56-66.

See Also

sgolayDeriv

Examples

Run this code

load_datafiles()
Sp<-t(read.table(phenofile))

## Peak picking
Spectrum<-Sp[1,]
iOrder <- 3
iFrameLen<- 11

SpDerivs<-sgolayDeriv(Spectrum,iOrder,iFrameLen,2)
SpSmooth<-sgolayDeriv(Spectrum,iOrder,iFrameLen,1)
peaks<-peakPeaks(SpSmooth,SpDerivs,Spectrum)

Run the code above in your browser using DataLab