Description Usage Arguments Details Author(s) See Also Examples
plotSpectra
plots a contrast between the reference spectra and the median spectra of a
given metabolite in the library. plotAllRIdev
saves the plots of the median-reference
spectra comparisons of all the metabolites in the reference library into a PDF file.
1 2 3 | plotSpectra(Lib, peaks, libId = 1, type = "ht")
plotAllSpectra(Lib, peaks, type = "ht", pdfFile, width = 8, height = 8, ...)
|
Lib |
A |
peaks |
A |
libId |
A numeric vector providing the indices of the metabolites to plot. |
type |
The type of the plot. Options are |
pdfFile |
A file name where the plot will be saved. Only |
width, height |
The width and height of the plots in inches. Only |
... |
Further options passed to |
The median spectra is obtained by computing the median intensity of every ion across the samples. The median and the reference spectra values are scaled to vary between 0 and 999 in order to make them comparable.
Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | require(TargetSearchData)
data(TSExample)
# get RI file path
RI.path <- file.path(find.package("TargetSearchData"), "gc-ms-data")
# update RI file path
RIpath(sampleDescription) <- RI.path
peakData <- peakFind(sampleDescription, refLibrary, corRI)
# Plot a comparison RI deviation of metabolite "Valine"
grep("Valine", libName(refLibrary)) # answer: 3
plotSpectra(refLibrary, peakData, libId = 3, type = "ht")
# Plot the spectra "side by side"
plotSpectra(refLibrary, peakData, libId = 3, type = "ss")
# Plot the spectra difference
plotSpectra(refLibrary, peakData, libId = 3, type = "diff")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.