Skip to main content

msIO

msIO reads mass spectrometry data from several tools, combines it into one SQLite database, and provides a GUI for matching measured features against spectral libraries and annotating them.

Features

  • Readers for MS data formats and tool exports:
    • MGF (MS1/MS2 spectra)
    • MSP spectral libraries
    • MetaboScape feature tables and .mca annotation files
    • MZmine feature tables and .graphml networks
    • GNPS molecular networks
    • SIRIUS summaries (formula, compound and CANOPUS identifications)
  • SQLite storage: combine a feature table with MGF, GNPS and SIRIUS results into one database. MSP libraries can be turned into library databases too.
  • Annotation GUI: match features against one or more libraries (precursor m/z, MS2 similarity), filter the results, look at MS1/MS2 spectra and structures, and annotate features, peaks, adducts, isomers and series.

Installation

Python 3.10 or newer is needed. msIO needs LipidCalculator, which is not on PyPI yet and has to be installed first:

pip install git+https://github.com/yaza11/LipidCalculator.git@v0.3.7
pip install msIO

The latest development version can be installed from GitHub with pip install git+https://github.com/yaza11/msIO.git instead.

For Windows, there is also a standalone GUI that needs no Python installation: download msIO_GUI-windows.zip from the releases, extract it and run msIO_GUI.exe.

Graphical user interface

Start the GUI with:

python -m msIO.gui.main

The window has these tabs:

Tab Purpose
MZmine/MetaboScape → SQLite Combine a feature table with MGF, GNPS and SIRIUS output into a measured-feature database
MSP library → SQLite Convert one or more .msp libraries into a library database
Library viewer Search a library database by compound name and plot entries
Annotation Match measured features against libraries and annotate them
Guide A suggested strategy for making annotations

You can also run each tab on its own by running its module in msIO/gui/.

docs/GUI_features.md explains the annotation GUI in detail, with screenshots.

Standalone executable

Ready-built Windows executables are attached to the releases. To build one yourself (no Python needed to run it), install PyInstaller in the environment where msIO and its dependencies are installed and run:

pyinstaller --noconfirm --clean LipidAnnotations.spec

The build goes to dist/msIO_GUI/. The GitHub workflow builds the releases from the same spec file.

Python usage

Build a measured-feature database

from msIO import MgfImportManager
from msIO.feature_managers.combined import ProjectImportManager
from msIO.feature_managers.gnps import GnpsImportManager
from msIO.feature_managers.metaboscape import MetaboscapeImportManager
from msIO.feature_managers.sirius import SiriusImportManager
from msIO.sql.session import initiate_db

manager = ProjectImportManager(
    metaboscape_manager=MetaboscapeImportManager("height.csv"),
    mgf_manager=MgfImportManager("ms1_ms2.mgf", accumulate_spectra=False),
    gnps_manager=GnpsImportManager("gnps"),
    sirius_manager=SiriusImportManager(path_folder_export="sirius"),
)

initiate_db("features.sqlite")
manager.to_sql("features.sqlite", feature_ids=manager.feature_ids)

Build a library database from MSP files

from msIO.sql.create_library import write_lib_from_msp_files

write_lib_from_msp_files("library.sqlite", ["lib1.msp", "lib2.msp"])

Query databases

from msIO.feature_managers.db import FeatureManagerDB, Library

features = FeatureManagerDB("features.sqlite")
spectrum = features.get_ms_spectrum(features.feature_ids[0], level=2)

lib = Library("library.sqlite")
entry_id = lib.find_by_name("OH-GTGT-0a")[0]
lib.plot_compound_overview(entry_id)

Package layout

Module Contents
msIO.list_of_ions Readers for peak lists: MGF, MSP, MCA and library spectra
msIO.features Feature classes for each data source
msIO.feature_managers Import managers for each source, plus database access (FeatureManagerDB, Library)
msIO.sql SQLAlchemy schema, sessions and library creation
msIO.annotations Annotation handling
msIO.gui Tkinter GUIs

License

See LICENSE.

Metadata

Release files for msIO 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msIO 1.0.4
File Size Uploaded Provenance Actions
msio-1.0.4.tar.gz 144.9 kB With provenance Details for msio-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msIO 1.0.4
File Interpreter ABI Platform Actions
msio-1.0.4-py3-none-any.whl Python 3 none any Details for msio-1.0.4-py3-none-any.whl

Total release size: 315.8 kB

Release files / msio-1.0.4.tar.gz

Download URL msio-1.0.4.tar.gz
Size 144.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4dcb8c86aacfa7f2a4e732d009bedd643df7d1488dcc3d0741335fc81f860217
BLAKE2b-256 checksum
How to use checksums
91c882cc1e551cfaaae73cb51dede7023af28314696f2cf688d474c134c2e144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Release files / msio-1.0.4-py3-none-any.whl

Download URL msio-1.0.4-py3-none-any.whl
Size 170.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0670e32098ed130883976a5a3ea49e94d470138480ced4dbce199e86a0395b8
BLAKE2b-256 checksum
How to use checksums
b4b16cf75790906704f8cbf313f7135cd74c590b004c47519d024e0d288b1d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Security for msIO 1.0.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for msio-1.0.4.tar.gz

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 Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page