From a2e4820b3c308c3f49308c1c36b0d48bc405828b Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Wed, 18 Sep 2024 16:23:47 +0200 Subject: [PATCH 01/13] FEAT: implemented get_frame_without_coordinates in frame_reader --- src/io/readers/frame_reader.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/io/readers/frame_reader.rs b/src/io/readers/frame_reader.rs index ce956b7..4c604b0 100644 --- a/src/io/readers/frame_reader.rs +++ b/src/io/readers/frame_reader.rs @@ -113,7 +113,7 @@ impl FrameReader { pub fn get(&self, index: usize) -> Result { // NOTE: get does it by 0-offsetting the vec, not by Frame index!!! - let mut frame = self.frames[index].clone(); + let mut frame = self.get_frame_without_coordinates(index)?; let offset = self.offsets[index]; let blob = self.tdf_bin_reader.get(offset)?; let scan_count: usize = @@ -130,6 +130,18 @@ impl FrameReader { Ok(frame) } + pub fn get_frame_without_coordinates( + &self, + index: usize, + ) -> Result { + let frame = self + .frames + .get(index) + .ok_or(FrameReaderError::IndexOutOfBounds)? + .clone(); + Ok(frame) + } + pub fn get_all(&self) -> Vec> { self.parallel_filter(|_| true).collect() } @@ -249,4 +261,6 @@ pub enum FrameReaderError { CorruptFrame, #[error("{0}")] QuadrupoleSettingsReaderError(#[from] QuadrupoleSettingsReaderError), + #[error("Index out of bounds")] + IndexOutOfBounds, } From 9704d09f4b4ac3996433b1c07f20c2ea195bf3b2 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Wed, 18 Sep 2024 16:24:23 +0200 Subject: [PATCH 02/13] FEAT: implemented get_all function for tdf_blob --- src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs b/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs index 6445244..12024c6 100644 --- a/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs +++ b/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs @@ -14,6 +14,12 @@ impl TdfBlob { } } + pub fn get_all(&self) -> Vec { + (0..self.len()) + .map(|index| self.get(index).unwrap()) + .collect() + } + pub fn get(&self, index: usize) -> Option { if index >= self.len() { None From 3538d5f4f5049f6314d222ea881aca0a802d8763 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Wed, 18 Sep 2024 16:24:57 +0200 Subject: [PATCH 03/13] CHORE: removed debug for SpectrumReader as not needed --- src/io/readers/spectrum_reader.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/io/readers/spectrum_reader.rs b/src/io/readers/spectrum_reader.rs index 7b125ab..848e843 100644 --- a/src/io/readers/spectrum_reader.rs +++ b/src/io/readers/spectrum_reader.rs @@ -2,12 +2,9 @@ mod minitdf; #[cfg(feature = "tdf")] mod tdf; - -use core::fmt; - #[cfg(feature = "minitdf")] use minitdf::{MiniTDFSpectrumReader, MiniTDFSpectrumReaderError}; -use rayon::iter::{IntoParallelIterator, ParallelIterator}; +use rayon::prelude::*; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; use std::path::{Path, PathBuf}; @@ -23,12 +20,6 @@ pub struct SpectrumReader { spectrum_reader: Box, } -impl fmt::Debug for SpectrumReader { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "SpectrumReader {{ /* fields omitted */ }}") - } -} - impl SpectrumReader { pub fn build() -> SpectrumReaderBuilder { SpectrumReaderBuilder::default() From 2a7f6bf2766246a5ca766bf82b3e7970e3a832c0 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Wed, 18 Sep 2024 16:41:33 +0200 Subject: [PATCH 04/13] FEAT: added correct reading of compression type for frame reader --- src/io/readers/frame_reader.rs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/io/readers/frame_reader.rs b/src/io/readers/frame_reader.rs index 4c604b0..2875597 100644 --- a/src/io/readers/frame_reader.rs +++ b/src/io/readers/frame_reader.rs @@ -19,7 +19,8 @@ use super::{ }, tdf_blob_reader::{TdfBlob, TdfBlobReader, TdfBlobReaderError}, }, - QuadrupoleSettingsReader, QuadrupoleSettingsReaderError, + MetadataReader, MetadataReaderError, QuadrupoleSettingsReader, + QuadrupoleSettingsReaderError, }; #[derive(Debug)] @@ -30,6 +31,7 @@ pub struct FrameReader { acquisition: AcquisitionType, offsets: Vec, dia_windows: Option>>, + compression_type: u8, } impl FrameReader { @@ -37,6 +39,16 @@ impl FrameReader { let sql_path = find_extension(&path, "analysis.tdf").ok_or( FrameReaderError::FileNotFound("analysis.tdf".to_string()), )?; + let compression_type = + match MetadataReader::new(&sql_path)?.compression_type { + 2 => 2, + compression_type => { + return Err(FrameReaderError::CompressionTypeError( + compression_type, + )) + }, + }; + let tdf_sql_reader = SqlReader::open(sql_path)?; let sql_frames = SqlFrame::from_sql_reader(&tdf_sql_reader)?; let bin_path = find_extension(&path, "analysis.tdf_bin").ok_or( @@ -92,6 +104,7 @@ impl FrameReader { AcquisitionType::DIAPASEF => Some(quadrupole_settings), _ => None, }, + compression_type, }; Ok(reader) } @@ -112,6 +125,18 @@ impl FrameReader { } pub fn get(&self, index: usize) -> Result { + match self.compression_type { + 2 => self.get_from_compression_type_2(index), + _ => Err(FrameReaderError::CompressionTypeError( + self.compression_type, + )), + } + } + + pub fn get_from_compression_type_2( + &self, + index: usize, + ) -> Result { // NOTE: get does it by 0-offsetting the vec, not by Frame index!!! let mut frame = self.get_frame_without_coordinates(index)?; let offset = self.offsets[index]; From 42cf3ab8793a78c7c2cb3bcacaca7b954a1e5363 Mon Sep 17 00:00:00 2001 From: "J. Sebastian Paez" Date: Thu, 26 Sep 2024 10:03:30 -0700 Subject: [PATCH 05/13] chore: update dep versions --- Cargo.lock | 322 +++++++++--------- Cargo.toml | 8 +- src/io/readers/file_readers/parquet_reader.rs | 9 +- 3 files changed, 170 insertions(+), 169 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04cfc3b..0b4192a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,10 +3,10 @@ version = 3 [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -69,15 +69,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "arrow-array" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9a0fd21121304cad96f307c938d861cb1e7f0c151b93047462cd9817d760fb" +checksum = "cd2bf348cf9f02a5975c5962c7fa6dee107a2009a7b41ac5fb1a027e12dc033f" dependencies = [ "ahash", "arrow-buffer", @@ -91,36 +91,40 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ce342ecf5971004e23cef8b5fb3bacd2bbc48a381464144925074e1472e9eb" +checksum = "3092e37715f168976012ce52273c3989b5793b0db5f06cbaa246be25e5f0924d" dependencies = [ + "bytes", "half", "num", ] [[package]] name = "arrow-cast" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b94a0ce7d27abbb02e2ee4db770f593127610f57b32625b0bc6a1a90d65f085" +checksum = "7ce1018bb710d502f9db06af026ed3561552e493e989a79d0d0f5d9cf267a785" dependencies = [ "arrow-array", "arrow-buffer", "arrow-data", "arrow-schema", "arrow-select", + "atoi", + "base64", "chrono", "half", "lexical-core", "num", + "ryu", ] [[package]] name = "arrow-data" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9a83dad6a53d6907765106d3bc61d6d9d313cfe1751701b3ef0948e7283dc2" +checksum = "4e4ac0c4ee79150afe067dc4857154b3ee9c1cd52b5f40d59a77306d0ed18d65" dependencies = [ "arrow-buffer", "arrow-schema", @@ -130,9 +134,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a46da5e438a854e0386b38774da88a98782c0973c6dbc5c949ca4e02faf9b016" +checksum = "bb307482348a1267f91b0912e962cd53440e5de0f7fb24c5f7b10da70b38c94a" dependencies = [ "arrow-array", "arrow-buffer", @@ -144,16 +148,17 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9ed245bd2d7d97ad1457cb281d4296e8b593588758b8fec6d67b2b2b0f2265" +checksum = "c85320a3a2facf2b2822b57aa9d6d9d55edb8aee0b6b5d3b8df158e503d10858" [[package]] name = "arrow-select" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc9bd6aebc565b1d04bae64a0f4dda3abc677190eb7d960471b1b20e1cebed0" +checksum = "9cc7e6b582e23855fd1625ce46e51647aa440c20ea2e71b1d748e0839dd73cba" dependencies = [ + "ahash", "arrow-array", "arrow-buffer", "arrow-data", @@ -161,6 +166,15 @@ dependencies = [ "num", ] +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -169,9 +183,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -187,9 +201,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "brotli" -version = "3.5.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -198,9 +212,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -214,9 +228,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -226,9 +240,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cast" @@ -238,13 +252,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.0" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -294,18 +308,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.9" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstyle", "clap_lex", @@ -313,9 +327,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "const-random" @@ -339,9 +353,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crc32fast" @@ -450,9 +464,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "flatbuffers" -version = "23.5.26" +version = "24.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" +checksum = "8add37afff2d4ffa83bc748a70b4b1370984f6980768554182424ef71447c35f" dependencies = [ "bitflags 1.3.2", "rustc_version", @@ -460,9 +474,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -510,15 +524,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -545,13 +559,13 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -571,18 +585,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -653,9 +667,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libm" @@ -665,9 +679,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libsqlite3-sys" -version = "0.28.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -691,23 +705,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] -name = "lz4" -version = "1.25.0" +name = "lz4_flex" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6eab492fe7f8651add23237ea56dbf11b3c4ff762ab83d40a47f11433421f91" +checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" -dependencies = [ - "cc", - "libc", + "twox-hash", ] [[package]] @@ -718,20 +721,20 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -831,9 +834,9 @@ dependencies = [ [[package]] name = "parquet" -version = "42.0.0" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baab9c36b1c8300b81b4d577d306a0a733f9d34021363098d3548e37757ed6c8" +checksum = "f0fbf928021131daaa57d334ca8e3904fe9ae22f73c56244fc7db9b04eedc3d8" dependencies = [ "ahash", "arrow-array", @@ -848,8 +851,9 @@ dependencies = [ "bytes", "chrono", "flate2", + "half", "hashbrown", - "lz4", + "lz4_flex", "num", "num-bigint", "paste", @@ -857,7 +861,8 @@ dependencies = [ "snap", "thrift", "twox-hash", - "zstd 0.12.4", + "zstd", + "zstd-sys", ] [[package]] @@ -868,15 +873,15 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -887,15 +892,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -911,9 +916,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -940,9 +945,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -969,9 +974,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rusqlite" -version = "0.31.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ "bitflags 2.6.0", "fallible-iterator", @@ -983,9 +988,9 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -1019,29 +1024,29 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -1049,6 +1054,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "smallvec" version = "1.13.2" @@ -1080,9 +1091,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1091,22 +1102,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.77", ] [[package]] @@ -1134,7 +1145,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "zstd 0.13.2", + "zstd", ] [[package]] @@ -1168,9 +1179,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "vcpkg" @@ -1180,9 +1191,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -1202,34 +1213,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1237,28 +1249,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1266,11 +1278,11 @@ dependencies = [ [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1291,6 +1303,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -1372,16 +1393,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", -] - -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe 6.0.6", + "syn 2.0.77", ] [[package]] @@ -1390,33 +1402,23 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.0", -] - -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 2d50312..471278d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,10 +20,10 @@ linreg = "0.2.0" bytemuck = "1.13.1" thiserror = "1.0.0" memmap2 = "0.9.3" -rusqlite = { version = "0.31.0", features = ["bundled"], optional = true} -parquet = { version = "42.0.0", optional = true } -serde = { version = "1.0.209", features = ["derive"], optional = true } -serde_json = { version = "1.0.127", optional = true } +rusqlite = { version = "0.32.0", features = ["bundled"], optional = true } +parquet = { version = "53.0.0", optional = true } +serde = { version = "1.0.210", features = ["derive"], optional = true } +serde_json = { version = "1.0.128", optional = true } [features] tdf = ["rusqlite"] diff --git a/src/io/readers/file_readers/parquet_reader.rs b/src/io/readers/file_readers/parquet_reader.rs index a5c6927..0525a14 100644 --- a/src/io/readers/file_readers/parquet_reader.rs +++ b/src/io/readers/file_readers/parquet_reader.rs @@ -19,20 +19,19 @@ pub trait ReadableParquetTable { let file: File = File::open(file_name)?; let reader: SerializedFileReader = SerializedFileReader::new(file)?; - let results: Vec = reader + reader .get_row_iter(None)? .map(|record| { let mut result = Self::default(); - for (name, field) in record.get_column_iter() { + for (name, field) in record?.get_column_iter() { result.update_from_parquet_file( name.to_string().as_str(), field.to_string(), ); } - result + Ok(result) }) - .collect(); - Ok(results) + .collect() } } From 3285ec6e2e85f2cc5faa49c2f48ebb4131e4ee46 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Thu, 3 Oct 2024 10:03:45 +0200 Subject: [PATCH 06/13] CHORE: added todos and changed unwraps to expects when known to not panic --- README.md | 3 +++ .../file_readers/tdf_blob_reader/tdf_blobs.rs | 4 +++- src/io/readers/metadata_reader.rs | 5 ++++- src/io/readers/quad_settings_reader.rs | 18 ++++++++++++++---- src/io/readers/spectrum_reader/tdf/dda.rs | 5 ++++- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5b0ffac..be2aef5 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,9 @@ 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 diff --git a/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs b/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs index 12024c6..78c0c36 100644 --- a/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs +++ b/src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs @@ -16,7 +16,9 @@ impl TdfBlob { pub fn get_all(&self) -> Vec { (0..self.len()) - .map(|index| self.get(index).unwrap()) + .map(|index| self.get(index).expect( + "When iterating over the length of a tdf blob, you cannot go out of bounds" + )) .collect() } diff --git a/src/io/readers/metadata_reader.rs b/src/io/readers/metadata_reader.rs index 8944001..cf29a9a 100644 --- a/src/io/readers/metadata_reader.rs +++ b/src/io/readers/metadata_reader.rs @@ -97,7 +97,10 @@ fn get_im_converter( ) -> Result { let scan_counts: Vec = tdf_sql_reader.read_column_from_table("NumScans", "Frames")?; - let scan_max_index = *scan_counts.iter().max().unwrap(); // SqlReader cannot return empty vecs, so always succeeds + let scan_max_index = *scan_counts + .iter() + .max() + .expect("SqlReader cannot return empty vecs, so there is always a max scan index"); let (im_min, im_max) = get_im_bounds(sql_metadata)?; Ok(Scan2ImConverter::from_boundaries( im_min, diff --git a/src/io/readers/quad_settings_reader.rs b/src/io/readers/quad_settings_reader.rs index eb67dfc..90aa4d3 100644 --- a/src/io/readers/quad_settings_reader.rs +++ b/src/io/readers/quad_settings_reader.rs @@ -37,7 +37,8 @@ impl QuadrupoleSettingsReader { .iter() .map(|x| x.window_group) .max() - .unwrap() as usize; // SqlReader cannot return empty vecs, so always succeeds + .expect("SqlReader cannot return empty vecs, so there is always a max window_group") + as usize; let quadrupole_settings = (0..window_group_count) .map(|window_group| { let mut quad = QuadrupoleSettings::default(); @@ -306,9 +307,18 @@ fn expand_window_settings( let window = window_group.window_group; let frame = window_group.frame; let group = &quadrupole_settings[window as usize - 1]; - let window_group_start = - group.scan_starts.iter().min().unwrap().clone(); // SqlReader cannot return empty vecs, so always succeeds - let window_group_end = group.scan_ends.iter().max().unwrap().clone(); // SqlReader cannot return empty vecs, so always succeeds + let window_group_start = group + .scan_starts + .iter() + .min() + .expect("SqlReader cannot return empty vecs, so there is always min window_group index") + .clone(); + let window_group_end = group + .scan_ends + .iter() + .max() + .expect("SqlReader cannot return empty vecs, so there is always max window_group index") + .clone(); for (sws, swe) in scan_range_subsplit(window_group_start, window_group_end, &strategy) { diff --git a/src/io/readers/spectrum_reader/tdf/dda.rs b/src/io/readers/spectrum_reader/tdf/dda.rs index 2434192..2e1e9c5 100644 --- a/src/io/readers/spectrum_reader/tdf/dda.rs +++ b/src/io/readers/spectrum_reader/tdf/dda.rs @@ -30,7 +30,10 @@ impl DDARawSpectrumReader { let pasef_precursors = &pasef_frames.iter().map(|x| x.precursor).collect(); let order: Vec = argsort(&pasef_precursors); - let max_precursor = pasef_precursors.iter().max().unwrap(); // SqlReader cannot return empty vecs, so always succeeds + let max_precursor = pasef_precursors + .iter() + .max() + .expect("SqlReader cannot return empty vecs, so there is always a max precursor index"); let mut offsets: Vec = Vec::with_capacity(max_precursor + 1); offsets.push(0); for (offset, &index) in order.iter().enumerate().take(order.len() - 1) { From 528eb02708e2c6d3c1076f87c75a20607c72ed04 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 16:54:12 +0200 Subject: [PATCH 07/13] CHORE: use tdf blob get all in minitdf --- src/io/readers/spectrum_reader/minitdf.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/io/readers/spectrum_reader/minitdf.rs b/src/io/readers/spectrum_reader/minitdf.rs index e1b5da9..1a6f3f6 100644 --- a/src/io/readers/spectrum_reader/minitdf.rs +++ b/src/io/readers/spectrum_reader/minitdf.rs @@ -70,12 +70,7 @@ impl MiniTDFSpectrumReader { spectrum.index = index; let blob = self.blob_reader.get(index)?; if !blob.is_empty() { - let size: usize = blob.len(); - let spectrum_data: Vec = (0..size) - .map(|i| { - blob.get(i).ok_or(MiniTDFSpectrumReaderError::BlobError) - }) - .collect::, _>>()?; + let spectrum_data: Vec = blob.get_all(); let scan_count: usize = blob.len() / 3; let tof_indices_bytes: &[u32] = &spectrum_data[..scan_count as usize * 2]; From ee5f8410b1c0df08d471ba2034a436b96d7fdb7e Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 16:55:23 +0200 Subject: [PATCH 08/13] CHORE: added minitdf feature configs in tdf blob reader --- src/io/readers/file_readers/tdf_blob_reader.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/io/readers/file_readers/tdf_blob_reader.rs b/src/io/readers/file_readers/tdf_blob_reader.rs index d8e64fc..56dc3e3 100644 --- a/src/io/readers/file_readers/tdf_blob_reader.rs +++ b/src/io/readers/file_readers/tdf_blob_reader.rs @@ -65,12 +65,14 @@ impl TdfBlobReader { } } +#[cfg(feature = "minitdf")] #[derive(Debug)] pub struct IndexedTdfBlobReader { blob_reader: TdfBlobReader, binary_offsets: Vec, } +#[cfg(feature = "minitdf")] impl IndexedTdfBlobReader { pub fn new( file_name: impl AsRef, @@ -115,6 +117,7 @@ pub enum TdfBlobReaderError { pub enum IndexedTdfBlobReaderError { #[error("{0}")] TdfBlobReaderError(#[from] TdfBlobReaderError), + #[cfg(feature = "minitdf")] #[error("Invalid index {0}")] InvalidIndex(usize), } From 9b1be14e7d29f811a4e119e3ce7e8ad920d2d0f7 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 16:57:47 +0200 Subject: [PATCH 09/13] FEAT: added frame filter without rayon --- src/io/readers/frame_reader.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/io/readers/frame_reader.rs b/src/io/readers/frame_reader.rs index 2875597..51cdf27 100644 --- a/src/io/readers/frame_reader.rs +++ b/src/io/readers/frame_reader.rs @@ -120,6 +120,15 @@ impl FrameReader { .map(move |x| self.get(x)) } + pub fn filter<'a, F: Fn(&Frame) -> bool + Sync + Send + 'a>( + &'a self, + predicate: F, + ) -> impl Iterator> + 'a { + (0..self.len()) + .filter(move |x| predicate(&self.frames[*x])) + .map(move |x| self.get(x)) + } + pub fn get_dia_windows(&self) -> Option>> { self.dia_windows.clone() } From b783b37af3063506a3f6742125415ae31736893f Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 16:59:21 +0200 Subject: [PATCH 10/13] CHORE: minor cleanups in frame reader --- src/io/readers/frame_reader.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/io/readers/frame_reader.rs b/src/io/readers/frame_reader.rs index 51cdf27..158c1d6 100644 --- a/src/io/readers/frame_reader.rs +++ b/src/io/readers/frame_reader.rs @@ -109,6 +109,10 @@ impl FrameReader { Ok(reader) } + pub fn get_binary_offset(&self, index: usize) -> usize { + self.offsets[index] + } + pub fn parallel_filter<'a, F: Fn(&Frame) -> bool + Sync + Send + 'a>( &'a self, predicate: F, @@ -142,13 +146,13 @@ impl FrameReader { } } - pub fn get_from_compression_type_2( + fn get_from_compression_type_2( &self, index: usize, ) -> Result { // NOTE: get does it by 0-offsetting the vec, not by Frame index!!! let mut frame = self.get_frame_without_coordinates(index)?; - let offset = self.offsets[index]; + let offset = self.get_binary_offset(index); let blob = self.tdf_bin_reader.get(offset)?; let scan_count: usize = blob.get(0).ok_or(FrameReaderError::CorruptFrame)? as usize; @@ -288,6 +292,8 @@ pub enum FrameReaderError { #[error("{0}")] TdfBlobReaderError(#[from] TdfBlobReaderError), #[error("{0}")] + MetadataReaderError(#[from] MetadataReaderError), + #[error("{0}")] FileNotFound(String), #[error("{0}")] SqlError(#[from] SqlError), @@ -297,4 +303,6 @@ pub enum FrameReaderError { QuadrupoleSettingsReaderError(#[from] QuadrupoleSettingsReaderError), #[error("Index out of bounds")] IndexOutOfBounds, + #[error("Compression type {0} not understood")] + CompressionTypeError(u8), } From a68e6a3c2c7377359bacdd03484113beb86f0194 Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 16:59:49 +0200 Subject: [PATCH 11/13] CHORE: dep version updates --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 608ea34..b58ac34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ keywords = ["MS", "LC-TIMS-TOF", "PASEF"] zstd = "0.13.2" rayon = "1.10.0" linreg = "0.2.0" -bytemuck = "1.13.1" +bytemuck = "1.18.0" thiserror = "1.0.0" memmap2 = "0.9.3" rusqlite = { version = "0.31.0", features = ["bundled"], optional = true} From b8db21338b9823e787d1e5c7a3d94e327a49129a Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 17:02:58 +0200 Subject: [PATCH 12/13] FEAT: added additional compression to frame reader --- Cargo.lock | 31 +++++++++++++--------- Cargo.toml | 1 + src/io/readers/frame_reader.rs | 48 +++++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5171129..d6fbafd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,9 +214,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -718,9 +718,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -1019,18 +1019,18 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1091,18 +1091,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -1120,6 +1120,12 @@ dependencies = [ "ordered-float", ] +[[package]] +name = "timscompress" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4423059b0eec2a116d2b8e4b40d4faaad1b72ae17df8718c66520e0e876885" + [[package]] name = "timsrust" version = "0.4.2" @@ -1134,6 +1140,7 @@ dependencies = [ "serde", "serde_json", "thiserror", + "timscompress", "zstd 0.13.2", ] diff --git a/Cargo.toml b/Cargo.toml index b58ac34..ef06789 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,7 @@ rusqlite = { version = "0.31.0", features = ["bundled"], optional = true} parquet = { version = "42.0.0", optional = true } serde = { version = "1.0.209", features = ["derive"], optional = true } serde_json = { version = "1.0.127", optional = true } +timscompress = {optional=true} [features] tdf = ["rusqlite"] diff --git a/src/io/readers/frame_reader.rs b/src/io/readers/frame_reader.rs index 158c1d6..db54259 100644 --- a/src/io/readers/frame_reader.rs +++ b/src/io/readers/frame_reader.rs @@ -5,6 +5,10 @@ use std::{ }; use rayon::iter::{IntoParallelIterator, ParallelIterator}; +#[cfg(feature = "timscompress")] +use timscompress::reader::{ + CompressedTdfBlobReader, CompressedTdfBlobReaderError, +}; use crate::{ ms_data::{AcquisitionType, Frame, MSLevel, QuadrupoleSettings}, @@ -27,11 +31,15 @@ use super::{ pub struct FrameReader { path: PathBuf, tdf_bin_reader: TdfBlobReader, + #[cfg(feature = "timscompress")] + compressed_reader: CompressedTdfBlobReader, frames: Vec, acquisition: AcquisitionType, offsets: Vec, dia_windows: Option>>, compression_type: u8, + #[cfg(feature = "timscompress")] + scan_count: usize, } impl FrameReader { @@ -42,6 +50,8 @@ impl FrameReader { let compression_type = match MetadataReader::new(&sql_path)?.compression_type { 2 => 2, + #[cfg(feature = "timscompress")] + 3 => 3, compression_type => { return Err(FrameReaderError::CompressionTypeError( compression_type, @@ -54,7 +64,9 @@ impl FrameReader { let bin_path = find_extension(&path, "analysis.tdf_bin").ok_or( FrameReaderError::FileNotFound("analysis.tdf_bin".to_string()), )?; - let tdf_bin_reader = TdfBlobReader::new(bin_path)?; + let tdf_bin_reader = TdfBlobReader::new(&bin_path)?; + #[cfg(feature = "timscompress")] + let compressed_reader = CompressedTdfBlobReader::new(&bin_path)?; let acquisition = if sql_frames.iter().any(|x| x.msms_type == 8) { AcquisitionType::DDAPASEF } else if sql_frames.iter().any(|x| x.msms_type == 9) { @@ -93,6 +105,13 @@ impl FrameReader { ) }) .collect(); + #[cfg(feature = "timscompress")] + let scan_count = sql_frames + .iter() + .map(|frame| frame.scan_count) + .max() + .expect("Frame table cannot be empty") + as usize; let offsets = sql_frames.iter().map(|x| x.binary_offset).collect(); let reader = Self { path: path.as_ref().to_path_buf(), @@ -105,6 +124,10 @@ impl FrameReader { _ => None, }, compression_type, + #[cfg(feature = "timscompress")] + compressed_reader, + #[cfg(feature = "timscompress")] + scan_count, }; Ok(reader) } @@ -140,6 +163,8 @@ impl FrameReader { pub fn get(&self, index: usize) -> Result { match self.compression_type { 2 => self.get_from_compression_type_2(index), + #[cfg(feature = "timscompress")] + 3 => self.get_from_compression_type_3(index), _ => Err(FrameReaderError::CompressionTypeError( self.compression_type, )), @@ -168,6 +193,24 @@ impl FrameReader { Ok(frame) } + #[cfg(feature = "timscompress")] + fn get_from_compression_type_3( + &self, + index: usize, + ) -> Result { + // NOTE: get does it by 0-offsetting the vec, not by Frame index!!! + // TODO + let mut frame = self.get_frame_without_coordinates(index)?; + let offset = self.get_binary_offset(index); + let raw_frame = self + .compressed_reader + .get_raw_frame_data(offset, self.scan_count); + frame.tof_indices = raw_frame.tof_indices; + frame.intensities = raw_frame.intensities; + frame.scan_offsets = raw_frame.scan_offsets; + Ok(frame) + } + pub fn get_frame_without_coordinates( &self, index: usize, @@ -289,6 +332,9 @@ fn get_frame_without_data( #[derive(Debug, thiserror::Error)] pub enum FrameReaderError { + #[cfg(feature = "timscompress")] + #[error("{0}")] + CompressedTdfBlobReaderError(#[from] CompressedTdfBlobReaderError), #[error("{0}")] TdfBlobReaderError(#[from] TdfBlobReaderError), #[error("{0}")] From 389dd4d7af08e5b272f7b68226c465a3079f43aa Mon Sep 17 00:00:00 2001 From: Sander Willems Date: Fri, 18 Oct 2024 17:13:35 +0200 Subject: [PATCH 13/13] CHORE: update lock --- Cargo.lock | 150 ++++++++++++++++++++++++++--------------------------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfa6635..f9c1b71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,9 +75,9 @@ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "arrow-array" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2bf348cf9f02a5975c5962c7fa6dee107a2009a7b41ac5fb1a027e12dc033f" +checksum = "7f16835e8599dbbb1659fd869d865254c4cf32c6c2bb60b6942ac9fc36bfa5da" dependencies = [ "ahash", "arrow-buffer", @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092e37715f168976012ce52273c3989b5793b0db5f06cbaa246be25e5f0924d" +checksum = "1a1f34f0faae77da6b142db61deba2cb6d60167592b178be317b341440acba80" dependencies = [ "bytes", "half", @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce1018bb710d502f9db06af026ed3561552e493e989a79d0d0f5d9cf267a785" +checksum = "450e4abb5775bca0740bec0bcf1b1a5ae07eff43bd625661c4436d8e8e4540c4" dependencies = [ "arrow-array", "arrow-buffer", @@ -122,9 +122,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4ac0c4ee79150afe067dc4857154b3ee9c1cd52b5f40d59a77306d0ed18d65" +checksum = "2b1e618bbf714c7a9e8d97203c806734f012ff71ae3adc8ad1b075689f540634" dependencies = [ "arrow-buffer", "arrow-schema", @@ -134,9 +134,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb307482348a1267f91b0912e962cd53440e5de0f7fb24c5f7b10da70b38c94a" +checksum = "f98e983549259a2b97049af7edfb8f28b8911682040e99a94e4ceb1196bd65c2" dependencies = [ "arrow-array", "arrow-buffer", @@ -148,15 +148,15 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85320a3a2facf2b2822b57aa9d6d9d55edb8aee0b6b5d3b8df158e503d10858" +checksum = "fbf0388a18fd7f7f3fe3de01852d30f54ed5182f9004db700fbe3ba843ed2794" [[package]] name = "arrow-select" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc7e6b582e23855fd1625ce46e51647aa440c20ea2e71b1d748e0839dd73cba" +checksum = "b83e5723d307a38bf00ecd2972cd078d1339c7fd3eb044f609958a9a24463f3a" dependencies = [ "ahash", "arrow-array", @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64" @@ -228,9 +228,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -252,9 +252,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.21" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "jobserver", "libc", @@ -308,18 +308,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstyle", "clap_lex", @@ -474,9 +474,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -594,18 +594,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -616,9 +616,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" dependencies = [ "lexical-util", "static_assertions", @@ -637,18 +637,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" dependencies = [ "lexical-util", "lexical-write-integer", @@ -657,9 +657,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" dependencies = [ "lexical-util", "static_assertions", @@ -667,9 +667,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" @@ -813,9 +813,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -834,9 +834,9 @@ dependencies = [ [[package]] name = "parquet" -version = "53.0.0" +version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0fbf928021131daaa57d334ca8e3904fe9ae22f73c56244fc7db9b04eedc3d8" +checksum = "310c46a70a3ba90d98fec39fa2da6d9d731e544191da6fb56c9d199484d0dd3e" dependencies = [ "ahash", "arrow-array", @@ -907,9 +907,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -945,9 +945,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -957,9 +957,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -968,9 +968,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rusqlite" @@ -1039,14 +1039,14 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "6dbcf9b78a125ee667ae19388837dd12294b858d101fdd393cb9d5501ef09eb2" dependencies = [ "itoa", "memchr", @@ -1091,9 +1091,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1117,7 +1117,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1220,9 +1220,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -1231,24 +1231,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1256,28 +1256,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -1400,7 +1400,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]]