XCMS.featureTable: Generate XCMS Feature Table

View source: R/JPA_functions.R

XCMS.featureTableR Documentation

Generate XCMS Feature Table

Description

Generate feature table from raw .mzXML files using XCMS's CentWave peak detection algorithm.

Usage

XCMS.featureTable <- function(dir, mz.tol = 10, ppm=10, peakwidth=c(5,20), mzdiff = 0.01, snthresh = 6, integrate = 1,
                         prefilter = c(3,100), noise = 100)

Arguments

dir

Directory of folder containing all .mzXML files of interest. This folder must contain only relevant .mzXML files of DDA sample(s).

mz.tol

Mass tolerance in ppm used to identify level 1 features by matching the feature's mz against all ms2 precursor mz. Default = 10.

ppm

Numeric(1) defining the maximal tolerated m/z deviation in consecutive scans in parts per million (ppm) for the initial ROI definition. Default = 10.

peakwidth

Numeric(2) with the expected approximate peak width in chromatographic space. Given as a range (min, max) in seconds. Default = c(5,20).

mzdiff

Numeric(1) representing the minimum difference in m/z dimension required for peaks with overlapping retention times; can be negative to allow overlap. During peak post-processing, peaks defined to be overlapping are reduced to the one peak with the largest signal. Default = 0.01.

snthresh

Numeric(1) defining the signal to noise ratio cutoff. Default = 6.

integrate

Integration method. For integrate = 1 peak limits are found through descent on the mexican hat filtered data, for integrate = 2 the descent is done on the real data. The latter method is more accurate but prone to noise, while the former is more robust, but less exact. Default = 1.

prefilter

Numeric(2): c(k, I) specifying the prefilter step for the first analysis step (ROI detection). Mass traces are only retained if they contain at least k peaks with intensity >= I. Default = c(3,100).

noise

Numeric(1) allowing to set a minimum intensity required for centroids to be considered in the first analysis step (centroids with intensity < noise are omitted from ROI detection). Default = 100.

Value

Returns a feature table in dataframe format, containing the following columns in order: "mz", "rt", "rtmin", "rtmax", "maxo", "sample", "level" where "maxo" is the feature peak intensity. Also returns an XCMS object that is used by functions later in the IPA workflow.

Author(s)

Sam Shen, Jian Guo, Tao Huan

Examples

library(IPA)
dir = "X:/Users/Sam_Shen/IPAtest_20210330/singleDDA"
featureTable <- peak.picking(dir = dir, mz.tol = 10, ppm=10, peakwidth=c(5,20), mzdiff = 0.01,
                             snthresh = 6, integrate = 1, prefilter = c(3,100), noise = 100)

HuanLab/JPA documentation built on April 14, 2023, 12:53 p.m.