hClustAlign: CluPA function for two spectra.

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

Description

This function implements the idea of the CluPA algorithm to align the target spectrum against the reference spectrum.

Usage

1
2
3
4
5
6
7
8
9
hClustAlign(refSpec,
        tarSpec,
        peakList,
        peakLabel,
        startP,
        endP,
        distanceMethod = "average",
        maxShift = 0,
        acceptLostPeak = FALSE)

Arguments

refSpec

The reference spectrum.

tarSpec

The target spectrum.

peakList

List of peaks of the both reference and target spectra

peakLabel

The list of the labels of the peaks

startP

The starting point of the segment.

endP

The ending point of the segment.

distanceMethod

The distance method for the hierarchial clustering algorithm.

maxShift

The maximum number of points for a shift step.

acceptLostPeak

This is an option for users, TRUE is the default value. If the users believe that all the peaks in the peak list are true positive, change it to FALSE.

Details

This function implements the idea of the CluPA algorithm to align the target spectrum against the reference spectrum.

Value

tarSpec

The target spectrum after alignment

peakList

The peak list after alignment

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.

See Also

dohCluster

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


resFindRef<- findRef(peakList);
refInd <- resFindRef$refInd;

tarInd=1;
refSpec=X[refInd,];
tarSpec=X[tarInd,];

mergedPeakList=c(peakList[[refInd]],peakList[[tarInd]]);
mergedPeakLabel=double(length(mergedPeakList));
for (i in 1:length(peakList[[refInd]]) ) mergedPeakLabel[i]=1;
startP=1;
endP=length(tarSpec);
res=hClustAlign(refSpec,tarSpec,mergedPeakList,mergedPeakLabel,startP,endP,
        maxShift=50,acceptLostPeak=TRUE)

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