openaraw 0.1.0

Rust reader for Agilent MassHunter .d mass spectrometry directories.
Documentation

OpenARaw

License: Apache-2.0 Rust MSRV

Part of the OpenMassSpec stack for mass spectrometry raw-file access. Sibling readers: OpenTFRaw (Thermo), OpenWRaw (Waters), OpenTimsTDF (Bruker).

Rust and Python reader for Agilent MassHunter .d mass spectrometry data directories, clean-room reverse-engineered with no Agilent SDK or software dependency. Covers the modern AcqData MassHunter shape across Q-TOF (profile and centroid) and QQQ (MRM) acquisitions.

Status

Not yet published to crates.io or PyPI. The reader is implemented and validated against the full corpus (332 of 338 real-world PRIDE .d datasets pass conformance checks end to end; the remaining 6 are malformed source uploads, see docs/format/06-known-limitations.md).

Install

Not yet published. Once released:

cargo add openaraw
pip install openaraw

Quickstart

Rust:

use openaraw::reader::Reader;
use openmassspec_core::SpectrumSource;

let mut reader = Reader::open("sample.d")?;
for spectrum in reader.iter_spectra() {
    println!("{}: {} peaks", spectrum.native_id, spectrum.mz.len());
}

Python:

import openaraw

reader = openaraw.RawReader("sample.d")
spectrum = reader.read_spectrum(0)
print(spectrum.ms_level, spectrum.retention_time_sec, len(spectrum.mz))

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.