mzdata 0.66.2

A library to read mass spectrometry data formats and a data model for mass spectra
Documentation
[package]

name = "mzdata"

edition = "2021"



version.workspace = true

license.workspace = true

repository.workspace = true

documentation.workspace = true

categories.workspace = true

keywords.workspace = true

description.workspace = true



exclude = ["tmp/*", "test/data/*"]



# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]

name = "mzdata"

# src = "src/main.rs"



[[example]]

name = "async_mzcat"

required-features = ["async"]



[[example]]

name = "mzcat"

required-features = ["parallelism"]



[[example]]

name = "averaging_writer"

required-features = ["parallelism", "mzsignal", "nalgebra"]



[[example]]

name = "random_access_iter"

required-features = ["nalgebra"]

doc-scrape-examples = true



[[example]]

name = "mzinfo"

doc-scrape-examples = true



[[example]]

name = "mzconvert"

doc-scrape-examples = true



[lib]

name = "mzdata"

# src = "src/lib.rs"



[profile.release]

lto = true

debug = true



[features]

# default = ["nalgebra", "parallelism", "mzsignal", "zlib-ng-compat"]

default = ["zlib-ng-compat", "mgf", "mzml"]



checksum = ["dep:sha1", "dep:hex"]



cv = ["mzdata-param/cv", "mzdata-param/static_data", "mzdata-meta/cv", "dep:mzcv"]



mgf = []

mzml = ["dep:quick-xml", "checksum", "dep:memchr", "dep:encoding_rs"]

imzml = ["mzml", "dep:uuid", "mzdata-param/imzml"]



numpress = ["mzdata-bindata/numpress"]



mzsignal = ["dep:mzsignal", "mzdata-bindata/mzsignal"]



# mzsignal's main functionality requires a linear algebra backend.

# Rust does not support exclusive-or style feature flags.

nalgebra = ["mzsignal", "mzsignal/nalgebra", "mzdata-spectrum/nalgebra"]

openblas = ["mzsignal", "mzsignal/openblas", "mzdata-spectrum/openblas"]

netlib = ["mzsignal", "mzsignal/netlib", "mzdata-spectrum/netlib"]

intel-mkl = ["mzsignal", "mzsignal/intel-mkl", "mzdata-spectrum/intel-mkl"]



parallelism = ["dep:rayon", "mzsignal?/parallelism", "mzdata-spectrum/parallelism"]



# The zlib feature makes the code faster unoptimized, but with LTO the default

# algorithm is faster on tests. Odds are on real data, this will vary with the

# size of the data being shuttled back and forth, and on the quality of the data

# (de)compression.

#

# After substantial testing, zlib-ng-compat is the winner for speed and size on

# a variety of real-world data.

zlib = ["flate2/zlib", "mzdata-bindata/zlib", "mzdata-spectrum/zlib"]

zlib-ng-compat = ["flate2/zlib-ng-compat", "mzdata-bindata/zlib-ng-compat", "mzdata-spectrum/zlib"]

zlib-ng = ["flate2/zlib-ng", "mzdata-bindata/zlib-ng", "mzdata-spectrum/zlib"]

zlib-rs = ["flate2/zlib-rs", "mzdata-bindata/zlib-rs", "mzdata-spectrum/zlib"]

miniz_oxide = ["flate2/rust_backend", "mzdata-bindata/miniz_oxide", "mzdata-spectrum/miniz_oxide"]

zstd = ["dep:zstd", "mzdata-bindata/zstd", "mzdata-spectrum/zstd"]



# Enables reading mzMLb

mzmlb = ["mzml", "dep:hdf5", "dep:ndarray", "dep:hdf5-sys"]



# Enable compiling and statically linking HDF5, which requires building

# libz-sys in static mode, which conflicts with flate2/zlib-ng-compat

# but not flate2/zlib

hdf5_static = ["mzmlb", "hdf5-sys/static", "hdf5-sys/zlib", "dep:libz-sys"]



thermo = [

    "dep:thermorawfilereader",

    "thermorawfilereader/net8_0",

    "thermorawfilereader/nethost-download",

    "checksum",

]



bruker_tdf = [

    "dep:timsrust",

    "dep:parking_lot",

    "dep:rusqlite",

    "mzsignal",

    "checksum",

]



doc-only = []



serde = [

    "dep:serde",

    "mzpeaks/serde",

    "mzsignal?/serde",

    "chrono/serde",

    "dep:serde_json",

    "dep:serde_with",

    "mzdata-param/serde",

    "mzdata-meta/serde",

    "mzdata-bindata/serde"

]



async = ["async_partial", "tokio/fs"]

async_partial = [

    "dep:tokio",

    "quick-xml/async-tokio",

    "dep:futures",

]



proxi = ["dep:reqwest", "serde"]

proxi-async = ["proxi", "dep:futures"]

libloading = ["dep:libloading"]



[dependencies]

regex = { workspace = true }



serde = { workspace = true, optional = true }

serde_json = { workspace = true, optional = true }

serde_with = { workspace = true, optional = true }



thiserror = { workspace = true }

num-traits = { workspace = true }

log = { workspace = true}



quick-xml = { version = "0.41", features = ["serialize"], optional = true }

uuid = { version = "1.0", features = ["v4", "serde"], optional = true }



indexmap = { version = "2.0.0", features = ["serde"] }



chrono = { workspace = true }

bitflags = { workspace = true }

identity-hash = { workspace = true }



mzpeaks = { workspace = true }



# Internal parallelism

rayon = { workspace = true, optional = true }



# Internal signal processing

mzsignal = { workspace = true, optional = true }

mzdata-param = { workspace = true }

mzdata-meta = { workspace = true }

mzdata-bindata = { workspace = true }

mzdata-spectrum = { workspace = true }



# Checksums and hashing

sha1 = { workspace = true, optional = true }

hex = { workspace = true, optional = true }



# Bytes and compression

flate2 = { workspace = true }

zstd = { workspace = true, optional = true }

bytemuck = { workspace = true, features = ["extern_crate_alloc", "min_const_generics"] }

base64-simd = { workspace = true }



# Async reader features

tokio = { version = "1.42", optional = true, features = ["macros"] }



# mzMLb-related features

hdf5 = { version = "0.8.1", optional = true, features = ["blosc", "lzf"] }

hdf5-sys = { version = "0.8.1", optional = true }

libz-sys = { version = "1.1", default-features = false, features = [

    "static",

], optional = true }

ndarray = { version = "0.15.6", optional = true }

filename = { version = "0.1.1", optional = true }



# PROXI-related behaviors

reqwest = { version = "0.13", features = ["json", "blocking"], optional = true }

futures = { version = "0.3", optional = true }



# Thermo RAW-related features

thermorawfilereader = { version = "=0.7.2", default-features = false, optional = true }



# Bruker TDF-related features

rusqlite = { version = "0.31.0", optional = true }

timsrust = { version = "0.4.1", default-features = false, features = [

    "tdf",

], optional = true }



parking_lot = { version = "0.12.3", optional = true }

memchr = { version = "2.7.4", optional = true }

encoding_rs = { version = "0.8.35", optional = true }

libloading = { version = "0.8.6", optional = true }



mzcv = { workspace = true, optional = true }





[dev-dependencies]

criterion = { version = "0.5.1", features = ["html_reports"] }

test-log = "0.2.12 "

env_logger = "0.11.6"

tempfile = "3.10"

clap = { version = "4.4.11", features = ["derive"] }

tokio = { version = "1.42", features = ["macros", "fs", "rt-multi-thread"] }





[[bench]]

name = "mzml"

harness = false





[package.metadata.docs.rs]

features = [

    "mzml",

    "mgf",

    "parallelism",

    "mzsignal",

    "nalgebra",

    "imzml",

    "async",

    "proxi",

    "proxi-async",

    # "thermo",

    "doc-only",

    "bruker_tdf",

    "cv",

]

no-default-features = true





[workspace]



members = [

    ".",

    "crates/cvbuild",

    "crates/mzdata-param",

    "crates/mzdata-meta",

    "crates/mzdata-bindata",

    "crates/mzdata-spectrum",

    "crates/mzdata-spectra",

]



exclude = ["crates/pymzdata"]



[workspace.package]



version = "0.66.2"

keywords = ['mass-spectrometry', 'mzml', 'mgf']



categories = ["science", "parser-implementations", "data-structures"]



description = "A library to read mass spectrometry data formats and a data model for mass spectra"



license = "Apache-2.0"



repository = "https://github.com/mobiusklein/mzdata"



documentation = "https://docs.rs/mzdata"





[workspace.dependencies]



mzpeaks = { version = ">=1.0.6,<1.1.0" }



# Internal signal processing

mzsignal = { version = ">=1.1.10,<1.2.0", default-features = false, features = [

    'avx',

] }



mzdata-param = { version = "0.66.2", path = "./crates/mzdata-param" }

mzdata-meta = { version = "0.66.2", path = "./crates/mzdata-meta" }

mzdata-bindata = { version = "0.66.2", path = "./crates/mzdata-bindata" }

mzdata-spectrum = { version = "0.66.2", path = "./crates/mzdata-spectrum" }



# Checksums and hashing

sha1 = { version = "0.11" }

hex = { version = "0.4.3" }



# Common

thiserror = "2.0.2"

log = "0.4.20"

identity-hash = "0.1.0"

num-traits = "0.2"



# serialization

serde = { version = "1.0", features = ["derive"] }

serde_json = { version = "1.0" }

serde_with = { version = "3.12.0" }





# Controlled vocabulary handling

mzcv = { version = "0.3.0" }

bincode = { version = "2"}

context_error = {version = "0.3.0" }



chrono = "0.4.37"

regex = "1"

bitflags = "2.5.0"



# Internal parallelism

rayon = { version = ">=1.8.0,<2.0" }



# bindata

zstd = { version = "0.13.3" }

flate2 = { version = "1.0.20" }

numpress = { version = "1.1.0", package = "numpress-rs" }

bytemuck = { version = "1.18.0", features = ["extern_crate_alloc", "min_const_generics"] }

base64-simd = "0.8.0"