View source: R/functions-msp.R
readMsp | R Documentation |
The readMsp()
function imports the data from a file in MGF format reading
all specified fields and returning the data as a DataFrame()
.
Format constraints for MSP files:
Comment lines are expected to start with a #
.
Multiple spectra within the same MSP file are separated by an empty line.
The first n lines of a spectrum entry represent metadata.
Metadata is provided as "name: value" pairs (i.e. name and value separated by a ":").
One line per mass peak, with values separated by a whitespace or tabulator.
Each line is expected to contain at least the m/z and intensity values (in that order) of a peak. Additional values are currently ignored.
readMsp(
f,
msLevel = 2L,
mapping = spectraVariableMapping(MsBackendMsp()),
BPPARAM = SerialParam(),
...
)
f |
|
msLevel |
|
mapping |
named |
BPPARAM |
parallel processing setup. See |
... |
Additional parameters, currently ignored. |
A DataFrame
with each row containing the data from one spectrum
in the MSP file. m/z and intensity values are available in columns "mz"
and "intensity"
in a list representation.
Laurent Gatto, Steffen Neumann, Johannes Rainer
f <- system.file("extdata", "minimona.msp", package = "MsBackendMsp")
readMsp(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.