cent: Detect regions of interest (regions of m/z vs rt space with...

Description Usage Arguments Details Value Attribution See Also

View source: R/cent_centWave.R

Description

cent returns a list of all regions of interest as rectangles in m/z vs rt space.

Usage

1
cent(mz, i, scanindex, ppm = 2, prefilter = c(0, 0), maxskip = 0)

Arguments

mz

numeric A vector of exact mass centroids, all scans concatenated.

i

numeric A vector of intensities corresponding to mz, all scans concatenated.

scanindex

integer A vector of integers corresponding to the start of a new scan in the mz and i vectors.

ppm

numeric the ppm mass error acceptable before a new ROI is initialized. This ppm is allowed on both sides of the mass.

prefilter

numeric a two integer vector. The first indicates the minimum number of peaks an ROI must contain to be retained. The second indicates the minimum intensity those muct be.

maxskip

integer The number of scans an ROI must not contain a peak before clossing the ROI. This is an addition to the original algorithm. Useful for QE data.

Details

This function is a C++ implementation of the region of interest detection algorithm described in the centWave paper. The algorithm steps through scans sequentially and performs the following steps for every peak:

  1. If there exists an ROI encompassing the mass, add the peak to that ROI.

  2. If an appropriate ROI does not exist, create a new ROI.

  3. Check all unfinished ROIs - if a peak hasn't been added within the previous maxskip scans save it.

Value

A list, one entry for each region of interest.

Attribution

This code was modified from the originally published centWave algorithm [1]. The code was orginally distributed and obtained under the GPL2 license via the xcms software package [2]. The original algorithms depend on the wavelet analysis code included in the MassSpecWavelet package [3]. All code herein was obtained under the GPL2 license and remains under the GPL 3 license or greater.

See Also


nathaniel-mahieu/centWaveP documentation built on May 23, 2019, 12:19 p.m.