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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

File metadata

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

File hashes

Hashes for pymzdata-0.66.6.tar.gz
Algorithm Hash digest
SHA256 167d903d95c617b2ad44bed560fe2e88e7ad7a5f5f303b5503029f6eb064ae0b
MD5 4a972f1c5978639acbe1c11befea46b0
BLAKE2b-256 a605d607de356fc77706b22243ec108b9d61b9e2bb86f19acdc3f42a50bc64a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymzdata-0.66.6-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.6-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a0a584d3bb199de25cc1c2c161857e9e6453a2aef5c9d1e36067a3c1dd5f42a7
MD5 2757a3dec4e194dddfc3272796c6c358
BLAKE2b-256 b61f5225ebb21a26bef66e4ae61791617ba3ae561868c258b719175e75221b8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ae1b07d2991e58914855a8851ba4b33a3aece138731ab5c626cc1ce4c49bf19
MD5 df78975928e955bb14b333aa73696e28
BLAKE2b-256 dacd64be68882c9133e5aad879e876d247db24b553d2cc181be4dd263f1f2f77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.6-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71fd9503b33bcd1cd6e04b1431da7814a5b82a9f1d05c8cbad70174d2eb2249b
MD5 f6a2505250169ec2dfd75f0ae0c4349e
BLAKE2b-256 e4f2001ada858953f932b55d84fcb93da9bf79fd3293070f4863b1acb49d4cfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.6-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 914ab9ea8ec3bec2e83a0cc8bc4ebd6f7efe658cc83b543bd2940e5d37ccd21a
MD5 84cc6827f8c29af56a0e916d705dcc3c
BLAKE2b-256 28db29fde3e4c6d9da717f67630fa6a479d7cef19078a9ea6f9190abebde7904

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.66.6 This release

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