specPeaks {xcms} | R Documentation

## Identify peaks in a sparse continuum mode spectrum

### Description

Given a spectrum, identify and list significant peaks as determined by several criteria.

### Usage

    specPeaks(spec, sn = 20, mzgap = 0.2)

### Arguments

`spec` | matrix with named columns `mz` and `intensity`
`sn` | minimum signal to noise ratio
`mzgap` | minimal distance between adjacent peaks, with smaller peaks being excluded

### Details

Peaks must meet two criteria to be considered peaks: 1) Their s/n ratio must exceed a certain threshold. 2) They must not be within a given distance of any greater intensity peaks.

### Value

A matrix with columns:

`mz` | m/z at maximum peak intensity
`intensity` | maximum intensity of the peak
`fwhm` | full width at half max of the peak

### Author(s)

Colin A. Smith, csmith@scripps.edu

### See Also

`getSpec`, `specNoise`

[Package xcms version 3.10.2 Index]