View source: R/plotlySpectraMirror.R
| plotlySpectraMirror | R Documentation |
The plotlySpectraMirror function creates an interactive mirror plot
comparing two spectra x and y with each other. Peaks with matching m/z
values (considering ppm and tolerance) are indicated with a point which
size can be specified with parameter matchSize.
See also plotSpectraMirror() for a non-interactive version of this plot.
plotlySpectraMirror( x, y, xLabel = "", xColor = "#737373", yLabel = "", yColor = "#737373", matchSize = 5, ppm = 20, tolerance = 0 )
x |
A |
y |
A |
xLabel |
Optional |
xColor |
Color for peaks of spectrum |
yLabel |
Optional |
yColor |
Color for peaks of spectrum |
matchSize |
|
ppm |
|
tolerance |
|
A plotly object
Johannes Rainer
## Load example data.
library(msdata)
fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML", package = "msdata")
pest_ms2 <- filterMsLevel(Spectra(fl), 2L)
plotlySpectraMirror(pest_ms2[948], pest_ms2[950])
plotlySpectraMirror(pest_ms2[948], pest_ms2[959], xLabel = "query",
yLabel = "target", xColor = "red", yColor = "blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.