do_groupChromPeaks_nearest: Core API function for chromatic peak grouping using a nearest...

Description Usage Arguments Value References See Also

View source: R/do_groupChromPeaks-functions.R

Description

The do_groupChromPeaks_nearest function groups peaks across samples by creating a master peak list and assigning corresponding peaks from all samples to each peak group (i.e. feature). The method is inspired by the correspondence algorithm of mzMine (Katajamaa 2006).

Usage

1
2
3
4
5
6
7
8

Arguments

peaks

A matrix or data.frame with the mz values and retention times of the identified chromatographic peaks in all samples of an experiment. Required columns are "mz", "rt" and "sample". The latter should contain numeric values representing the index of the sample in which the peak was found.

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

mzVsRtBalance

numeric(1) representing the factor by which mz values are multiplied before calculating the (euclician) distance between two peaks.

absMz

numeric(1) maximum tolerated distance for mz values.

absRt

numeric(1) maximum tolerated distance for rt values.

kNN

numeric(1) representing the number of nearest neighbors to check.

Value

A list with elements "featureDefinitions" and "peakIndex". "featureDefinitions" is a matrix, each row representing an (mz-rt) feature (i.e. peak group) with columns:

"peakIndex" is a list with the indices of all peaks in a feature in the peaks input matrix.

References

Katajamaa M, Miettinen J, Oresic M: MZmine: Toolbox for processing and visualization of mass spectrometry based molecular profile data. Bioinformatics 2006, 22:634-636.

See Also

Other core peak grouping algorithms: do_groupChromPeaks_density(), do_groupPeaks_mzClust()


xcms documentation built on Nov. 8, 2020, 5:13 p.m.