| Title: | Visualising and Exploring Spectra Data |
|---|---|
| Description: | This package defines a set of helper function to visualise and explore mass spectrometry data stored as Spectra objects. |
| Authors: | Laurent Gatto [aut, cre] (ORCID: <https://orcid.org/0000-0002-1520-2268>), Johannes Rainer [aut] (ORCID: <https://orcid.org/0000-0002-6977-7147>) |
| Maintainer: | Laurent Gatto <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 0.3.1 |
| Built: | 2026-06-03 13:48:33 UTC |
| Source: | https://github.com/rformassspectrometry/SpectraVis |
The browseSpectra() function opens a simple shiny application
that allows to browse trough the individual scans of a Spectra
object. The title of the scans contains the MS level, the
retention time, if available the precursor m/z and precursor
charge and a peptides sequence (as defined in the sequence
spectra variable) and the index of the scan. If a scans has a
sequence (as defined in the sequence spectra variable), the
matching fragments (as defined by PSMatch::calculateFragments() are
labelled, otherwise the most intense peaks (as defined as those
that have an intensity as high as half the highest peak) are
labelled with their m/z.
See ?SpectraVis for an example.
browseSpectra(object)browseSpectra(object)
object |
A non-empty instance of class |
An object that represents the app.
Laurent Gatto
The plotlySpectra() function displays a single spectrum stored
in a Spectra object using the plotly::plot_ly() function.
See ?SpectraVis for an example.
plotlySpectra(object)plotlySpectra(object)
object |
A instance of class |
A plotly object.
Laurent Gatto, Johannes Rainer
library(MsDataHub) fl <- PestMix1_DDA.mzML() pest_ms2 <- filterMsLevel(Spectra(fl), 2L) plotlySpectra(pest_ms2[950])library(MsDataHub) fl <- PestMix1_DDA.mzML() pest_ms2 <- filterMsLevel(Spectra(fl), 2L) plotlySpectra(pest_ms2[950])
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 )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(MsDataHub) fl <- PestMix1_DDA.mzML() 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")## Load example data. library(MsDataHub) fl <- PestMix1_DDA.mzML() 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")
This package defines a set of helper function to visualise and explore mass spectrometry data stored as Spectra objects.
plotlySpectra: Interactive visualisation of a single spectrum.
browseSpectra: Browse spectra in a Spectra object.
Maintainer: Laurent Gatto [email protected] (ORCID)
Authors:
Laurent Gatto [email protected] (ORCID)
Johannes Rainer [email protected] (ORCID)
Useful links:
Report bugs at https://github.com/RforMassSpectrometry/SpectraVis/issues
library(MsDataHub) f <- MS3TMT10_01022016_32917.33481.mzML.gz() sp <- Spectra(f) sp if (interactive()) browseSpectra(sp) ## Use Ctrl+C to interrupt R and stop the application if (interactive()) plotlySpectra(sp[1])library(MsDataHub) f <- MS3TMT10_01022016_32917.33481.mzML.gz() sp <- Spectra(f) sp if (interactive()) browseSpectra(sp) ## Use Ctrl+C to interrupt R and stop the application if (interactive()) plotlySpectra(sp[1])