Researchers have developed an open-source software library that converts mass spectrometry imaging data into SpatialData, a standardized framework for combining spatial molecular and imaging datasets.
Described in Nature Methods, Thyra is intended to address a common analytical challenge: mass spectrometry imaging, or MSI, data are often stored in vendor-specific formats or in imzML, making integration with histology, immunofluorescence, and spatial transcriptomics difficult.
MSI maps the distribution of lipids, metabolites, peptides, and other molecules across tissue sections. Combining these molecular maps with microscopy and transcriptomic data can provide a more detailed view of tissue biology, but differences in file structure, coordinate systems, and data size can complicate multimodal analysis.
Developed by Theodoros Visvikis and colleagues at Maastricht University and the European Molecular Biology Laboratory, Thyra acts as an interoperability layer rather than a new analytical platform. It automatically detects supported MSI formats and converts full spectra, instrument metadata, and spatial coordinates into SpatialData objects.
The software can process continuous raw vendor files and imzML datasets. To account for differences between mass analyzers, it uses instrument-specific resampling strategies to harmonize mass-to-charge axes. A sparse matrix engine and single-pass processing are used to manage datasets that exceed the computer’s available memory.
Within the resulting SpatialData object, ion images are stored using Xarray, spectral matrices through AnnData and pixel coordinates within a shared physical coordinate system. Outputs are written in the cloud-compatible Zarr v3 format under the Open Microscopy Environment next-generation file format standard.
This structure allows MSI data to be used with established tools in the scverse ecosystem, including Scanpy, Squidpy, napari, and Vitessce. Laboratories can inspect ion images, spectra, and other spatial layers together, while also applying scripted quality-control checks for total-ion-current stability, mass-calibration drift, and registration errors.
The authors demonstrated a workflow combining matrix-assisted laser desorption/ionization MSI, hematoxylin and eosin histology, and Xenium spatial transcriptomics from a previously published mouse brain dataset. After registration into a common coordinate system, regions identified on histology or transcriptomic images could be used to query corresponding metabolic profiles.
Potential applications include examining lipid distributions at tumor margins or comparing molecular profiles among histologically or transcriptionally defined tissue regions. However, the authors cautioned that interpretation remains limited by MSI pixel size, tissue deformation and the accuracy of image registration. The current Thyra release also does not preserve ion-mobility data, although this is planned for a future version.
