Skip to content

Sigilweaver/OpenSZRaw

Repository files navigation

OpenSZRaw

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

Part of the OpenMassSpec stack for mass spectrometry raw-file access.

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

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.

About

Clean-room Rust/Python reader for Shimadzu LabSolutions MS raw data (.lcd/.qgd/.gcd) - part of the OpenMassSpec stack

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages