Registry / data / pyteomics

pyteomics

JSON →
library5.0pypypiunverified

Pyteomics is a Python framework for proteomics data analysis, providing parsers and tools for common mass spectrometry formats (mzML, mzXML, MGF, etc.) and sequence database handling. Current version 4.7.5 is stable with monthly releases.

pip install pyteomics
INSTALL
IMPORT
SIG · PYTEOMICS
P
pyteomics
datapythonv5.0
Install
1.8s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mzml
import pyteomics.mzml
from pyteomics import mzml

Read an mzML file and print first 5 m/z values of each spectrum.

from pyteomics import mzml with mzml.MzML('example.mzML') as reader: for spectrum in reader: print(spectrum['m/z array'][:5])
Debug
Known issues
breakingIn version 4.x, the API for mzML reader changed from pyteomics.mzml.MzML to context manager with 'with' statement. Old code using mzml.MzML('file') may break if not wrapped in 'with'.
fix
Use 'with mzml.MzML('file') as reader:' pattern.
affects: >=4.0
deprecatedThe 'pyteomics.mzml.MzML' class is deprecated in favor of 'pyteomics.mzml.read' for iteration.
fix
Use 'from pyteomics import mzml; for spec in mzml.read('file'):' instead.
affects: >=4.5
gotchaIndexing spectra by scan number is not always sequential; use 'by_id' method rather than list index.
fix
Use 'reader[('scan', scan_number)]' or 'reader.by_id(scan_number)' to access by scan ID.
affects: all
Upgrade
Version history
5.0latest on PyPI · released May 28, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources
pyteomics — pip install pyteomics · libregistry