PeakAligner: Realignment with hierarchical clustering

Description Usage Arguments Value Author(s) Examples

View source: R/PeakAligner.R

Description

This functions aligns the data frame obtained after wavelet based peak detection with the 'getWaveletPeaks' function

Usage

1
2
3
PeakAligner(Y.peaks, grouping.window.width = 100, verbose = FALSE,
  min.samp.grp = 1, max.dupli.prop = 0.25, maxClust = 10,
  Jaccard.regroup.threshold = 0.25, linkage = "average")

Arguments

Y.peaks

data frame obtained from the 'getWaveletPeaks' function.

grouping.window.width

The width of the sliding window (in measurement points). Measurments are taken for when this sliding window is taken too small, but best set this too a value that a normal peak is comfortably in a window. Note if large shifts occur in your dataset (like in the wine dataset) it is best to set this parameter larger.

verbose

If set to TRUE the window selection process is documented in real time (default = FALSE).

min.samp.grp

The minimal amount of samples needed te form a group, see hclust.grouping.

max.dupli.prop

The maximal duplication proportion allowed for a group to be considered a sigle group, see hclust.grouping.

maxClust

The maximum number of clusters (depth of the tree), see hclust.grouping.

Jaccard.regroup.threshold

If 2 neighbouring groups have a jaccard index smaller than this 'Jaccard.regroup.threshold' (indicating that they are quite complementary as they have little peaks samples in common), then they are merged and regrouped. This situation can occur if a group is accidentally cut in half by the window approach.

linkage

The linkage to be used in the hierarchical clustering. See the 'method' argument in hclust.

Value

Returns a data frame with realigned peaks (aligned on groupIndex).

Author(s)

Charlie Beirnaert, charlie.beirnaert@uantwerpen.be

Examples

1
2
3
4
5
6
## Not run: 
# This function works on a data frame resulting from the 'getWaveletPeaks' function 
# DetectedPeaks <- getWaveletPeaks(X.ppm= PPM.vector, Y=Y.spec,  baselineThresh = 10,nCPU  = 4)
Aligned.peaks = PeakAligner = function (Y.peaks = DetectedPeaks)

## End(Not run)

speaq2 documentation built on May 6, 2017, 4:09 a.m.

Related to PeakAligner in speaq2...