Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 0b581ec

Browse files
authored
(wip) updates timsrust to v0.4.1 (#9)
* chore(timsrust)!: (wip) updated timsrust versioncargo * chore: cargo update and fmt * (chore) removed unused imports
1 parent 6bf5b65 commit 0b581ec

16 files changed

+709
-2278
lines changed

Cargo.lock

Lines changed: 241 additions & 1395 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,37 @@ license = "Apache-2.0"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
timsrust = "= 0.2.2"
10+
timsrust = "= 0.4.1"
1111

1212
# Serialization
13-
serde = { version = "1.0.193", features = ["derive"] }
14-
serde_json = "1.0.108"
15-
rayon = "1.8.0"
16-
indicatif = {version = "*", features = ["rayon"]}
17-
log = "0.4"
18-
pretty_env_logger = "0.4"
19-
num = "0.4.1"
20-
num-traits = "0.2.18"
21-
clap = {version = "4.4.17", features = ["derive"]}
13+
serde = { version = "1.0.210", features = ["derive"] }
14+
serde_json = "1.0.128"
15+
clap = { version = "4.4.17", features = ["derive"] }
2216
csv = "1.3.0"
17+
18+
# Random ...
2319
rand = "0.8.5"
2420

25-
sqlx = { version = "0.7.2", features = ["runtime-tokio-native-tls", "sqlite"]}
26-
libsqlite3-sys = "^0.26.0"
27-
tokio = {version="1.38.0", features = ["rt", "rt-multi-thread"]}
21+
# Paralellization
22+
rayon = "1.10.0"
23+
24+
# Logging/ Messaging
25+
indicatif = { version = "*", features = ["rayon"] }
26+
log = "0.4.22"
27+
pretty_env_logger = "0.5"
28+
29+
# Q: Not sure if I still use this
30+
num = "0.4.1"
31+
num-traits = "0.2.19"
2832

2933
# Sage
3034
sage-core = { git = "https://github.com/lazear/sage.git", rev = "9e870429889b341c4773df32b65e553283301a93" }
31-
toml = "0.8.8"
35+
toml = "0.8.19"
3236

3337
[features]
3438
par_dataprep = []
35-
less_parallel = [] # Mostly for profiling reasons ... looking at flamegraphs is hard with rayon...
39+
less_parallel = [
40+
] # Mostly for profiling reasons ... looking at flamegraphs is hard with rayon...
3641

3742
[profile.release]
3843
lto = "thin"

deny.toml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
# dependencies not shared by any other crates, would be ignored, as the target
2121
# list here is effectively saying which targets you are building for.
2222
targets = [
23-
{ triple = "aarch64-apple-darwin" },
24-
{ triple = "x86_64-apple-darwin" },
25-
{ triple = "i686-pc-windows-gnu" },
26-
{ triple = "i686-pc-windows-msvc" },
27-
{ triple = "x86_64-pc-windows-gnu" },
28-
{ triple = "x86_64-pc-windows-msvc" },
29-
{ triple = "i686-unknown-linux-gnu" },
30-
{ triple = "x86_64-unknown-linux-gnu" },
31-
{ triple = "x86_64-unknown-linux-musl" },
32-
# { triple = "wasm32-unknown-unknown" },
33-
# { triple = "x86_64-unknown-redox" },
23+
{ triple = "aarch64-apple-darwin" },
24+
{ triple = "x86_64-apple-darwin" },
25+
{ triple = "i686-pc-windows-gnu" },
26+
{ triple = "i686-pc-windows-msvc" },
27+
{ triple = "x86_64-pc-windows-gnu" },
28+
{ triple = "x86_64-pc-windows-msvc" },
29+
{ triple = "i686-unknown-linux-gnu" },
30+
{ triple = "x86_64-unknown-linux-gnu" },
31+
{ triple = "x86_64-unknown-linux-musl" },
32+
# { triple = "wasm32-unknown-unknown" },
33+
# { triple = "x86_64-unknown-redox" },
3434
]
3535
# When creating the dependency graph used as the source of truth when checks are
3636
# executed, this field can be used to prune crates from the graph, removing them
@@ -73,8 +73,8 @@ yanked = "warn"
7373
# A list of advisory IDs to ignore. Note that ignored advisories will still
7474
# output a note when they are encountered.
7575
ignore = [
76-
#"RUSTSEC-0000-0000",
77-
"RUSTSEC-2021-0145", # atty... potential unaligner when using custom allocators.
76+
#"RUSTSEC-0000-0000",
77+
"RUSTSEC-2023-0086", # Lexical-core -> arrow issue, updated in main in Sept-2024, unreleased.
7878
]
7979
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
8080
# lower than the range specified will be ignored. Note that ignored advisories
@@ -101,13 +101,13 @@ version = 2
101101
# See https://spdx.org/licenses/ for list of possible licenses
102102
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
103103
allow = [
104-
"MIT",
105-
"Apache-2.0",
106-
"Apache-2.0 WITH LLVM-exception",
107-
"BSD-3-Clause",
108-
"Unicode-DFS-2016",
109-
"Zlib",
110-
# Thank Jesus for rerun that compiled the following for me...
104+
"MIT",
105+
"Apache-2.0",
106+
"Apache-2.0 WITH LLVM-exception",
107+
"BSD-3-Clause",
108+
"Unicode-DFS-2016",
109+
"Zlib",
110+
# Thank Jesus for rerun that compiled the following for me...
111111
]
112112

113113
# The confidence threshold for detecting a license from license text.
@@ -146,8 +146,8 @@ license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
146146
# and the crate will be checked normally, which may produce warnings or errors
147147
# depending on the rest of your configuration
148148
#license-files = [
149-
# Each entry is a crate relative path, and the (opaque) hash of its contents
150-
#{ path = "LICENSE", hash = 0xbd0eed23 }
149+
# Each entry is a crate relative path, and the (opaque) hash of its contents
150+
#{ path = "LICENSE", hash = 0xbd0eed23 }
151151
#]
152152

153153
[licenses.private]
@@ -160,7 +160,7 @@ ignore = false
160160
# is only published to private registries, and ignore is true, the crate will
161161
# not have its license(s) checked
162162
registries = [
163-
#"https://sekretz.com/registry
163+
#"https://sekretz.com/registry
164164
]
165165

166166
# This section is considered when running `cargo deny check bans`.
@@ -187,17 +187,17 @@ workspace-default-features = "allow"
187187
external-default-features = "allow"
188188
# List of crates that are allowed. Use with care!
189189
allow = [
190-
#{ name = "ansi_term", version = "=0.11.0" },
190+
#{ name = "ansi_term", version = "=0.11.0" },
191191
]
192192
# List of crates to deny
193193
deny = [
194-
# Each entry the name of a crate and a version range. If version is
195-
# not specified, all versions will be matched.
196-
#{ name = "ansi_term", version = "=0.11.0" },
197-
#
198-
# Wrapper crates can optionally be specified to allow the crate when it
199-
# is a direct dependency of the otherwise banned crate
200-
#{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
194+
# Each entry the name of a crate and a version range. If version is
195+
# not specified, all versions will be matched.
196+
#{ name = "ansi_term", version = "=0.11.0" },
197+
#
198+
# Wrapper crates can optionally be specified to allow the crate when it
199+
# is a direct dependency of the otherwise banned crate
200+
#{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
201201
]
202202

203203
# List of features to allow/deny

src/aggregation/dbscan/denseframe_dbscan.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use timsrust::MSLevel;
2+
13
use crate::aggregation::aggregators::TimsPeakAggregator;
24
use crate::aggregation::converters::{
35
BypassDenseFrameBackConverter,
@@ -25,9 +27,12 @@ pub fn dbscan_denseframe(
2527
min_n: usize,
2628
min_intensity: u64,
2729
) -> DenseFrame {
28-
let out_frame_type: timsrust::FrameType = denseframe.frame_type;
30+
let out_acq_type: timsrust::AcquisitionType = denseframe.acquisition_type;
2931
let out_rt: f64 = denseframe.rt;
3032
let out_index: usize = denseframe.index;
33+
let out_ms_level: MSLevel = denseframe.ms_level;
34+
let out_window_group_id = denseframe.window_group_id;
35+
let out_correction_factor = denseframe.intensity_correction_factor;
3136

3237
let prefiltered_peaks = {
3338
denseframe.sort_by_mz();
@@ -72,8 +77,11 @@ pub fn dbscan_denseframe(
7277
raw_peaks: peak_vec,
7378
index: out_index,
7479
rt: out_rt,
75-
frame_type: out_frame_type,
80+
acquisition_type: out_acq_type,
7681
sorted: None,
82+
ms_level: out_ms_level,
83+
window_group_id: out_window_group_id,
84+
intensity_correction_factor: out_correction_factor,
7785
}
7886
}
7987

0 commit comments

Comments
 (0)