matchSegments: Matching the segment of interest to the corresponding...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The algorithm makes use of a fuzzy logic approach to match the segment of interest to the corresponding reference

Usage

1
matchSegments(refSp, intSp, intSegments, refSegments, MAX_DIST_FACTOR, MIN_RC)

Arguments

refSp

a vector specifying the spectrum of reference

intSp

a vector specifying the spetcrum of interest (test spectrum)

intSegments

a list characterizing the segments of spectrum of interest

refSegments

a list characterizing the segments of the reference spectrum (start, end, peaks, center)

MAX_DIST_FACTOR

distance matching parameter (0.5*peak_width)

MIN_RC

minimum resamblance coefficient

Details

Algorithm:

  1. pick-up segment of interest

  2. pick-up reference segments

  3. calculate relative distance between them

  4. calculate relative resamblance between them

  5. find min value of relative distance and resamblance

  6. use it as representative of similiarity between target and reference segments

  7. find the segment that has the highest value of both relative distance and resamblance

Value

A list:

testSegs

a list characterizing the matched test segments

refSegs

a list characterizing the matched 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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## 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

##segmentate a test spectrum
testSegments<- segmentateSp(Sp[1,], peakParam) # segmentate test spectrum (1st sample)

##attach test and reference segments
attachedSegs<-attachSegments(refSegments,testSegments)

##Match test and reference segments
attach(attachedSegs)
Segs<-matchSegments(refSp,Sp[1,],testSegmentsNew,refSegmentsNew,MAX_DIST_FACTOR, MIN_RC)

lhedjazi/mQTL.NMR documentation built on May 31, 2019, 10:47 p.m.