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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

File metadata

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

File hashes

Hashes for pymzdata-0.66.0.tar.gz
Algorithm Hash digest
SHA256 15f106ff862ea1cf80949382ff59cb3390b66257c4b5e21d70e9e86d90a97576
MD5 775c6b099fbe337a2cfae4a6bb645121
BLAKE2b-256 7399d35852fd2b3762a2d8dcb516ded1c5cd07cb84044f8d44293bebeb046f17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymzdata-0.66.0-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.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4a85824e55cc6724ce16824f049090d3e0fea3557b5b4f2cd96488e11aa95bdf
MD5 aaef07b205732420697399526f36d3c3
BLAKE2b-256 7dec3a94e45591efda0f0fffde312c5b499c09e2122bb635d0861e5267e7fc8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9dc83aa38f534cc771ec6c19563dc87be5f62770beadf60e8b27feb2060ed0e
MD5 04ea64dd3d1863415b42618fb45d4c1d
BLAKE2b-256 d530fd2744beec6bb668d7d00175bd728966e52350907da3757ca765c0c38ffc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93a5fe338c0380b413992c7fb08db355dcf047c6331f1f9cef50735c3be33a7b
MD5 5a4337fcd636b764af8a0cefecdd3407
BLAKE2b-256 5a0867159b8d7c3e28154b1e7cda947617407cb74a92f9724cf35a1165a628ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymzdata-0.66.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0709f622b196c70a8c2978e7e896b84e8f6835cc2bf660c2c8f94c73529e752c
MD5 0eb54016ebd17555279ce6526fe78d25
BLAKE2b-256 7f6a45697ee124f1d91b571140a5b979ea8f677d3be975f4b25b4a3139373b08

See more details on using hashes here.

Release history Release notifications | RSS feed

0.66.6

5 files

0.66.1

5 files

This release

0.66.0 This release

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