Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

exportImzMl-methods

Export to imzML files


Description

This function exports MassSpectrum-class objects into imzML files.

Usage

## S4 method for signature 'MassSpectrum'
exportImzMl(x, file, force=FALSE, processed=TRUE,
coordinates=NULL, pixelSize=c(100, 100), ...)

## S4 method for signature 'list'
exportImzMl(x, path, force=FALSE, processed=TRUE,
coordinates=NULL, pixelSize=c(100, 100), ...)

Arguments

x

a MassSpectrum-class object or a list of MassSpectrum-class objects.

file

character, file name.

force

logical, If TRUE the file would be overwritten or path would be created.

processed

logical, If TRUE (default) the spectra will be saved in processed mode (means mass and intensity is stored for each spectra separately in contrast to continuous mode where the mass is stored only for one spectrum).

coordinates

matrix, 2 column matrix that contains the x- and y-coordinates for the spectra.

pixelSize

numeric, a vector of length 2 that contains the x and y pixel size in micrometers (default: c(100, 100)).

path

character, path to directory in which the list of MassSpectrum-class would be exported. If path is a single filename all spectra will be exported to a single imzML file.

...

arguments to be passed to internal functions.

Author(s)

Sebastian Gibb

References

Schramm T, Hester A, Klinkert I, Both J-P, Heeren RMA, Brunelle A, Laprevote O, Desbenoit N, Robbe M-F, Stoeckli M, Spengler B, Roempp A (2012)
imzML - A common data format for the flexible exchange and processing of mass spectrometry imaging data.
Journal of Proteomics 75 (16):5106-5110.
http://dx.doi.org/10.1016/j.jprot.2012.07.026

See Also

Examples

## Not run: 
library("MALDIquant")
library("MALDIquantForeign")

s <- list(createMassSpectrum(mass=1:5, intensity=1:5),
          createMassSpectrum(mass=1:5, intensity=1:5))

## export a list of spectra
exportImzMl(s, path="processed.imzML", coordinates=cbind(x=1:2, y=c(1, 1)))

## End(Not run)

MALDIquantForeign

Import/Export Routines for 'MALDIquant'

v0.12
GPL (>= 3)
Authors
Sebastian Gibb [aut, cre] (<https://orcid.org/0000-0001-7406-4443>), Pietro Franceschi [ctb]
Initial release
2019-01-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.