Thyra converts imaging mass spectrometry data into one open format. It reads the files your instrument writes (Bruker, Waters, PHI, or imzML from any vendor) and saves them in SpatialData, which analysis and viewing tools can read. You do not need to know how to program.
Documentation | Install | Your first conversion | Tutorial | Technical reference
A sagittal mouse brain section converted with Thyra: the total ion current and two ion images. MALDI-MSI data from 10.5281/zenodo.18326569, CC-BY-4.0.
Quick start
uv tool install --python 3.13 thyra # or: pip install thyra (Python 3.12 to 3.14)
thyra-example-data example_data/synthetic_brain.imzML # makes a small example dataset
thyra example_data/synthetic_brain.imzML example_data/synthetic_brain.zarr
New to the terminal or to uv? The Install page walks you through every step. To try Thyra with nothing installed, open the notebook in Google Colab. The Tutorial also converts the published example dataset (10.5281/zenodo.18326569).
What you can convert
| Your instrument | Point Thyra at |
|---|---|
| Bruker timsTOF or solariX | the folder ending in .d |
| Bruker rapifleX | the acquisition folder |
| Waters (MassLynx) | the folder ending in .raw |
| PHI nanoTOF (ToF-SIMS) | the file ending in .raw |
| Any instrument that exports imzML | the .imzML file, with its .ibd file next to it |
| mzPeak (experimental) | the .mzpeak file |
Thyra reads timsTOF and Waters data on Windows and Linux; everything else also works on macOS. Shimadzu support is in development: until then, export imzML from IMAGEREVEAL MS.
PHI mosaic, MS/MS and depth-profiling acquisitions have so far been tested only on synthetic files. If you have real data in those modes, please get in touch.
What you get
One folder ending in .zarr, holding:
- the spectrum of every pixel, on one shared m/z axis
- an image of the total ion current (TIC)
- the optical image of the slide, when the acquisition has one
- ion mobility and MS/MS data from Bruker timsTOF, when the acquisition has them
- a validated description of the acquisition, ready for METASPACE
Thyra handles datasets larger than your computer's memory, slides with several regions, and 3D data.
From Python
from thyra import convert_msi
import spatialdata as sd
convert_msi("data/sample.imzML", "output/sample.zarr")
sdata = sd.read_zarr("output/sample.zarr")
table = sdata.tables["msi_dataset_z0"] # one row per pixel, one column per m/z bin
The acquisition description has its own commands:
thyra metadata raw_data.d # describe a dataset without converting it
thyra validate output.zarr # check a result against the schema
thyra export-metaspace output.zarr --merge sample.json # METASPACE submission file
Every option, format and output detail is in the Technical reference.
Development
git clone https://github.com/M4i-Imaging-Mass-Spectrometry/thyra.git
cd thyra
uv sync
uv run pre-commit install
uv run pytest
CI runs the same hooks on every pull request. Installing them locally shows you a failure before you push.
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT -- see LICENSE.
Citation
@software{thyra2024,
title = {Thyra: Modern Mass Spectrometry Imaging Data Conversion},
author = {Visvikis, Theodoros},
year = {2024},
url = {https://github.com/M4i-Imaging-Mass-Spectrometry/thyra}
}
Acknowledgments
- Built with SpatialData ecosystem
- Powered by Zarr for efficient storage
- Uses pyimzML for ImzML parsing
Visual identity
Logomark and logotype designed by Nepsis Scriptorium.
Metadata
Release files for thyra 4.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thyra-4.2.0.tar.gz | 11.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thyra-4.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 MB
Release files / thyra-4.2.0.tar.gz
| Download URL | thyra-4.2.0.tar.gz |
|---|---|
| Size | 11.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da74e4654256f177edb3ebbe033485d74be66316a0602485a2853d46b612e59c
|
|
BLAKE2b-256 checksum How to use checksums |
7d7a7a702a89014d226ab1b4ad5d17c6de4274a578e27f1b4b1e2e4d0d12a22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / thyra-4.2.0-py3-none-any.whl
| Download URL | thyra-4.2.0-py3-none-any.whl |
|---|---|
| Size | 12.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c336163d37406d74c3729ffebc0aef3787a2a196dc536b6ed172c7cd39bf38cd
|
|
BLAKE2b-256 checksum How to use checksums |
ef617864458a48b7f8fa5ae883e6f2dae6ef55175b13b59bd46ef33a3e2fed33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log