Import imzML files

Share:

Description

This function imports files in imzML file format into MassSpectrum-class or MassPeaks-class objects.

Usage

1
importImzMl(path, coordinates = NULL, ...)

Arguments

path

character, path to directory or file which should be read in.

coordinates

matrix, 2 column matrix that contains the x- and y-coordinates for spectra that should be imported. Other spectra would be ignored.

...

arguments to be passed to import.

Value

a list of MassSpectrum-class or MassPeaks-class objects (depending on the centroided argument).

Author(s)

Sebastian Gibb

References

http://strimmerlab.org/software/maldiquant/,
Definition of imzML format: http://www.imzml.org/

See Also

MassSpectrum-class, MassPeaks-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library("MALDIquant")
library("MALDIquantForeign")

## get example directory
exampleDirectory <- system.file("exampledata", package="MALDIquantForeign")

## import
s <- importImzMl(file.path(exampleDirectory, "tiny_continuous.imzML"))

## import only spectra for pixel 1,1 and 2,1
s <- importImzMl(file.path(exampleDirectory, "tiny_continuous.imzML"),
                 coordinates = cbind(1:2, c(1, 1)))