R: Segmentation of a spectrum of interest

segmentateSp {mQTL} | R Documentation

## 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

### Author(s)

Lyamine Hedjazi

### 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

    # 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)

[Package mQTL version 1.0 Index]