Learn R Programming

flagme (version 1.28.0)

addXCMSPeaks: Add xcms/CAMERA peak detection results

Description

Reads the raw data using xcms, group each extracted ion according to their retention time using CAMERA and attaches them to an already created peaksDataset object

Usage

addXCMSPeaks(files, object, peakPicking=c('cwt','mF'), ...)

Arguments

files
character vector of same length as object@rawdata (user ensures the order matches)
object
a peaksDataset object.
peakPicking
Methods to use for peak detection. See details.
...
arguments passed on to xcmsSet and annotate

Value

peaksDataset object

Details

Repeated calls to xcmsSet and annotate to perform peak-picking and deconvolution. The peak detection results are added to the original peaksDataset object. Two peak detection alorithms are available: continuous wavelet transform (peakPicking=c('cwt')) and the matched filter approach (peakPicking=c('mF')) described by Smith et al (2006). For further information consult the xcms package manual.

See Also

peaksDataset findPeaks.matchedFilter findPeaks.centWave xcmsRaw-class

Examples

Run this code
# need access to CDF (raw data)
require(gcspikelite)
gcmsPath <- paste(find.package("gcspikelite"), "data", sep="/")

# full paths to file names
cdfFiles <- dir(gcmsPath, "CDF", full=TRUE)

# create a 'peaksDataset' object and add XCMS peaks to it
pd <- peaksDataset(cdfFiles[1], mz=seq(50,550), rtrange=c(7.5,8.5))
pd <- addXCMSPeaks(cdfFiles[1], pd, peakPicking=c('mF'),
                   snthresh=3, fwhm=4, step=1, steps=2, mzdiff=0.5)

Run the code above in your browser using DataLab