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.7.tar.gz (818.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.7-cp39-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.9+Windows x86-64

pymzdata-0.66.7-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.7-cp39-abi3-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pymzdata-0.66.7-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.7.tar.gz.

File metadata

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

File hashes

Hashes for pymzdata-0.66.7.tar.gz
Algorithm Hash digest
SHA256 8151e5cf20bcacba994e345b99634c1e9f9750a016a9d675a33b7c6f8545a70c
MD5 1e8d53cdd11a207f83b8aa7d20d40524
BLAKE2b-256 b487dd2927ed775e317d067224148ab0dc36d1383a8ab1a39f40a5a3dd7d343d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymzdata-0.66.7-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.15.0

File hashes

Hashes for pymzdata-0.66.7-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5a82e1eb09f6c668646c2f31f13769f2bce0435981e92b3507b2c0e0329900b1
MD5 301d411d73efdb16da333c0147062277
BLAKE2b-256 d11900387f1d6012447862709852bb259f77cdf38c5b5cea9f8c15214422bde9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0907354c1be98cfb8e22b5d5f356913a7b5ee700170962540405f4d197565b1
MD5 26d08b6a2e87f3674868b4a3a45ad06f
BLAKE2b-256 78d81db44ffd1346a45ecd63aed81f81d5cfabe65425c5de2aa4a5bdeaed4e93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.7-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3709ac26c2017916ccd3acc9af00d93855659bc3363607950c73b853434cbbc
MD5 08b3e8bd5865a7843591a9877eb653a8
BLAKE2b-256 8dc6d48d76c068992af28ddf254c0d86d11f53f93abd25b88094ad0154433bb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.7-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 79b33e55235b27b9ca58e0c3ab7639c585f0f5609884afdd8630059bb44ba7da
MD5 41b9b801c14fbd16e04daffa108de0aa
BLAKE2b-256 c4edd66a023acef80fb3233df4cce2be019269ac18c3c153a8052ad077b60196

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.66.7 This release

5 files

0.66.6

5 files

0.66.1

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