Crate thermorawfilereader

Source
Expand description

Read Thermo RAW files using a self-hosted .NET runtime that uses Thermo Fisher’s RawFileReader library.

The main access point is RawFileReader, via RawFileReader::open.

§Limitations

§Platforms

RawFileReader requires a .NET runtime. The linking between Rust and the host’s .NET runtime is managed by netcorehost. While it supports most major operating, you can check which versions which version of .NET supports which OS version at https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md.

If you wish to link with a local nethost library instead of downloading the latest version at build time, please see netcorehost’s documentation. This is still distinct from actually statically linking with .NET’s coreclr library which must be installed separately.

§Why no Read support?

The underlying .NET library from Thermo’s public API expects a plain file paths as strings and likes to fiddle with file system locks. There is no way for it to consume .NET streams, let alone Rust analogs like Read, so for the moment we can only open RAW files on the file system.

§Licensing

By using this library, you agree to the RawFileReader License

Modules§

schema
The FlatBuffers schema used to exchange data, see schema.fbs

Structs§

Acquisition
Describes a scan acquisition.
ChromatogramData
The signal trace of a chromatogram
ChromatogramDescription
Describes a chromatogram, which is a signal over time.
ExtendedSpectrumData
FileDescription
A wrapper around the FileDescription FlatBuffer schema. It mirrors the data stored there-in.
InstrumentConfiguration
An instrument configuration is a set of hardware components
InstrumentMethod
The text describing how the instrument was told to operate.
InstrumentModel
A wrapper around the InstrumentModel FlatBuffer schema. It mirrors the data stored there-in.
RawFileReader
A wrapper around a .NET RawFileReader instance. It carries a reference to a .NET runtime and a FFI pointer to access data through. The dotnet runtime is controlled via locks and is expected to be thread-safe.
RawFileReaderIntoIter
IntoIterator for RawFileReader
RawFileReaderIter
Iterator for RawFileReader
RawSpectrum
A wrapper around the SpectrumDescription FlatBuffer schema. It mirrors the data stored there-in.
SpectrumData
A sub-set of a RawSpectrum corresponding to the m/z and intensity arrays of a mass spectrum. All data is borrowed internally from the RawSpectrum’s buffer.
StatusLog
StatusLogCollection
A collection of time series information describing the instrument run
TrailerValue
A single Trailer Extra value entry.
TrailerValues

Enums§

DotNetRuntimeCreationError
Things that can go wrong while creating a .NET runtime
IonizationMode
This enum mirrors the different types of ionization modes covered in Thermo’s RawFileReader library
MassAnalyzer
This enum mirrors the different types of mass analyzers in Thermo’s RawFileReader library
RawFileReaderError
A set of error codes to describe how creating and using a RawFileReader might fail (or not).
TraceType
This enum mirrors the different types of traces covered in Thermo’s RawFileReader library.

Functions§

set_runtime_dir
Set the default runtime directory to path that will be accessed by get_runtime
try_get_runtime
Get a reference to a shared .NET runtime and associated DLL bundle or return and error if the runtime cannot be created.