Part of the OpenProteo stack for proteomics raw-file access. Sibling readers: OpenWRaw (Waters), OpenTimsTDF (Bruker).
Rust and Python reader for Thermo Fisher .raw mass spectrometry files,
covering format versions 8 through 66 (LCQ Classic through Orbitrap
Astral and modern TSQ).
Documentation: sigilweaver.app/opentfraw/docs
Rust:
cargo add opentfrawPython:
pip install opentfrawRust:
use opentfraw::RawFileReader;
let raw = RawFileReader::open_path("sample.raw")?;
let mut file = std::fs::File::open("sample.raw")?;
for scan_num in 1..=raw.num_scans {
let peaks = raw.read_scan_peaks(&mut file, scan_num)?;
println!("scan {scan_num}: {} peaks", peaks.mz.len());
}Python:
import opentfraw
raw = opentfraw.RawFile("run.raw")
mz, intensity = raw.peaks(3)
print(raw.scan(3)["filter_string"])
raw.to_mzml("run.mzML")See the docs site for the full guide, format specification, and API reference.
Apache-2.0. See LICENSE.
The format specification was developed by binary analysis of public mass-spectrometry datasets (PRIDE accessions). See CORPUS.md and ATTRIBUTION.md.