View source: R/spectrum-import-functions.R
msms_spectra_mona imports MS/MS spectra from a MoNa (Massbank of North
America, http://mona.fiehnlab.ucdavis.edu/downloads) SDF file and returns
the data as a
Depending on the parameter
collapsed, the returned
data.frame is either
collapsed, meaning that each row represents data from one spectrum,
or expanded with one row for each m/z and intensity pair for each
"intensity" are of type
collapsed = TRUE and
collapsed = FALSE.
msms_spectra_mona(x, collapsed = TRUE)
data.frame with as many rows as there are peaks and columns:
integer): an arbitrary, unique ID for each spectrum.
character): The ID from the spectrum as specified
in the MoNa SDF.
character): the compound ID the spectrum is associated
integer): 0 for negative, 1 for positive,
NA for not set.
character): collision energy voltage.
logical): whether the spectrum is predicted or experimentally
NA since SPLASH (SPectraL hASH) keys are not
character): the type of MS instrument on which the
spectrum was measured.
character): the MS instrument.
numeric): precursor m/z.
character): ion formed from the precursor ion.
integer): stage of the sequential mass spectrometry (MSn).
numeric): m/z values of the spectrum.
numeric): intensity of the spectrum.
The identifiers provided by MoNa are used as original_spectrum_id. Note
also that the MoNa data is not normalized in the sense that each spectrum is
associated to one compound and the compound data is partially redundant.
Also, MoNa does not provide a splash for a spectrum, hence the
corresponding column will only contain
createCompDb() for the function to create a CompDb database with
compound annotation and spectrum data.
Other spectrum data import functions.:
## Define the test file containing the data fl <- system.file("sdf/MoNa_export-All_Spectra_sub.sdf.gz", package = "CompoundDb") ## Import spectrum data from the SDF file with a subset of the MoNa data msms_spectra_mona(fl) ## Import the data as an *expanded* data frame, i.e. with a row for each ## single m/z (intensity) value. msms_spectra_mona(fl, collapsed = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.