# spatialstein: An Open-Source Workflow for Annotation, Deconvolution, and Spatially Aware Segmentation of Mass Spectrometry Imaging Data

**Authors:** Michał Aleksander Ciach, Dan Guo, Kylie Ariel Bemis, Dirk Valkenborg, Olga Vitek, Anna Gambin

PMC · DOI: 10.1021/acs.analchem.5c04737 · Analytical Chemistry · 2026-01-02

## TL;DR

The paper introduces spatialstein, an open-source workflow that improves the analysis of mass spectrometry imaging data by addressing signal variability and overlapping ion signals.

## Contribution

The novel contribution is a workflow that deconvolves overlapping isotopic envelopes and segments ion images with improved accuracy.

## Key findings

- The spatialstein workflow enhances the accuracy of MSI segmentation by addressing signal variability and isobaric interference.
- The modular design of spatialstein allows for flexibility and adaptability to other studies.
- The workflow provides tentative molecular annotations and generates deconvolved ion images for each annotated ion.

## Abstract

Mass Spectrometry Imaging (MSI) data sets are markedly
different
from optical images. However, analysis algorithms often overlook the
intricacies of this kind of data. In MSI, a frequently observed phenomenon
is variability in signal intensity between pixels caused by factors
other than differences in analyte concentrations. Another common issue
is the presence of ions with overlapping isotopic envelopes resulting
in isobaric interference. The first factor causes random variations
of the signal from the same anatomical regions. The second can cause
the spatial distribution of a single peak to represent a mixture of
spatial distributions of several analytes. Both factors affect the
accuracy of data analysis methods such as MSI segmentation. In this
article, we demonstrate that accounting for the intricate structure
of MSI data can increase the accuracy of the analysis results. We
propose an approach that leverages recent advancements in computational
mass spectrometry to separate overlapping isotopic envelopes and mitigate
pixel-to-pixel variability of signal intensity. We implemented the
approach in spatialstein, an open-source workflow
that provides a tentative annotation of an MSI data set with molecular
formulas, generates a deconvolved ion image for each annotated ion,
and segments each deconvolved ion image into regions of distinct intensity
of the corresponding analyte. The structure of the workflow is modular,
making it highly modifiable and applicable, whole or in parts, to
other studies. The spatialstein workflow is
available at https://github.com/mciach/spatialstein.

## Full-text entities

- **Genes:** Pcx (pyruvate carboxylase) [NCBI Gene 18563] {aka Pc, Pcb}
- **Diseases:** MSI (MESH:C564543), OIE (MESH:C536030), tumors (MESH:D009369), PA (MESH:C535387), PC (MESH:D015324)
- **Chemicals:** sphingolipid (MESH:D013107), flavonoid (MESH:D005419), LIPID (MESH:D008055), PC (MESH:C053518), sphingomyelin (MESH:D013109), C43H85O7P (-), potassium (MESH:D011188), SM (MESH:D012493), Apigenin (MESH:D047310), polymers (MESH:D011108), PA (MESH:D011478), O (MESH:D010100), glycerophospholipid (MESH:D020404)
- **Species:** Mus musculus (house mouse, species) [taxon 10090]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12809658/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12809658/full.md

## References

45 references — full list in the complete paper: https://tomesphere.com/paper/PMC12809658/full.md

---
Source: https://tomesphere.com/paper/PMC12809658