Skip to content

tdfpy

Python package PyPI version Python 3.12+ DOI License: MIT

tdfpy reads Bruker timsTOF .d folders (analysis.tdf and analysis.tdf_bin) in pure Python, with no Bruker native library. DDA, DIA and PRM acquisitions (PASEF and diaPASEF) come back as familiar objects: MS1 frames, precursors, isolation windows, PRM targets and transitions.

Spectra are read lazily and centroided by a Numba-accelerated pipeline that keeps ion mobility: region exclusion, smoothing, noise filters, and a choice of two centroiders. Peaks are NumPy arrays of [m/z, intensity, 1/K0].

from tdfpy import DDA

with DDA("sample.d") as dda:
    for frame in dda.ms1:
        peaks = frame.centroid()  # shape (N, 3): m/z, intensity, 1/K0

Installation

pip install tdfpy

Requires Python 3.12+. Extras: tdfpy[viz] (plots), tdfpy[mcp] (MCP server).

Where next

The tacular-omics mass spectrometry stack:

  • tdfpy (this package) reads Bruker timsTOF .d data.
  • mzmlpy reads mzML files.
  • spxtacular processes the spectra from both: centroiding, deconvolution, matching, scoring and plotting.