Description Usage Arguments Author(s) See Also Examples
writeMSData
exports the MS spectrum data provided with
parameters header
and data
to an MS file in mzML or
mzXML format.
1 2 3 4 | ## S4 method for signature 'list,character'
writeMSData(object, file, header,
backend = "pwiz", outformat = "mzml", rtime_seconds = TRUE,
software_processing)
|
object |
|
file |
|
header |
|
backend |
|
outformat |
|
rtime_seconds |
|
software_processing |
|
Johannes Rainer
copyWriteMSData
for a function to copy general
information from a MS data file and writing eventually modified MS
data from that originating file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Open a MS file and read the spectrum and header information
library(msdata)
fl <- system.file("threonine", "threonine_i2_e35_pH_tree.mzXML",
package = "msdata")
ms_fl <- openMSfile(fl, backend = "pwiz")
## Get the spectra
pks <- spectra(ms_fl)
## Get the header
hdr <- header(ms_fl)
## Modify the spectrum data adding 100 to each intensity.
pks <- lapply(pks, function(z) {
z[, 2] <- z[, 2] + 100
z
})
## Write the data to a mzML file.
out_file <- tempfile()
writeMSData(object = pks, file = out_file, header = hdr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.