Skip to main content

Crate openreadout_chrom

Crate openreadout_chrom 

Source
Expand description

Readers for chromatography data.

  • Agilent ChemStation .D directories and their .ch/.uv/.ms files (chemstation): docs/formats/chemstation.md.
  • Agilent OpenLab CDS injections (.dx containers with their .rx result packages, openlab-cds): docs/formats/openlab-cds.md.
  • AIA/ANDI netCDF (.cdf), chromatography and mass-spectrometry templates (andi-chrom): docs/formats/andi-chrom.md; includes a netCDF-3 classic reader.
  • Shimadzu LabSolutions .lcd/.gcd (shimadzu): docs/formats/shimadzu.md; includes a compound-file (OLE2) reader.
  • Thermo Scientific Chromeleon 7 archives (.cmbx, chromeleon): docs/formats/chromeleon.md.
  • Waters Empower ASCII raw-data exports (.arw, empower-arw): docs/formats/empower-arw.md.

Provenance of every layout: docs/provenance/<format>.md.

§Example

Every reader implements openreadout_core::FormatReader: descriptor says what it reads, sniff recognises a file from its first bytes, and open returns a openreadout_core::Dataset with a header-only info() summary and lazy data access.

use openreadout_core::FormatReader;
use openreadout_chrom::ChemStationReader;

let format = ChemStationReader.descriptor();
assert_eq!(format.id, openreadout_chrom::CHEMSTATION_ID);
println!("{} ({}): .{}", format.name, format.family, format.extensions.join(", ."));

Reading a file:

use std::path::Path;

use openreadout_core::FormatReader;
use openreadout_chrom::ChemStationReader;

let mut dataset = ChemStationReader.open(Path::new("sample.D"))?;
let info = dataset.info()?; // headers only
let trace = &info.traces[0];
println!("{} sweep(s) at {} Hz, {} channel(s)", trace.sweep_count, trace.sample_rate_hz, trace.channels.len());
// The first 1000 samples of sweep 0, every channel, scaled to physical units.
let samples = dataset.read_trace(0, 0, 0, 1000)?;
for (channel, values) in trace.channels.iter().zip(&samples.channels) {
    println!("{} ({}): {:?}", channel.name, channel.unit.as_deref().unwrap_or("?"), values.first());
}

Applications that accept any instrument file usually register every reader in an openreadout_core::Registry and let it detect the format; that is what the openreadout command-line tool does.

§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§

AndiReader
AIA/ANDI netCDF chromatography and mass-spectrometry files.
ChemStationReader
Agilent ChemStation .D directories and .ch/.uv/.ms signal files.
ChromeleonReader
Thermo Scientific Chromeleon 7 archives (.cmbx): a sequence’s injections and their 2D signals.
EmpowerArwReader
Waters Empower ASCII raw-data exports (.arw): one chromatogram with the header fields the export method chose.
OpenLabReader
Agilent OpenLab CDS injections: .dx containers (with the .rx result package of the same name and the result set’s .acaml sequence file when present) and .rx packages.
ShimadzuReader
Shimadzu LabSolutions .lcd (LC) and .gcd (GC) data files.

Constants§

ANDI_ID
Format id of the AIA/ANDI netCDF reader.
CHEMSTATION_ID
Format id of the Agilent ChemStation reader.
CHROMELEON_ID
Format id of the Chromeleon archive reader.
EMPOWER_ARW_ID
Format id of the Waters Empower ASCII export reader.
OPENLAB_ID
Format id of the Agilent OpenLab CDS reader.
SHIMADZU_ID
Format id of the Shimadzu LabSolutions reader.

Functions§

looks_like_andi
Does head look like an ANDI netCDF file (netCDF magic plus a template attribute or variable name in the header bytes)?
looks_like_openlab
Does head start like an OpenLab CDS container: a zip whose first member is the manifest, the results document or a GUID-named signal part? (A first [Content_Types].xml or _rels/.rels is any Open Packaging Conventions file, such as .xlsx: it counts only with a .dx/.rx extension, in OpenLabReader’s sniff.)