MS2IDgui | R Documentation |
MS2IDgui
is a Shiny app that visually browses the annotation results stored in an Annot object. The Annot object can be loaded as an argument or directly from the user interface.
MS2IDgui(annot)
annot |
Annot object with the results to be browsed. By default (no argument), the function opens the browser with no data and the Annot object can be loaded using the user interface. |
The user interface has two panels. The right panel lists the loaded annotations as rows in a table; when one of them is clicked, the left panel responds by displaying the figures related to the selection:
Tab QRY/REF: The figure compares the query (green) and the reference (red) spectrum, with fragments in common (considering the massErrorMSn argument) in a brighter colour; if present, precursor masses are pointed out with a triangular symbol. Also, the bottom description shows the inchikey of the reference compound and a link to a Pubchem's page listing compounds with that inchikey.
Tab Cons.: If the annotation has a consensual query spectrum, this sub-panel displays a figure with the query spectra that form it..
The left panel also has two more tabs with general features:
Tab Home: Contains a control to load rds files (with Annot object).
Tab Info: Lists the arguments used in the
annotate
function that resulted in the present
Annot object.
Concerning the right panel, it must be noted: The
mzML file
and precursor M/z
controls filter
the annotations based in the query mzML file and the precursor mass of the
query spectrum, respectively. Also, the redundant annotation
option
summarizes the annotations displaying only, for every query spectrum, the
best annotation per compound.
Every row corresponds to an annotation in the table, and different annotations of the same spectrum have identical row colours.
Column names that contain QRY, REF or CONS refer to query,
reference or consensus entities, respectively. e.g. QRYprecursorMz
contains the precursor M/z of the query spectra, REFadduct
the adducts
of the reference spectra and QRYrtime_CONS
the retention times of the
query spectra that conform every consensus spectrum.
The column
massNum
refers to the number of fragments of the query spectrum
(green), the reference spectrum (red) and the number of fragments in common
(black). Similarly, the column collisionEnergy
shows the collision
energy of the query (green) and reference (red) spectra.
REFinchikey
shows the inchikey of the reference compound and links to
a Pubchem's page with a list of compounds that shares that inchikey.
ppmPrecMass
refers to the absolute difference value in ppm
between query and reference precursor masses.
Josep M. Badia josepmaria.badia@urv.cat
Annot class and annotate
function.
## LOAD MS2ID LIBRARY ---
## Decompress the MS2ID library that comes with MS2ID
MS2IDzipFile <- system.file("extdata/MS2IDLibrary.zip",
package = "MS2ID",
mustWork = TRUE)
library(utils)
MS2IDFolder <- dirname(unzip(MS2IDzipFile,
exdir = tempdir()))[1]
## SELECT QUERY SPECTRA ---
## Decompress the query mzML files that come with MS2ID
queryFile <- system.file("extdata/QRYspectra.zip",
package = "MS2ID",
mustWork = TRUE)
queryFolder <- file.path(tempdir(), "QRYspectra")
library(utils)
unzip(queryFile, exdir = queryFolder)
## ANNOTATION ---
library(MS2ID)
MS2IDlib <- MS2ID(MS2IDFolder)
annotResult <- annotate(QRYdata = queryFolder, MS2ID = MS2IDlib)
## Browse visually the results---
## Not run:
MS2IDgui(annotResult)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.