findRef: Reference finding

Description Usage Arguments Details Value Author(s) References Examples

Description

This function is to heuristically detect a reference spectrum.

Usage

1
findRef(peakList)

Arguments

peakList

The peak lists of the spectra.

Details

This function is to heuristically detect a reference spectrum, see the reference for more details.

Value

refInd

The index of the reference spectrum found by the algorithm

orderSpec

A sorted array of the spectra by their goodness values

Author(s)

Trung Nghia Vu

References

Vu TN, Valkenborg D, Smets K, Verwaest KA, Dommisse R, Lemie're F, Verschoren A, Goethals B, Laukens K. (2011) An integrated workflow for robust alignment and simplified quantitative analysis of NMR spectrometry data. BMC Bioinformatics. 2011 Oct 20;12:405.

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
 

res=makeSimulatedData();
X=res$data;
groupLabel=res$label;


peakList <- detectSpecPeaks(X,
    nDivRange = c(128),                
    scales = seq(1, 16, 2),
    baselineThresh = 50000,
    SNR.Th = -1,
    verbose=FALSE
);


cat("\n Find the spectrum reference...")
resFindRef<- findRef(peakList);
refInd <- resFindRef$refInd;

cat("\n Order of spectrum for reference  \n");
for (i in 1:length(resFindRef$orderSpec))
    cat(paste(i, ":",resFindRef$orderSpec[i],sep=""), " ");
    
cat("\n The reference is: ", refInd);

nghiavtr/speaq documentation built on May 20, 2019, 5:27 p.m.