Supplemental information for “OmniSpect: An Open Matlab-based Tool for Visualization and Analysis of Matrix-assisted Laser Desorption/Ionization and Desorption Electrospray Ionization Mass Spectrometry Images”. By Wang, Fernandez et al.

Data Formatting

In order to assemble the image cube from time-series mass spectrometry inputs, omniSpect requires position and timing information from the sample stage controller operating in parallel with the mass spectrometer. For example, omniSpect currently supports a “comb” shaped data acquisition raster path used in DESI MSI experiments, as previously described by our group [1]. In this DESI MSI surface "combing mode", the data are acquired across the two-dimensional sample following the pattern in Figure S-1. This raster path generates time-stamped mass spectra (e.g. Net CDF or mzXML files) together with a position file (text file) and a timing file (text file) generated by a stage controller.

Acquisition starts at the control point (x1, y1) and t1 represents the time interval between the stage software start and stage raster start. The mass spectrometer starts acquiring data at approximately the same time the stage begins moving. The delay between the stage and the data acquisition is taken into account with a built-in software parameter, which can be tailored for different systems. Each subsequent recorded (xn, yn, tn) position/time point indicates where the stage changes direction, with tn representing the time it takes the stage to move from (xn-1, yn-1) to (xn, yn). Therefore, the position file output by the stage control software contains three (x, y) positions (in µm) per line separated by tabs in the following format:

y1 x1 y2 x2 y3 x3

y4 x4 y5 x5 y6 x6

The matching timing file contains three times per line (in ms):

t1 t2 t3

t4 t5 t6

Each mass spectrum also contains a time-stamp. Its corresponding (x, y) position is determined by linearly interpolating the position from the accumulated time at each stage control point. Given the (x, y) position for each mass spectrum, omniSpect generates a three-dimensional data cube (x, y, m/z). We select the distance between adjacent horizontal scans of the sample as the pixel height, and the median distance along the x-axis between adjacent mass spectra as the pixel width. The ion abundance at each pixel in a regular grid is linearly interpolated between the nearest two collected mass spectra on the same horizontal line. During this process the data collected on the second horizontal pass (right-to-left in Figure S-1) and all data collected on the vertical paths are ignored. For data collected in Analyze 7.5 format, such as that from commercial DESI ion sources and MALDI-MSI instruments, the corresponding vendor software has already combined the data into a three-dimensional image cube, and omniSpect proceeds directly to data analysis.

Figure S-1: Data acquisition path for DESI MSI experiments. Note that in the actual experiment horizontal scan lines are superimposed but are shown separate in the Figure for clarity. In the “comb” microprobe raster pattern x1=x3, x4=x6, x2=x5, y1=y2=y3, and y4=y5=y6.

DESI MSI Experiments

Mouse brain tissues were sectioned (20 µm thickness at -25 0C using a MICROM HM 560 Cryostat), mounted on a glass slide and stored at – 80 0C. Prior to imaging, the tissues were allowed to thaw at room temperature inside a vacuum chamber for 20 minutes. Slides were then mounted on a motorized microscope stage (OptiScan II, Prior Scientific, Inc.) that was controlled by a VI written using LabView version 7.1.

DESI MSI experiments were performed on a previously described platform consisting of a home-built DESI probe coupled to a time-of-flight mass spectrometer (JEOL AccuTOF, Tokyo, Japan) instrument in positive ion mode [2]. However, the differential mobility spectrometry component of the platform was turned off, and no transport or throttle gases were used. A mass range of m/z 700 – 1000 was used during data acquisition to specifically detect the phosphatidylcholines. A DESI spray of 1% acetic acid in acetonitrile (LC-MS grade, Sigma Aldrich, St. Louis, MO, USA) at a flow rate of 5 μL/min assisted by nitrogen (160 psi) was used. Source geometry was optimized for sensitivity, with the distance between the spray tip and the sample surface being 2 mm at an angle of 55˚. The separation between the source sprayer and capillary inlet of the mass spectrometer was 4 mm.

The tissue area imaged was 10x15 mm. The stage motion parameters were set such that data was acquired in 160 x 200 μm pixel sizes.

Software Implementation

The functionality of the local Matlab version is implemented in omnispect.m, and the corresponding elements of the graphical user interface (e.g., push buttons and text boxes) are placed in omnispect.fig. Omnispect.m contains callback functions that respond to user input in the graphical user interface. Each interface element has a ‘Tag’ property visible in the Property Editor. For example, the button labeled “Plot Ions” has the tag pushbutton_ion. When the user clicks the button, the function pushbutton_ion_Callback executes in omnispect.m. This callback then gathers the relevant parameters for up to three m/z ranges from the interface and calls the general omnispect function visCube.m available to the GUI and PHP versions of omniSpect.

To add new functionality to the local version of omniSpect, additional buttons and other inputs may be added to the GUI using Matlab’s GUI editor, guide, and opening the omnispect.fig file. For example, to support an additional input format, the programmer may add a new radio button and provide its Tag (e.g., radio_new), edit formatgroup_SelectionChangeFcn to handle the case when this new radio button is selected, and edit the pushbutton_File<1-3>_Callback functions to get the appropriate file types from the file browser. After handling the interface, the programmer can edit the loadData function handling the case for radio_new.

Similarly, the web-based version of omniSpect operates within the PHP script omniSpect.php. PHP handles uploading the files and gathering user input but all the processing happens in Matlab using the PHP function exec. In particular, omniSpect calls Matlab using command line parameters to prevent the usual desktop environment from loading and uses the ‘-r’ flag to indicate what script Matlab should execute after it loads. When Matlab finishes, omniSpect checks that the appropriate output file was generated and continues through the workflow.

Currently omniSpect supports two analysis modes. OmniSpect.php distinguishes between them using a list of analysis methods and a current index into that list. When the index has not been set, omniSpect displays the file upload screen; otherwise, it displays the results of the chosen analysis. To add another analysis mode, first add another element to the analysis_methods array providing the name of the method, then allocate names for the output figures in the fig_files array, and finally introduce the parameters required for the analysis in a string analysis_params to be passed directly to Matlab. The name of the Matlab script for the new analysis method is analyze_<analysis_method_name>, where the name is from the analysis_methods array. The result of any analysis is displayed as a tiled array of figures. Finally, each analysis method may place its own controls in HTML at the bottom of the tiled array of figures.

References

1. Lane, A. L.; Nyadong, L.; Galhena, A. S.; Shearer, T. L.; Stout, E. P.; Parry, R. M.; Kwasnik, M.; Wang, M. D.; Hay, M. E.; Fernandez, F. M.; Kubanek, J. Desorption Electrospray Ionization Mass Spectrometry Reveals Surface-Mediated Antifungal Chemical Defense of a Tropical Seaweed. Proc. Natl. Acad. Sci. U. S. A. 2009, 106, 7314-7319.

2. Galhena, A. S.; Harris, G. A.; Kwasnik, M.; Fernandez, F. M. Enhanced Direct Ambient Analysis by Differential Mobility-Filtered Desorption Electrospray Ionization-Mass Spectrometry. Anal. Chem. 2010, 82, 9159-9163.