Learn R Programming

mQTL.NMR (version 1.6.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
a vector defining the 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
a list specifying the new test segments
refSegmentsNew
a list specifying the 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

## Data
load_datafiles()
Sp<-t(read.table(phenofile))
ppm<-as.numeric(colnames(Sp))

## Normalization
normSp<-normalise(abs(Sp),'CS')

##Segmentation and matching parameters
setupRSPA(ppm)

##reference spectrum selection
attach(normSp)
index<-selectRefSp(Sp,recursion$step)
refSp<-Sp[index,]

##segmentate a reference spectrum
refSegments<- segmentateSp(refSp, peakParam) # segmentate reference spectrum

Run the code above in your browser using DataLab