Module mzdata::io

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

Modules§

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 wrapper around an io::Read to provide limited io::Seek access even if the underlying stream does not support it. It pre-buffers the next n bytes of content in memory and permits seek operations within that range, but fails all seeks beyond that range.
  • A flate2::bufread::MultiGzDecoder that implements std::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§

Traits§

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§