Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/createCompDbPackage.R
Import compound and spectrum information from MoNa
import_mona_sdf allows to import compound and spectrum information from an
SDF file from MoNa (Massbank of North America
http://mona.fiehnlab.ucdavis.edu/). This function is a convenience function
msms_spectra_mona() functions for data
import but avoiding to read the SDF files twice.
import_mona_sdf(x, nonStop = TRUE)
list with elements
data.frames with compound and MS/MS spectrum data, respectively.
MoNa SDF files organize the data by individual spectra (i.e. each element is one spectrum) and individual compounds can not easily and consistently defined (i.e. not all entries have an InChI ID or other means to uniquely identify compounds). Thus, the function returns a highly redundant compount table. Feedback on how to reduce this redundancy would be highly welcome!
compound_tbl_sdf() to read only the compound information.
msms_spectra_mona() to read only the spectrum data.
1 2 3 4 5 6
## Define the test file containing a small subset from MoNa fl <- system.file("sdf/MoNa_export-All_Spectra_sub.sdf.gz", package = "CompoundDb") ## Import the data res <- import_mona_sdf(fl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.