Skip to content

Commit

Permalink
use sigstrait isntead
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Jan 6, 2025
1 parent 0b4ab0a commit 9195f7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ crate-type = ["cdylib"]
pyo3 = { version = "0.23.3", features = ["extension-module", "anyhow"] }
rayon = "1.10.0"
serde = { version = "1.0.217", features = ["derive"] }
#sourmash = { version = "0.18.0", features = ["branchwater"] }
sourmash = { git = "https://github.com/sourmash-bio/sourmash.git", branch = "add-nhashes", features = ["branchwater"] }
sourmash = { version = "0.18.0", features = ["branchwater"] }
serde_json = "1.0.134"
niffler = "2.4.0"
log = "0.4.22"
Expand Down
3 changes: 2 additions & 1 deletion src/utils/buildutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use sourmash::errors::SourmashError;
use sourmash::manifest::Record;
use sourmash::selection::Selection;
use sourmash::signature::Signature;
use sourmash::signature::SigsTrait;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt::Display;
Expand Down Expand Up @@ -889,7 +890,7 @@ impl BuildCollection {
record.set_filename(Some(filename.clone()));
record.set_md5(Some(sig.md5sum()));
record.set_md5short(Some(sig.md5sum()[0..8].into()));
record.set_n_hashes(Some(sig.n_hashes()));
record.set_n_hashes(Some(sig.minhash().map(|mh| mh.size()).unwrap_or(0)));

// note, this needs to be set when writing sigs (not here)
// record.set_internal_location("")
Expand Down

0 comments on commit 9195f7c

Please sign in to comment.