groupChromPeaks-mzClust: High resolution peak grouping for single spectra samples

Description Usage Arguments Value Slots Note References See Also Examples

Description

This method performs high resolution correspondence for single spectra samples.

The MzClustParam class allows to specify all settings for the peak grouping based on the mzClust algorithm. Instances should be created with the MzClustParam constructor.

sampleGroups,sampleGroups<-: getter and setter for the sampleGroups slot of the object.

ppm,ppm<-: getter and setter for the ppm slot of the object.

absMz,absMz<-: getter and setter for the absMz slot of the object.

minFraction,minFraction<-: getter and setter for the minFraction slot of the object.

minSamples,minSamples<-: getter and setter for the minSamples slot of the object.

groupChromPeaks,XCMSnExp,MzClustParam: performs high resolution peak grouping for single spectrum metabolomics data.

Usage

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
MzClustParam(
  sampleGroups = numeric(),
  ppm = 20,
  absMz = 0,
  minFraction = 0.5,
  minSamples = 1
)

## S4 method for signature 'MzClustParam'
show(object)

## S4 method for signature 'MzClustParam'
sampleGroups(object)

## S4 replacement method for signature 'MzClustParam'
sampleGroups(object) <- value

## S4 method for signature 'MzClustParam'
ppm(object)

## S4 replacement method for signature 'MzClustParam'
ppm(object) <- value

## S4 method for signature 'MzClustParam'
absMz(object)

## S4 replacement method for signature 'MzClustParam'
absMz(object) <- value

## S4 method for signature 'MzClustParam'
minFraction(object)

## S4 replacement method for signature 'MzClustParam'
minFraction(object) <- value

## S4 method for signature 'MzClustParam'
minSamples(object)

## S4 replacement method for signature 'MzClustParam'
minSamples(object) <- value

## S4 method for signature 'XCMSnExp,MzClustParam'
groupChromPeaks(object, param, msLevel = 1L)

Arguments

sampleGroups

A vector of the same length than samples defining the sample group assignments (i.e. which samples belong to which sample group). This parameter is mandatory for the PeakDensityParam and has to be provided also if there is no sample grouping in the experiment (in which case all samples should be assigned to the same group).

ppm

numeric(1) representing the relative mz error for the clustering/grouping (in parts per million).

absMz

numeric(1) representing the absolute mz error for the clustering.

minFraction

numeric(1) defining the minimum fraction of samples in at least one sample group in which the peaks have to be present to be considered as a peak group (feature).

minSamples

numeric(1) with the minimum number of samples in at least one sample group in which the peaks have to be detected to be considered a peak group (feature).

object

For groupChromPeaks: an XCMSnExp object containing the results from a previous chromatographic peak detection analysis (see findChromPeaks()).

For all other methods: a `MzClustParam` object.
value

The value for the slot.

param

A MzClustParam object containing all settings for the peak grouping algorithm.

msLevel

integer(1) defining the MS level. Currently only MS level 1 is supported.

Value

The MzClustParam function returns a MzClustParam class instance with all of the settings specified for high resolution single spectra peak alignment.

For groupChromPeaks: a XCMSnExp object with the results of the peak grouping step (i.e. the features). These can be accessed with the featureDefinitions() method.

Slots

.__classVersion__,sampleGroups,ppm,absMz,minFraction,minSamples

See corresponding parameter above. .__classVersion__ stores the version from the class. Slots values should exclusively be accessed via the corresponding getter and setter methods listed above.

Note

These methods and classes are part of the updated and modernized xcms user interface which will eventually replace the group() methods. All of the settings to the algorithm can be passed with a MzClustParam object.

Calling groupChromPeaks on an XCMSnExp object will cause all eventually present previous correspondence results to be dropped.

References

Saira A. Kazmi, Samiran Ghosh, Dong-Guk Shin, Dennis W. Hill and David F. Grant
Alignment of high resolution mass spectra: development of a heuristic approach for metabolomics.
Metabolomics, Vol. 2, No. 2, 75-83 (2006)

See Also

The do_groupPeaks_mzClust() core API function and group.mzClust() for the old user interface.

featureDefinitions() and featureValues() for methods to access peak grouping results (i.e. the features).

XCMSnExp for the object containing the results of the peak grouping.

Other peak grouping methods: groupChromPeaks-density, groupChromPeaks-nearest, groupChromPeaks()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Loading a small subset of direct injection, single spectrum files
library(msdata)
fticrf <- list.files(system.file("fticr", package = "msdata"),
                    recursive = TRUE, full.names = TRUE)
fticr <- readMSData(fticrf[1:2], msLevel. = 1, mode = "onDisk")

## Perform the MSW peak detection on these:
p <- MSWParam(scales = c(1, 7), peakThr = 80000, ampTh = 0.005,
             SNR.method = "data.mean", winSize.noise = 500)
fticr <- findChromPeaks(fticr, param = p)

head(chromPeaks(fticr))

## Now create the MzClustParam parameter object: we're assuming here that
## both samples are from the same sample group.
p <- MzClustParam(sampleGroups = c(1, 1))

fticr <- groupChromPeaks(fticr, param = p)

## Get the definition of the features.
featureDefinitions(fticr)

yclement/xcms documentation built on April 10, 2020, 12:08 a.m.