manualChromPeaks {xcms}R Documentation

Manual peak integration and feature definition

Description

The manualChromPeaks function allows to manually define chromatographic peaks which are added to the object's chromPeaks matrix. In contrast to findChromPeaks(), no peak detection is performed (e.g. using an algorithm such as centWave) but the peak is added as defined by the user. Note that a peak will not be added if no signal (intensity) was found in a sample within the provided boundaries.

Because chromatographic peaks are added to eventually previously identified peaks, it is suggested to run refineChromPeaks() with the MergeNeighboringPeaksParam() approach to merge potentially overlapping peaks.

The manualFeatures function allows to manually group identified chromatographic peaks into features by providing their index in the object's chromPeaks matrix.

Usage

manualChromPeaks(
  object,
  chromPeaks = matrix(),
  samples = seq_along(fileNames(object)),
  BPPARAM = bpparam(),
  msLevel = 1L
)

manualFeatures(object, peakIdx = list(), msLevel = 1L)

Arguments

object

XCMSnExp or OnDiskMSnExp object.

chromPeaks

matrix defining the boundaries of the chromatographic peaks, one row per chromatographic peak, columns "mzmin", "mzmax", "rtmin" and "rtmax" defining the m/z and retention time region of each peak.

samples

optional integer to select samples in which the peak integration should be performed. By default performed in all samples.

BPPARAM

parallel processing settings (see bpparam() for details).

msLevel

integer(1) defining the MS level in which peak integration should be performed.

peakIdx

for nabbyakFeatyres: list of integer vectors with the indices of chromatographic peaks in the object's chromPeaks matrix that should be grouped into features.

Value

XCMSnExp with the manually added chromatographic peaks or features.

Author(s)

Johannes Rainer


[Package xcms version 3.16.1 Index]