Skip to main content

pymzdata

pymzdata provides Python bindings for mzdata, a fast Rust library for reading mass spectrometry data files.

Supported formats

MZReader supports mzML and indexed mzML, MGF, Bruker TDF, and imzML files. IMMZReader provides ion-mobility frame access for compatible mzML and Bruker TDF files. Thermo RAW is also supported when its native runtime dependencies are available on the host system.

Installation

pip install pymzdata

Python 3.9 or later is required. NumPy is installed automatically and is used for the peak arrays returned by the reader.

Quickstart

import pymzdata

with pymzdata.MZReader("example.mzML") as reader:
    print(f"{len(reader)} spectra")

    for spectrum in reader:
        print(spectrum.id, spectrum.ms_level, spectrum.start_time)
        mz = spectrum.mz_array()
        intensity = spectrum.intensity_array()
        if mz is not None:
            print(f"  {len(mz)} peaks")

MZReader supports iteration and random access with get_by_index, get_by_id, and get_by_time (retention time in minutes). Spectrum metadata, precursor information, and decoded NumPy peak arrays are available from each Spectrum.

For Bruker ion-mobility data, use IMMZReader directly or convert an open MZReader with into_frame_reader() to access ion-mobility frames.

Development

To build the bindings from a checkout, install maturin and run:

cd crates/pymzdata
maturin develop

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymzdata-0.66.1.tar.gz (984.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymzdata-0.66.1-cp39-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.9+Windows x86-64

pymzdata-0.66.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

pymzdata-0.66.1-cp39-abi3-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pymzdata-0.66.1-cp39-abi3-macosx_10_12_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file pymzdata-0.66.1.tar.gz.

File metadata

  • Download URL: pymzdata-0.66.1.tar.gz
  • Upload date:
  • Size: 984.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pymzdata-0.66.1.tar.gz
Algorithm Hash digest
SHA256 011cd99ec0e2b86cf66659862c320059dd82a9fb8ce7c0341d590120a9303fb5
MD5 98a7a80b2970b1c08de969b74770b530
BLAKE2b-256 b3e604c5163050a506e3d0fcc0520447b8101f6dc166d329a41c23a34d2246a8

See more details on using hashes here.

File details

Details for the file pymzdata-0.66.1-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: pymzdata-0.66.1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pymzdata-0.66.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 25a4a5ac73c885892a98bb962f65bfa6724e2909e5ad660605cb872eed41f95c
MD5 0f325f13139bdf7902c6aa8bf9931bb0
BLAKE2b-256 fe25f249ba8773aa841ee106c389af0088559c4c86117ddca108a63f873babed

See more details on using hashes here.

File details

Details for the file pymzdata-0.66.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pymzdata-0.66.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cc420905aa19f9c7b388a57ca3156573962aac77b9cd4df35f26a0e19afb65a
MD5 84fb5fa82bd82c840eb04a9c6aa34f5d
BLAKE2b-256 fbc1a9340c223f3ef6c5a6b885b146ab3245f9aba2c14032db747574578382eb

See more details on using hashes here.

File details

Details for the file pymzdata-0.66.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymzdata-0.66.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f5bd7bbd544e623e882880a0ff171bc94acb55dd4c60c94fe2342d00a8251721
MD5 c266eee45c636a66b79199cae3e01930
BLAKE2b-256 ae43bfd2263fbd6253acf0c6b40793a337ad8e607a5ae2f354cce583aad8d34c

See more details on using hashes here.

File details

Details for the file pymzdata-0.66.1-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pymzdata-0.66.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7b010d111d9d3ad53de99f0967e45836103f3feb96b400e91398a8f18d034b32
MD5 77e26a29560646eecccdd51a32630481
BLAKE2b-256 4d298cb331dc6a7a27e086ed3ccc10f454eac7bd967ad63d135aaa8bbfe212ff

See more details on using hashes here.

Release history Release notifications | RSS feed

0.66.6

5 files

This release

0.66.1 This release

5 files

0.66.0

5 files

0.65.5

5 files

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