View source: R/MsBackendHmdbXml.R
MsBackendHmdbXml | R Documentation |
The MsBackendHmdbXml
class supports import of MS/MS spectra data from xml
files from The Human Metabolome Database HMDB. After
initial import, the full MS data is kept in memory. MsBackendHmdbXml
extends the MsBackendDataFrame()
backend directly and supports thus
the applyProcessing()
function to make data manipulations persistent. The
backend does however not support export of MS2 data to xml files in HMDB
format.
New objects are created with the MsBackendHmdbXml
function. The
backendInitialize
method has to be subsequently called to initialize
the object and import MS/MS data from (one or more) xml files from HMDB.
Optional parameter nonStop
allows to specify whether the import returns
with an error if one of the xml files lacks required data, such as mz
and
intensity
values (default nonStop = FALSE
), or whether only affected
file(s) is(are) skipped and a warning is shown (nonStop = TRUE
). Note that
any other error (such as xml import error) will abort import regardless of
parameter nonStop
.
## S4 method for signature 'MsBackendHmdbXml' backendInitialize(object, files, nonStop = FALSE, ..., BPPARAM = bpparam()) MsBackendHmdbXml()
object |
Instance of |
files |
|
nonStop |
|
... |
Currently ignored. |
BPPARAM |
Parameter object defining the parallel processing setup to
import data in parallel. Defaults to |
Johannes Rainer
## Create an MsBackendHmdbXml backend and import data from test xml files. fls <- dir(system.file("xml", package = "MsBackendHmdb"), full.names = TRUE, pattern = "xml$") be <- backendInitialize(MsBackendHmdbXml(), fls) be be$msLevel be$compound_id
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.