Expand description
Reading and writing mass spectrometry data file formats and abstractions over them.
There are many data file formats for recording mass spectrometry data.
Re-exports§
pub use crate::io::mgf::MGFError;
pub use crate::io::mgf::MGFReader;
pub use crate::io::mgf::MGFWriter;
pub use crate::io::mzml::AsyncMzMLReader;
pub use crate::io::mzml::MzMLParserError;
pub use crate::io::mzml::MzMLReader;
pub use crate::io::mzml::MzMLWriter;
pub use crate::io::mzmlb::MzMLbError;
pub use crate::io::mzmlb::MzMLbReader;
pub use thermo::ThermoRawReader;
Modules§
- Implements a parser for the PSI-MS mzML and indexedmzML XML file formats for representing raw and processed mass spectra, providing a
RandomAccessSpectrumIterator
interface for reading, andSpectrumWriter
interface for writing. - Implements a parser for the mzMLb file format for representing raw and processed mass spectra, providing a
RandomAccessSpectrumIterator
interface for reading, andSpectrumWriter
interface for writing. - Reader implementation for Thermo RAW files,
ThermoRawReaderType
.
Structs§
- A collection of spectra held in memory but providing an interface identical to a data file. This structure owns its data, so in order to yield ownership for
SpectrumSource
, they are cloned - An ordered mapping from entity ID to byte offset into the source file it resides in.
- A
flate2::bufread::MultiGzDecoder
that implementsstd::io::Seek
by by incrementally reading ahead, or rewinding to the beginning of the file and doing the same. - A generic iterator over a
SpectrumSource
implementer that assumes the source has already been indexed. Otherwise, the source’s own iterator behavior should be used. - An in-memory communication, non-rewindable channel carrying spectra with associated metadata.
- An alternative implementation of
SpectrumSource
for non-rewindable underlying streams
Enums§
- Controls the level of spectral detail read from an MS data file
- An explicit file format dispatching ADT that provides the complete
SpectrumSource
,RandomAccessSpectrumIterator
,MZFileReader
andMSDataFileMetadata
APIs. The preferred means of creating an instance is through theMZReaderType::open_path
function. - Mass spectrometry file formats that
mzdata
supports - An abstraction over places to write spectra
- An abstraction over different ways to get a
SpectrumSource
from a file path, buffer, or pipe. - Errors that may occur when reading a spectrum from a
RandomAccessSpectrumIterator
Traits§
- A trait defining some helper methods to make efficient use of indices automatic when opening a file from a path-like object.
- Encapsulate the read-transform-write process for mass spectrometry data sources.
- Analogous to to
RandomAccessSpectrumIterator
, but forSpectrumGrouping
implementations. - An extension of
SpectrumSource
that supports relocatable iteration relative to a specific spectrum coordinate or identifier. - A union trait for
SpectrumSource
andRandomAccessSpectrumIterator
- An abstraction over
SpectrumGroup
’s interface. - A base trait defining the behaviors of a source of spectra.
- Common interface for spectrum writing
Functions§
- Compute a SHA-1 digest of a file path
- Given a path, infer the file format and whether or not the file at that path is GZIP compressed, using both the file name and by trying to open and read the file header
- Given a path, infer the file format and whether or not the file at that path is GZIP compressed
- Given a stream of bytes, infer the file format and whether or not the stream is GZIP compressed. This assumes the stream is seekable.
Type Aliases§
- A specialization of
MZReaderType
for the default peak types, for common use. The preferred means of creating an instance is using theMZReader::open_path
function.