Skip to main content

Crate openreadout_waters

Crate openreadout_waters 

Source
Expand description

Clean-room reader for Waters MassLynx .raw directories: full-scan spectra of TOF instruments (SYNAPT, Xevo, Vion) with the m/z calibration applied, MS/MS precursors and lock-spray reference functions, MRM/SIR intensities of triple quadrupoles, per-scan statistics and analog channels.

Derived from public MetaboLights and PRIDE acquisitions compared spectrum by spectrum against the depositors’ own mzML conversions, and from rainbow’s public documentation pages for the 2-, 6- and 8-byte value layouts. No vendor library is used, linked or consulted; see docs/provenance/waters-raw.md.

Layout and vocabulary: docs/formats/waters-raw.md.

§Example

use openreadout_core::FormatReader;
use openreadout_waters::WatersRawReader;

let format = WatersRawReader.descriptor();
assert_eq!(format.id, openreadout_waters::WATERS_ID);
println!("{} ({}): .{}", format.name, format.family, format.extensions.join(", ."));

Reading an acquisition (pass the .raw directory itself):

use std::path::Path;

use openreadout_core::FormatReader;
use openreadout_waters::WatersRawReader;

let mut dataset = WatersRawReader.open(Path::new("run.raw"))?;
let info = dataset.info()?; // headers and scan indexes only
if let Some(run) = info.spectra.first() {
    println!("{} spectra, MS levels {:?}", run.scan_count, run.ms_levels);
    let spectrum = dataset.read_spectrum(0, 0)?;
    println!("MS{} at {:?} s: {} peaks", spectrum.ms_level, spectrum.rt_s, spectrum.mz.len());
}

§API stability

The supported API is what this page documents. The parser modules are public only so that tests and fuzz targets can reach them: they are hidden from this documentation and may change in any release.

Structs§

WatersRawReader
Waters MassLynx .raw directories.

Constants§

WATERS_ID
Format id of the Waters MassLynx .raw reader.