openszraw 0.1.1

Rust reader for Shimadzu LabSolutions mass spectrometry raw data (.qgd GC-MS, .lcd LC-MS IT-TOF/QTOF).
Documentation

OpenSZRaw

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

Rust and Python reader for Shimadzu LabSolutions mass spectrometry raw data (.lcd LC-MS, .qgd GCMS, .gcd GC), with no Shimadzu SDK or software dependency. Covers .qgd GC-MS (full-scan profile and MRM/targeted) and .lcd LC-MS across IT-TOF (profile) and QTOF (centroid) acquisitions.

Documentation: sigilweaver.app/openszraw/docs

Sibling readers in the same stack: OpenTFRaw (Thermo), OpenWRaw (Waters), OpenTimsTDF (Bruker), OpenARaw (Agilent), OpenSXRaw (SCIEX).

Install

Prefer openmassspec-io with the shimadzu feature/extra unless you need this parser standalone (minimal dependencies, or building your own abstraction) - the umbrella gives you format auto-detection, mzML conversion, and Arrow streaming across all wired-in vendors for free:

cargo add openmassspec-io --features shimadzu
pip install openmassspec[shimadzu]

Standalone:

Rust:

cargo add openszraw

Python:

pip install openszraw

Quickstart

Rust:

use openszraw::reader::Reader;
use openmassspec_core::SpectrumSource;

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

Python:

import openszraw

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

Reader::open (and RawReader) auto-detects .qgd vs .lcd IT-TOF vs .lcd QTOF from the file's internal CFBF stream layout, never from the filename or extension alone.

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

License

Apache-2.0. See LICENSE.

The format specification was developed by binary analysis of public mass-spectrometry datasets (PRIDE, MassIVE, and MetaboLights accessions). See CORPUS.md and ATTRIBUTION.md.