Skip to content

Sigilweaver/OpenTFRaw

Repository files navigation

OpenTFRaw

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

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

Install

Rust:

cargo add opentfraw

Python:

pip install opentfraw

Quickstart

Rust:

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.

Used by

Project Description
Mascope by Karsa Oy Mass spectrometry data analysis platform using OpenTFRaw to ingest Thermo .raw files.

License

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.

About

Pure-Rust reader for Thermo Fisher .raw mass-spectrometry files, with Python bindings.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors