exportImzMl,MassSpectrum-method {MALDIquantForeign}R Documentation

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 AbstractMassObject-class object or a list of AbstractMassObject-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

https://strimmerlab.github.io/software/maldiquant/

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.
doi:10.1016/j.jprot.2012.07.026

See Also

MassSpectrum-class

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)


[Package MALDIquantForeign version 0.14.1 Index]