Skip to main content

Crate openreadout_agilent_ms

Crate openreadout_agilent_ms 

Source
Expand description

Clean-room reader for Agilent MassHunter .d mass-spectrometry directories (Q-TOF and triple-quadrupole acquisitions).

Derived from public MetaboLights data sets compared spectrum by spectrum against the depositors’ own mzML conversions, and from the MSScan.xsd schema every data directory carries. No vendor library is used, linked or consulted; see docs/provenance/agilent-masshunter.md.

Layout and vocabulary: docs/formats/agilent-masshunter.md.

§Example

use openreadout_core::FormatReader;
use openreadout_agilent_ms::AgilentMsReader;

let format = AgilentMsReader.descriptor();
assert_eq!(format.id, openreadout_agilent_ms::FORMAT_ID);
println!("{} ({}): .{}", format.name, format.family, format.extensions.join(", ."));

Reading a data directory (pass the .d directory itself):

use std::path::Path;

use openreadout_core::FormatReader;
use openreadout_agilent_ms::AgilentMsReader;

let mut dataset = AgilentMsReader.open(Path::new("run.d"))?;
let info = dataset.info()?; // the scan index only
let run = &info.spectra[0];
println!("{} spectra, MS levels {:?}", run.scan_count, run.ms_levels);
let spectrum = dataset.read_spectrum(0, 0)?;
println!("MS{} at {:?} s: {} points", 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§

AgilentMsReader
The Agilent MassHunter .d reader.

Constants§

FORMAT_ID
Format id used on the command line and in JSON.