hClustAlign | R Documentation |
This function implements the idea of the CluPA algorithm to align the target spectrum against the reference spectrum.
hClustAlign( refSpec, tarSpec, peakList, peakLabel, startP, endP, distanceMethod = "average", maxShift = 0, acceptLostPeak = FALSE )
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 hierarchical 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. |
list of 2: tarSpec (The target spectrum after alignment) and peakList (The peak list after alignment)
Trung Nghia Vu
Vu TN, Valkenborg D, Smets K, Verwaest KA, Dommisse R, Lemi\'ere 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.
dohCluster
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 seq_along(peakList[[refInd]]) ) mergedPeakLabel[i]=1; startP=1; endP=length(tarSpec); res=hClustAlign(refSpec,tarSpec,mergedPeakList,mergedPeakLabel,startP,endP, maxShift=50,acceptLostPeak=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.