Learn R Programming

mQTL (version 1.0)

segmentateSp: Segmentation of a spectrum of interest

Description

Determination of highly intensive peaks in the spectrum of interest and subsequent concatenation of closely located peaks into larger segments

Usage

segmentateSp(Sp, peakParam)

Arguments

Sp

spectrum

peakParam

a list:

  • ampThr: amplitude threshold [default 2*median(peaksMaxValues)]

  • iFrameLen: Savitzky-Golay frame length

  • iOrder: polynomial order of Savitzky - Golay filter

  • iFrameLen: Savitzky-Golay frame length

  • minPeakWidth: min peak size

  • ppmDist: distance to concatenate adjacent peaks

Value

A list:

testSegmentsNew

new test segments

refSegmentsNew

new reference segments

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

attachSegments, matchSegments

Examples

Run this code
# NOT RUN {
# Data

Sp=matrix(rnorm(10*13454,mean=0,sd=1), nrow=10,ncol=13454)

##Segmentation parameters

peakParam=list()
peakParam$ppmDist <- 0.03# (ppm)  # distance to concatenate adjacent peaks #default 0.03# 
peakParam$ampThr <- 0.3 # amplitude value to threshold small peaks # 
peakParam$minPeakWidth <- 0.005 #min peak width in ppm scale
peakParam$iFrameLen<-11 #Savitzky-Golay frame length in ppm scale
peakParam$iOrder<-3 #polynomial order of Savitzky - Golay filter
peakParam$peakEdgeMax<-0.2 

#segmentate a test spectrum (10th sample)

Spectr<-Sp[10,]
testSegments<- segmentateSp(Spectr, peakParam) 
# }

Run the code above in your browser using DataLab