Description Usage Arguments Value Author(s) Examples
View source: R/MsBackendMassbank.R
The MsBackendMassbank
class supports import of MS/MS spectra data from
MS/MS spectrum data from
Massbank
files. After initial import, the full MS data is kept in
memory. MsBackendMassbank
extends the MsBackendDataFrame()
backend
directly and supports thus the applyProcessing()
function to make
data manipulations persistent.
New objects are created with the MsBackendMassbank
function. The
backendInitialize
method has to be subsequently called to
initialize the object and import MS/MS data from (one or more) MassBank
files. Optional parameter nonStop
allows to specify whether the
import returns with an error if one of the text 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
will abort import regardless of parameter nonStop
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## S4 method for signature 'MsBackendMassbank'
backendInitialize(
object,
files,
metaBlocks = metaDataBlocks(),
nonStop = FALSE,
...,
BPPARAM = bpparam()
)
MsBackendMassbank()
spectraVariableMapping(format = c("Massbank"))
## S4 method for signature 'MsBackendMassbank'
export(object, x, file = tempfile(), mapping = spectraVariableMapping(), ...)
|
object |
Instance of |
files |
|
metaBlocks |
|
nonStop |
|
... |
Currently ignored. |
BPPARAM |
Parameter object defining the parallel processing
setup to import data in parallel. Defaults to |
format |
for |
x |
|
file |
for |
mapping |
for |
backendInitialize
and MsBackendMassbank
return an instance of
MsBackendMassbank-class
.
Michael Witting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Create an MsBackendMassbank backend and import data from a test file.
fls <- dir(system.file("extdata", package = "MsBackendMassbank"),
full.names = TRUE, pattern = "txt$")
be <- backendInitialize(MsBackendMassbank(), fls)
be
be$msLevel
be$intensity
be$mz
## Initializing a backend reading additional metadata columns/information
mb <- metaDataBlocks()
mb
mb[1, 2] <- TRUE
be <- backendInitialize(MsBackendMassbank(), fls, metaBlocks = mb)
spectraVariables(be)
be$instrument
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.