11 unstable releases (3 breaking)

0.4.2 Dec 19, 2024
0.4.1 Sep 3, 2024
0.4.0 Aug 28, 2024
0.3.0 Jul 8, 2024
0.2.2 Nov 6, 2023

#494 in Parser implementations

Download history 25/week @ 2024-10-02 2/week @ 2024-10-09 5/week @ 2024-10-16 26/week @ 2024-10-23 26/week @ 2024-10-30 10/week @ 2024-11-13 20/week @ 2024-11-20 4/week @ 2024-11-27 49/week @ 2024-12-04 88/week @ 2024-12-11 140/week @ 2024-12-18 15/week @ 2024-12-25 8/week @ 2025-01-08 312/week @ 2025-01-15

337 downloads per month
Used in mzdata

Apache-2.0

125KB
3K SLoC

Crates.io docs.rs

TimsRust

A crate to read Bruker TimsTof data.

Stability

NOTE: TimsRust does not yet have a stable version! Use with caution.

Installation

Add this crate to your Cargo.toml:

[dependencies]
timsrust = "x.x.x"

Usage

TimsRust is intended to be used as a library and not as a stand-alone application. An example of how to use it is found in e.g. Sage.

Basics

Two primary data types are exposed through TimsRust:

  • Spectra: A traditional representation that expresses intensitites in function of mz values for a given precursor.
  • Frames: All recorded data from a single TIMS elution (i.e. at one specific retention_time).

File formats

Two file formats are supported:

  • TDF - Bruker .d folder containing:

    • analysis.tdf
    • analysis.tdf_bin
  • miniTDF - ProteoScape optimized Bruker file-format. Similar to TDF, miniTDF consists of multiple files: a binary '.bin' and an index '.parquet' file. The file-names are made up to the following convention: <producing-engine-name>.<domain-name>.<extension>. e.g. for MS2 spectrum information: <producing-engine-name>.ms2spectrum.<extension>. Therefore the following files are expected in the provided ms2 folder:

    • *.ms2spectrum.bin
    • *.ms2spectrum.parquet

Python bindings

The timsrust_pyo3 package is an example of how the performance of TimsRust can be utilized in Python

Planned changes for future versions

TODO

  • Improve docs
  • Improve tests
  • Pase CompressionType1
  • Tarred file reader
  • Clean up src (FrameReader, ...)
  • Cleaner try_from conversions/readers
  • Make Path of TimsTOF data into special type
  • Single access point for all readers?
  • Few unchecked unwraps left
  • Queryable data in all dimensions
  • ...

Dependencies

~5–17MB
~264K SLoC