mergeTolerance: Merge spectra with m/z tolerance

Description Usage Arguments Value

View source: R/extract_merge.R

Description

mergeTolerance() merges two spectra by identifying common peaks with a given m/z tolerance. It can be used with Reduce() to merge more than two spectra.

Usage

1
mergeTolerance(x, y, tolerance = 1e-05)

Arguments

x, y

MS2 spectra as objects of class matrix with m/z in the first column and intensity in the second.

tolerance

The m/z tolerance used for merging. If two peaks are within tolerance, they are regarded as the same. Defaults to 1e-5, i.e. 10ppm.

Value

A matrix with m/z in the first column and separate columns for intensities in the respective spectra. If peaks were merged, their m/z corresponds to the mean of the two original m/z.


CluMSID documentation built on Nov. 8, 2020, 7:46 p.m.