featureChromatograms {xcms} | R Documentation |
Extract ion chromatograms for each feature in an XCMSnExp object.
featureChromatograms(x, expandRt = 0, aggregationFun = "max", features, ...)
x |
|
expandRt |
|
aggregationFun |
|
features |
|
... |
optional arguments to be passed along to the |
Chromatograms object.
Johannes Rainer
library(xcms) library(faahKO) faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"), system.file('cdf/KO/ko16.CDF', package = "faahKO"), system.file('cdf/KO/ko18.CDF', package = "faahKO")) ## Do a simple and fast preprocessing of the test data od <- readMSData(faahko_3_files, mode = "onDisk") od <- findChromPeaks(od, param = CentWaveParam(peakwidth = c(30, 80), noise = 1000)) od <- adjustRtime(od, param = ObiwarpParam(binSize = 0.6)) od <- groupChromPeaks(od, param = PeakDensityParam(minFraction = 0.8, sampleGroups = rep(1, 3))) ## Extract ion chromatograms for each feature chrs <- featureChromatograms(od) ## Plot the XIC for the first feature using different colors for each file par(mfrow = c(1, 2)) plot(chrs[1, ], col = c("red", "green", "blue"))