MALDI-imaging mass spectrometry data interpretation
Summary
Interprets spatio-molecular matrices generated by MALDI-imaging mass spectrometry coupled with single-cell microscopy to extract metabolomic and morphological features linked to individual cells. This skill converts raw imaging mass spectrometry and microscopy data into annotated single-cell metabolite abundance tables suitable for downstream statistical and spatial analysis.
When to use
You have paired pre- and post-MALDI microscopy images with visible, non-overlapping ablation marks, MALDI raw data files (.RAW, .UDP, .imzML, .ibd) analyzed by METASPACE, and a segmented cell mask from CellProfiler. You need to map detected metabolite ions to individual cells and create a spatio-molecular matrix linking cell morphology to single-cell metabolite profiles.
When NOT to use
- Ablation marks are overlapping or invisible in post-MALDI microscopy—spatial mapping will be ambiguous or fail.
- MALDI data has not been analyzed by METASPACE or another ion identification and intensity quantification pipeline.
- Cell segmentation has not been performed (e.g., no CellProfiler masks available); this skill requires pre-segmented cells to link ions to individual cells.
- Microscopy images are pre-stitched or use non-Nikon format—current SpaceM implementation requires tile coordinates and is optimized for Nikon Ti-E output.
Inputs
- MALDI-imaging mass spectrometry raw data files (.RAW, .UDP, .imzML, .ibd)
- METASPACE-annotated ion intensity rasters and metabolite identifications
- Pre-MALDI microscopy image tiles (.tif) with tile coordinates (out.txt)
- Post-MALDI microscopy image tiles (.tif) with ablation marks visible
- CellProfiler-segmented cell masks and morphological feature measurements
- paths.json configuration file with CellProfiler and Fiji installation paths
Outputs
- Spatio-molecular matrix (MORPHnMOL.csv): rows=individual cells, columns=morphological features + ion intensities
- Registered and stitched microscopy images (pre- and post-MALDI)
- Cell-to-ion assignment table mapping each cell to detected metabolites within its boundary
- Quality control visualizations overlaying segmentation masks on ablation raster
How to apply
First, load the spatio-molecular matrix output by SpaceM (stored as MORPHnMOL.csv) into Python 3. Ensure ablation marks are visible and non-overlapping in the post-MALDI microscopy images—this is critical for correct spatial alignment. Register pre- and post-MALDI microscopy tiles using black penmarks as fiducials, using the upper left pixel x-y coordinates stored in out.txt for each tile. Map cell segmentation masks from CellProfiler onto the registered image space, then overlay the MALDI ion intensity raster (from METASPACE analysis of the .imzML/.ibd files) to assign each ion's abundance to the cells it intersects. The resulting spatio-molecular matrix contains one row per cell with columns for morphological features (from CellProfiler segmentation) and metabolite abundances (ion intensities extracted within each cell boundary). Validate alignment by confirming that ablation raster resolution matches the optical microscopy grid and that ion distributions show expected subcellular or spatial patterns.
Related tools
- METASPACE (Analyzes raw MALDI-imaging mass spectrometry data to generate ion intensity rasters and metabolite annotations used for ion-to-cell assignment) — https://metaspace2020.eu/
- CellProfiler 3.0.0 (Segments cells from pre- and post-MALDI microscopy images and measures morphological features (cell size, shape, intensity) that are linked to metabolomic data) — https://cellprofiler.org/previous_releases/
- Fiji (December 22 2015) (Image registration and tile stitching utility for aligning pre/post-MALDI microscopy using fiducial marks) — https://imagej.net/Fiji/Downloads
- Python 3 with requirements.txt (Runtime environment for executing the downstream processing pipeline that reads spatio-molecular matrices and generates visualization and analysis output) — https://github.com/alexandrovteam/SpaceM
Examples
python runAnalysis.py
Evaluation signals
- MORPHnMOL.csv file is generated with expected schema: rows ≥ number of segmented cells, columns = morphological features + ion abundance columns, no null/NaN values in core cell ID and coordinate columns.
- Ablation raster spatial resolution matches microscopy grid: visual inspection of overlaid segmentation masks and ion intensity heatmap shows pixel-level alignment without obvious offset or rotation.
- Ion intensity distribution shows expected spatial variation: metabolites are not uniformly distributed across all cells (indicating successful cell-level assignment), and ion intensities do not show strong artifacts at tile boundaries.
- Cell morphology metrics (area, eccentricity, intensity) from CellProfiler match visual inspection of segmentation masks; no obvious oversegmentation (fragments) or undersegmentation (merged cells).
- Downstream analysis (e.g., PCA, clustering, or correlation) produces biologically plausible patterns: metabolite abundance correlates with known cell types, metabolic state, or experimental treatment; cell clusters in morphology/metabolite space align with expected biology.
Limitations
- SpaceM requires tile stitching and is currently optimized for Nikon Ti-E microscope output format; pre-stitched images or other microscope formats are not supported in the current implementation.
- Ablation marks must be visible and non-overlapping in post-MALDI microscopy for correct spatial registration; poor image quality, marker occlusion, or high ablation density can break the mapping.
- Cell segmentation quality directly determines metabolomic accuracy: undersegmentation merges metabolite signals from adjacent cells; oversegmentation produces noisy single-cell profiles.
- Ion intensities from MALDI are relative and not absolute; quantitative comparisons between different m/z ratios or different samples require normalization and standardization (not handled by this skill alone).
- Current implementation does not support pre-stitched images; manual stitching or tile-by-tile analysis may be necessary for non-Nikon microscope data.
Evidence
- [intro] SpaceM, a method for in situ single-cell metabolomics of cultured cells that integrates microscopy with MALDI-imaging mass spectrometry: "SpaceM, a method for in situ single-cell metabolomics of cultured cells that integrates microscopy with MALDI-imaging mass spectrometry"
- [intro] the downstream processing of the spatio-molecular matrices provided by SpaceM: "the downstream processing of the spatio-molecular matrices provided by SpaceM"
- [readme] It is critical that ablation marks are visible and non-overlapping in the post-MALDI microscopy: "It is critical that ablation marks are visible and non-overlapping in the post-MALDI microscopy"
- [readme] The data should be analyzed by using METASPACE: "The data should be analyzed by using METASPACE"
- [readme] The final spatio-molecular matrix will be stored as MORPHnMOL.csv and can be found inside the scAnalysis sub-folder: "The final spatio-molecular matrix will be stored as
MORPHnMOL.csv and can be found inside the scAnalysis sub-folder"
- [readme] At the moment, SpaceM requires the stitching of the tiles and this particular code is optimized for the Nikon Ti-E microscope output format: "At the moment, SpaceM requires the stitching of the tiles and this particular code is optimized for the Nikon Ti-E microscope output format"
1---2name: maldi-imaging-mass-spectrometry-data-interpretation3description: Use when you have paired pre- and post-MALDI microscopy images with visible, non-overlapping ablation marks, MALDI raw data files (.RAW, .UDP, .imzML, .ibd) analyzed by METASPACE, and a segmented cell mask from CellProfiler.4license: CC-BY-4.05---67# MALDI-imaging mass spectrometry data interpretation89## Summary1011Interprets spatio-molecular matrices generated by MALDI-imaging mass spectrometry coupled with single-cell microscopy to extract metabolomic and morphological features linked to individual cells. This skill converts raw imaging mass spectrometry and microscopy data into annotated single-cell metabolite abundance tables suitable for downstream statistical and spatial analysis.1213## When to use1415You have paired pre- and post-MALDI microscopy images with visible, non-overlapping ablation marks, MALDI raw data files (.RAW, .UDP, .imzML, .ibd) analyzed by METASPACE, and a segmented cell mask from CellProfiler. You need to map detected metabolite ions to individual cells and create a spatio-molecular matrix linking cell morphology to single-cell metabolite profiles.1617## When NOT to use1819- Ablation marks are overlapping or invisible in post-MALDI microscopy—spatial mapping will be ambiguous or fail.20- MALDI data has not been analyzed by METASPACE or another ion identification and intensity quantification pipeline.21- Cell segmentation has not been performed (e.g., no CellProfiler masks available); this skill requires pre-segmented cells to link ions to individual cells.22- Microscopy images are pre-stitched or use non-Nikon format—current SpaceM implementation requires tile coordinates and is optimized for Nikon Ti-E output.2324## Inputs2526- MALDI-imaging mass spectrometry raw data files (.RAW, .UDP, .imzML, .ibd)27- METASPACE-annotated ion intensity rasters and metabolite identifications28- Pre-MALDI microscopy image tiles (.tif) with tile coordinates (out.txt)29- Post-MALDI microscopy image tiles (.tif) with ablation marks visible30- CellProfiler-segmented cell masks and morphological feature measurements31- paths.json configuration file with CellProfiler and Fiji installation paths3233## Outputs3435- Spatio-molecular matrix (MORPHnMOL.csv): rows=individual cells, columns=morphological features + ion intensities36- Registered and stitched microscopy images (pre- and post-MALDI)37- Cell-to-ion assignment table mapping each cell to detected metabolites within its boundary38- Quality control visualizations overlaying segmentation masks on ablation raster3940## How to apply4142First, load the spatio-molecular matrix output by SpaceM (stored as MORPHnMOL.csv) into Python 3. Ensure ablation marks are visible and non-overlapping in the post-MALDI microscopy images—this is critical for correct spatial alignment. Register pre- and post-MALDI microscopy tiles using black penmarks as fiducials, using the upper left pixel x-y coordinates stored in out.txt for each tile. Map cell segmentation masks from CellProfiler onto the registered image space, then overlay the MALDI ion intensity raster (from METASPACE analysis of the .imzML/.ibd files) to assign each ion's abundance to the cells it intersects. The resulting spatio-molecular matrix contains one row per cell with columns for morphological features (from CellProfiler segmentation) and metabolite abundances (ion intensities extracted within each cell boundary). Validate alignment by confirming that ablation raster resolution matches the optical microscopy grid and that ion distributions show expected subcellular or spatial patterns.4344## Related tools4546- **METASPACE** (Analyzes raw MALDI-imaging mass spectrometry data to generate ion intensity rasters and metabolite annotations used for ion-to-cell assignment) — https://metaspace2020.eu/47- **CellProfiler 3.0.0** (Segments cells from pre- and post-MALDI microscopy images and measures morphological features (cell size, shape, intensity) that are linked to metabolomic data) — https://cellprofiler.org/previous_releases/48- **Fiji (December 22 2015)** (Image registration and tile stitching utility for aligning pre/post-MALDI microscopy using fiducial marks) — https://imagej.net/Fiji/Downloads49- **Python 3 with requirements.txt** (Runtime environment for executing the downstream processing pipeline that reads spatio-molecular matrices and generates visualization and analysis output) — https://github.com/alexandrovteam/SpaceM5051## Examples5253```54python runAnalysis.py55```5657## Evaluation signals5859- MORPHnMOL.csv file is generated with expected schema: rows ≥ number of segmented cells, columns = morphological features + ion abundance columns, no null/NaN values in core cell ID and coordinate columns.60- Ablation raster spatial resolution matches microscopy grid: visual inspection of overlaid segmentation masks and ion intensity heatmap shows pixel-level alignment without obvious offset or rotation.61- Ion intensity distribution shows expected spatial variation: metabolites are not uniformly distributed across all cells (indicating successful cell-level assignment), and ion intensities do not show strong artifacts at tile boundaries.62- Cell morphology metrics (area, eccentricity, intensity) from CellProfiler match visual inspection of segmentation masks; no obvious oversegmentation (fragments) or undersegmentation (merged cells).63- Downstream analysis (e.g., PCA, clustering, or correlation) produces biologically plausible patterns: metabolite abundance correlates with known cell types, metabolic state, or experimental treatment; cell clusters in morphology/metabolite space align with expected biology.6465## Limitations6667- SpaceM requires tile stitching and is currently optimized for Nikon Ti-E microscope output format; pre-stitched images or other microscope formats are not supported in the current implementation.68- Ablation marks must be visible and non-overlapping in post-MALDI microscopy for correct spatial registration; poor image quality, marker occlusion, or high ablation density can break the mapping.69- Cell segmentation quality directly determines metabolomic accuracy: undersegmentation merges metabolite signals from adjacent cells; oversegmentation produces noisy single-cell profiles.70- Ion intensities from MALDI are relative and not absolute; quantitative comparisons between different m/z ratios or different samples require normalization and standardization (not handled by this skill alone).71- Current implementation does not support pre-stitched images; manual stitching or tile-by-tile analysis may be necessary for non-Nikon microscope data.7273## Evidence7475- [intro] SpaceM, a method for in situ single-cell metabolomics of cultured cells that integrates microscopy with MALDI-imaging mass spectrometry: "SpaceM, a method for in situ single-cell metabolomics of cultured cells that integrates microscopy with MALDI-imaging mass spectrometry"76- [intro] the downstream processing of the spatio-molecular matrices provided by SpaceM: "the downstream processing of the spatio-molecular matrices provided by SpaceM"77- [readme] It is critical that ablation marks are visible and non-overlapping in the post-MALDI microscopy: "It is critical that ablation marks are visible and non-overlapping in the post-MALDI microscopy"78- [readme] The data should be analyzed by using METASPACE: "The data should be analyzed by using [METASPACE]( https://metaspace2020.eu/)"79- [readme] The final spatio-molecular matrix will be stored as MORPHnMOL.csv and can be found inside the scAnalysis sub-folder: "The final spatio-molecular matrix will be stored as `MORPHnMOL.csv` and can be found inside the `scAnalysis` sub-folder"80- [readme] At the moment, SpaceM requires the stitching of the tiles and this particular code is optimized for the Nikon Ti-E microscope output format: "At the moment, SpaceM requires the stitching of the tiles and this particular code is optimized for the Nikon Ti-E microscope output format"