# imzml ## What does this crate do? * Read data in the mass spectrometry format [mzML](https://www.psidev.info/mzML) or the mass spectrometry imaging format [imzML](https://ms-imaging.org/imzml/). * Validate the data file against the specification ## Read mzML ```rust let parser = MzMLReader::from_path("/path/to/data.mzML").unwrap(); for error in parser.errors() { println!("{:?}", error); } let mzml: MzML<_> = parser.into(); ``` ## Validate mzML ```rust use imzml::validation::full_validate; let mut validation_errors = full_validate(parser.ontology(), mzml); ``` ## Read imzML ```rust let parser = ImzMLReader::from_path("/path/to/data.imzML").unwrap(); for error in parser.errors() { println!("{:?}", error); } let imzml: ImzML<_> = parser.into(); let mz_772 = imzml.ion_image(772.573, 100.0); ``` ## Validate imzML ```rust use imzml::validation::full_validate; let mut validation_errors = full_validate(parser.ontology(), imzml); ```