Skip to content

Commit

Permalink
fix: upgrade to mzsignal v0.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Nov 10, 2024
1 parent 4003df6 commit 97c541e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 31 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ indexmap = { version = "2.0.0", features = ["serde"] }
chrono = "0.4.37"
bitflags = "2.5.0"
identity-hash = "0.1.0"
thiserror = "1.0.50"
thiserror = "2.0.2"
mzpeaks = { version = ">=0.23.0,<1.0.0" }

# Internal parallelism
rayon = { version = ">=1.8.0,<2.0", optional = true }

# Internal signal processing
mzsignal = { version = ">=0.26.0,<1.0.0", default-features = false, optional = true, features = [
mzsignal = { version = ">=0.27.0,<1.0.0", default-features = false, optional = true, features = [
'avx',
] }

Expand Down
16 changes: 14 additions & 2 deletions src/spectrum/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,18 @@ mod test {

let feat = &hits[0];

if false {
let mut writer = io::BufWriter::new(std::fs::File::create("tmp/peaks_over_time.txt")?);
let arrays = frame.arrays.as_ref().unwrap();
for (im, arrs) in arrays.ion_mobility_dimension.iter().zip(arrays.arrays.iter()) {
let mzs = arrs.mzs()?;
let intensities = arrs.intensities()?;
for (mz, int) in mzs.iter().zip(intensities.iter()) {
writeln!(writer, "{mz}\t{int}\t{im}")?;
}
}
}

if false {
let mut writer = io::BufWriter::new(std::fs::File::create("tmp/features_graph.txt")?);
writer.write_all(b"feature_id\tmz\trt\tintensity\n")?;
Expand All @@ -585,9 +597,9 @@ mod test {
}

assert_is_close!(feat.start_time().unwrap(), 1.1628155190587295, 1e-3, "start_time");
assert_is_close!(feat.end_time().unwrap(), 1.2521668672561646, 1e-3, "end_time");
assert_is_close!(feat.end_time().unwrap(), 1.2536284405594418, 1e-3, "end_time");
assert_is_close!(feat.apex_time().unwrap(), 1.212666, 1e-3, "apex_time");
assert_eq!(feat.len(), 52);
assert_eq!(feat.len(), 62);
}
});
Ok(())
Expand Down

0 comments on commit 97c541e

Please sign in to comment.