MSI.R scripts for processing mass spectrometry imaging (MSI) data

The free statistical computing language R provides many packages and functions which can be used for the efficient analysis of mass spectrometry data. We wrote a collection of scripts for the processing of .imzML mass spectrometry imaging files.


We adopted the R packages MALDIquant and MALDIquantForeign for the analysis of MSI data in *.imzML format by four steps:

  1. Searching for the most prominent signals in the entire data set.
  2. Generation of m/z images for a given m/z range.
  3. Generation of graphics for individual signals.
  4. Overlay of m/z images and photographies.

Different colour spaces (e.g. grey scale, HCL colours etc.) and contour lines optimize the correct perception of signal intensities and favour colour blind people.

The image above demonstrates a signal with m/z 84.1 from a noisy low-temperature plasma (LTP) mass spectrometry imaging (MSI) dataset.

Source Code/ Download

You can obtain the latest version of the MSI.R scripts from our git repository Alternatively, you can use it directly from MASSyPup, where we also installed sample data.

2016-1-26: The 'msir' library has changed its name to 'rmsi'; please upgrade from our git repository (git clone https://This email address is being protected from spambots. You need JavaScript enabled to view it./lababi/msi.r.git).

Low-Temperature Plasma (LTP) Mass Spectrometry Imaging (MSI)

The .imzML file, as well as related data and scripts for the LTP-MSI analysis of a chilli (Capsicum annuum) fruit cross-cut are available from DOI.


Roberto Gamboa-Becerra, Enrique Ramírez-Chávez, Jorge Molina-Torres, Robert Winkler: MSI.R scripts reveal volatile and semi-volatile features in low-temperature plasma mass spectrometry imaging (LTP-MSI) of chilli (Capsicum annuum), Analytical and Bioanalytical Chemistry, 2015,  407(19),  5673-5684,


Please send any questions, comments, suggestions to This email address is being protected from spambots. You need JavaScript enabled to view it..