View source: R/functions-XCMSnExp.R
plotChromPeaks | R Documentation |
plotChromPeaks
plots the identified chromatographic
peaks from one file into the plane spanned by the retention time and mz
dimension (x-axis representing the retention time and y-axis mz).
Each chromatographic peak is plotted as a rectangle representing its
width in rt and mz dimension.
This plot is supposed to provide some initial overview of the chromatographic peak detection results.
plotChromPeakImage
plots the number of detected peaks for
each sample along the retention time axis as an image plot, i.e.
with the number of peaks detected in each bin along the retention time
represented with the color of the respective cell.
plotChromPeaks(x, file = 1, xlim = NULL, ylim = NULL, add = FALSE,
border = "#00000060", col = NA, xlab = "retention time",
ylab = "mz", main = NULL, ...)
plotChromPeakImage(x, binSize = 30, xlim = NULL, log = FALSE,
xlab = "retention time", yaxt = par("yaxt"),
main = "Chromatographic peak counts", ...)
x |
|
file |
For |
xlim |
|
ylim |
For |
add |
For |
border |
For |
col |
For |
xlab |
|
ylab |
For |
main |
|
... |
Additional arguments passed to the |
binSize |
For |
log |
For |
yaxt |
For |
The width and line type of the rectangles indicating the detected
chromatographic peaks for the plotChromPeaks
function can be
specified using the par
function, i.e. with par(lwd = 3)
and par(lty = 2)
, respectively.
Johannes Rainer
highlightChromPeaks
for the function to highlight
detected chromatographic peaks in extracted ion chromatogram plots.
## Perform peak detection on two files from the faahKO package.
library(xcms)
library(faahKO)
faahko_file <- c(system.file('cdf/KO/ko16.CDF', package = "faahKO"),
system.file('cdf/KO/ko18.CDF', package = "faahKO"))
od <- readMSData(faahko_file, mode = "onDisk")
## Peak detection using the 'matchedFilter' method. Note that we are using a
## larger binSize to reduce the runtime of the example.
xod <- findChromPeaks(od, param = MatchedFilterParam(binSize = 0.3, snthresh = 20))
## plotChromPeakImage: plot an image for the identified peaks per file
plotChromPeakImage(xod)
## Show all detected chromatographic peaks from the first file
plotChromPeaks(xod)
## Plot all detected peaks from the second file and restrict the plot to a
## mz-rt slice
plotChromPeaks(xod, file = 2, xlim = c(3500, 3600), ylim = c(400, 600))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.