combine_spectra: Combine mass spectra of each scan and each file into a single...

Description Usage Arguments Details Author(s) Examples

Description

combine_spectra imports each raw file using xcmsRaw and assigns each ion to a previously defined mass vector, which is created using bin size parameter mzbin. This process is repeated for each raw file.

Usage

1
    combine_spectra(xs, mzbin=0.003, linear=FALSE, continuum=FALSE)    

Arguments

xs

xcmsSet object

mzbin

Bin size for the generation of mass vector

linear

logical. If TRUE, linear vector will be generated with mzbin increments. If FALSE, mass vector will be generated using a non-linear function. This option is recommended for TOF-type mass detectors

continuum

boolean flag. default value is FALSE.

Details

This processing step calculates a combined mass spectrum. Mass spectra not only from all scans of a single LCMS run alone are combined but from all acquired datasets. As a result, signal to noise ratio increases for each additional LCMS run.

Author(s)

David Fischer 2013

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
cdfpath <- file.path(find.package("faahKO"), "cdf")

my.input.files <- dir(c(paste(cdfpath, "WT", sep='/'),
    paste(cdfpath, "KO", sep='/')), full.names=TRUE)


# create xcmsSet object
xs <- new("xcmsSet")
xs@filepaths <- my.input.files

x<-combine_spectra(xs=xs, mzbin=0.25,
    linear=TRUE, continuum=FALSE)

plot(x$mz, x$intensity, type='l',
    xlab='m/Z', ylab='ion intensity')

cosmiq documentation built on Nov. 8, 2020, 6:47 p.m.