| combine_spectra {cosmiq} | R Documentation |
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.
combine_spectra(xs, mzbin=0.003, linear=FALSE, continuum=FALSE)
xs |
xcmsSet object |
mzbin |
Bin size for the generation of mass vector |
linear |
logical. If TRUE, linear vector will be generated with
|
continuum |
boolean flag. default value is FALSE. |
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.
David Fischer 2013
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')