Thyra: bridging mass spectrometry imaging and SpatialData for unified multimodal analysis

Wait 5 sec.

CorrespondencePublished: 28 October 2026Theodoros Visvikis  ORCID: orcid.org/0009-0003-5579-54881,Tim F. E. Hendriks1,Wouter-Michiel Vierdag  ORCID: orcid.org/0000-0003-1666-54212,Luca Marconato2,Ron M. A. Heeren  ORCID: orcid.org/0000-0002-6533-71791 &…Eva Cuypers  ORCID: orcid.org/0000-0002-6411-24611 Nature Methods (2026) Cite this articleView saved researchMass spectrometry imaging (MSI) enables the mapping of molecular distributions across diverse samples1,2. As spatial biology advances, there is a clear unifying trend towards multimodal analysis, integrating MSI with heterogeneous high-throughput technologies such as histology, immunofluorescence and spatial transcriptomics to build a comprehensive understanding of molecular landscapes3. However, the explosive growth in data volume and complexity has exposed a critical bottleneck: the fragmentation of data into proprietary vendor formats and the limitations of existing open standards4. Consequently, we introduce Thyra, a Python library that natively converts full, continuous raw vendor and imzML data sets into the SpatialData format.The current open standards — mzML, and its imaging counterpart imzML5 — were important innovations but pre-date the high throughput demands of modern spatial biology. mzML embeds spectra as base64-encoded arrays within the XML itself; imzML instead pairs XML metadata with a separate binary (.ibd) file, and keeps individual spectra directly addressable. Neither, however, supports chunked lazy loading, internal compression, native cloud object storage, or parallel reading or writing6. Consequently, per-pixel XML parsing becomes limiting at scale, and routine visualization of a multi-gigabyte dataset can require loading it entirely into memory. This impedes the ‘FAIRness’ (findability, accessibility, interoperability and reusability) of MSI data, and creates silos that disincentivize exploratory crossmodal analysis.This is a preview of subscription content, access via your institutionAccess options Access through your institutionAccess Nature and 54 other Nature Portfolio journalsGet Nature+, our best-value online-access subscription34.99 € / 30 days cancel any timeLearn moreSubscribe to this journalReceive 12 print issues and online access269.00 € per year only 22.42 € per issueLearn moreBuy this articlePurchase on SpringerLinkInstant access to the full article PDF.39,95 €Prices may be subject to local taxes which are calculated during checkoutFig. 1: End-to-end workflow for integrating spatial omics modalities.SubjectsData integrationMass spectrometryMolecular imagingSoftwareMass Spectrometry Applications in Biological ImagingData availabilityAn example MSI dataset that reproduces the end-to-end workflow shown in Fig. 1 — together with the accompanying step-by-step tutorial — is openly available on Zenodo11.Code availabilityThyra is available as an open-source project under the MIT license on Github. The package can be installed from PyPI (pip install thyra). Full documentation — including installation, a reference for the command-line interface and API (application programming interface), and a step-by-step tutorial — is available online. A zero-installation Google Colab notebook that reproduces the full tutorial in the browser is linked from the repository and the documentation.ReferencesKorber, A., Anthony, I. G. & Heeren, R. M. A. Anal. Chem. 97, 15517–15549 https://doi.org/10.1021/acs.analchem.4c05249 (2025).Article  CAS  PubMed  PubMed Central  Google Scholar Bouvier, C., Van Nuffel, S., Walter, P. & Brunelle, A. J. Mass Spectrom. 57, e4803 https://doi.org/10.1002/jms.4803 (2022).Article  CAS  PubMed  Google Scholar Vandereyken, K., Sifrim, A., Thienpont, B. & Voet, T. Nat. Rev. Genet. 24, 494–515 https://doi.org/10.1038/s41576-023-00580-2 (2023).Article  CAS  PubMed  PubMed Central  Google Scholar Alexandrov, T., Saez‐Rodriguez, J. & Saka, S. K. Mol. Syst. Biol. 19, e10571 https://doi.org/10.15252/msb.202110571 (2023).Article  CAS  PubMed  PubMed Central  Google Scholar Schramm, T. et al. J. Proteom. 75, 5106–5110 https://doi.org/10.1016/j.jprot.2012.07.026 (2012).Article  CAS  Google Scholar Abernathey, R. P. et al. Comput. Sci. Engineer. 23, 26–35 https://doi.org/10.1109/MCSE.2021.3059437 (2021).Article  Google Scholar Marconato, L. et al. Nat. Methods 22, 58–62 https://doi.org/10.1038/s41592-024-02212-x (2025).Article  CAS  PubMed  Google Scholar Moore, J. et al. Nat. Methods 18, 1496–1498 https://doi.org/10.1038/s41592-021-01326-w (2021).Article  CAS  PubMed  PubMed Central  Google Scholar Virshup, I. et al. Nat. Biotechnol. 41, 604–606 https://doi.org/10.1038/s41587-023-01733-8 (2023).Article  CAS  PubMed  Google Scholar Hendriks, T. F. E. et al. Sci. Rep. 15, 42660 https://doi.org/10.1038/s41598-025-26735-1 (2025).Article  CAS  PubMed  PubMed Central  Google Scholar Visvikis, T., Cuypers, E. & Hendriks, D. Datasets used for the benchmarking and figures of the Thyra package article. Zenodo https://doi.org/10.5281/zenodo.18326569 (2026).Download referencesAcknowledgementsThe authors thank J. Grondelaers for assisting with the H&E staining and R. Jacobs for performing the Xenium spatial transcriptomics experiment.FundingThe development of Thyra was supported by the LINK program funded through the Dutch Research Council (NWO) and NWO-STEM (project number 19013 to E.C.), and by the Interreg Vlaanderen-Nederland program (project ‘Molecular Brain Tumor Detector’) with co-financing from the European Regional Development Fund (ERDF) and the Province of Limburg.Author informationAuthors and AffiliationsThe Maastricht MultiModal Molecular Imaging (M4I) Institute, Division of Imaging Mass Spectrometry (IMS), Maastricht University, Maastricht, The NetherlandsTheodoros Visvikis, Tim F. E. Hendriks, Ron M. A. Heeren & Eva CuypersGenome Biology Unit, European Molecular Biology Laboratory, Heidelberg, GermanyWouter-Michiel Vierdag & Luca MarconatoAuthorsTheodoros VisvikisView author publicationsSearch author on:PubMed Google ScholarTim F. E. HendriksView author publicationsSearch author on:PubMed Google ScholarWouter-Michiel VierdagView author publicationsSearch author on:PubMed Google ScholarLuca MarconatoView author publicationsSearch author on:PubMed Google ScholarRon M. A. HeerenView author publicationsSearch author on:PubMed Google ScholarEva CuypersView author publicationsSearch author on:PubMed Google ScholarContributionsT.V. conceived Thyra, developed the software, and wrote the manuscript. T.F.E.H. performed the MSI and Xenium experiments for the mouse dataset (from ref. 10) and contributed the registration workflow. W.-M.V. and L.M. contributed to the software design and the SpatialData integration. R.M.A.H. supervised the work. E.C. supervised the work and acquired the funding that supported it. All authors reviewed and approved the manuscript.Corresponding authorCorrespondence to Eva Cuypers.Ethics declarationsCompeting interestsThe authors declare no competing interests.Peer reviewPeer review informationNature Methods thanks Facundo Fernández and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling editor: Fariha Rahman, in collaboration with the Nature Methods team.Rights and permissionsReprints and permissionsAbout this article