knitr::opts_chunk$set(echo = TRUE)
MS2 data... blablabla...
# load required library library(masstrixR) # get example file from package pathToMbRecords <- system.file("extdata", "exampleData\\Celegans_ms2\\MassBankRecords", package = 'masstrixR') # read all records in folder mbRecords <- readMassBankFolder(pathToMbRecords) head(mbRecords)
# create MS2 SQLite DB with masstrixR ms2db <- createMs2Db(mbRecords, "example_MS2") # make test search searchResult <- searchByPrecursor(118.086255, ms2db, precursorType = "[M+H]+")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.