opentimstdf 1.0.6

Rust reader for timsTOF .d/ (TDF) mass spectrometry bundles.
Documentation

OpenTimsTDF

CI crates.io PyPI docs.rs License: Apache-2.0

Part of the OpenProteo stack for proteomics raw-file access. Sibling readers: OpenWRaw (Waters), OpenTFRaw (Thermo).

Rust and Python reader for timsTOF .d/ (TDF) acquisition bundles - the SQLite analysis.tdf metadata file and the analysis.tdf_bin binary frame stream. Runs on Linux, macOS, and Windows.

Documentation: sigilweaver.app/opentimstdf/docs

Install

Rust:

cargo add opentimstdf

Python:

pip install opentimstdf

Quickstart

Rust:

use opentimstdf::Reader;

let reader = Reader::open("my_bundle.d")?;
let calib = reader.calibration()?;
let frame = reader.frame(1)?;
for peak in reader.decode_peaks(&frame)? {
    let mz = calib.tof_to_mz(peak.tof);
    let im = calib.scan_to_inv_mobility(peak.scan);
    println!("scan={} mz={:.4} 1/K0={:.4} i={}", peak.scan, mz, im, peak.intensity);
}

Python:

import opentimstdf

reader = opentimstdf.Reader("my_bundle.d")
calib = reader.calibration()
frame = reader.frame(1)
for peak in reader.decode_peaks(frame):
    mz = calib.tof_to_mz(peak.tof)
    print(peak.scan, mz, peak.intensity)

See the docs site for the full quickstart, guide, and format specification.

License

Apache-2.0. See LICENSE.

The TDF format and codecs were worked out from public sample data (PRIDE accessions). See ATTRIBUTION.md.