Skip to content

Commit

Permalink
change downsample to true; add panic assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Oct 5, 2024
1 parent ac82fb3 commit 7ea9a40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/manysearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn manysearch(
if let Some(against_mh) = against_sig.minhash() {
for query in query_sketchlist.iter() {
// avoid calculating details unless there is overlap
let overlap = query.minhash.count_common(against_mh, false).expect("incompatible sketches") as f64;
let overlap = query.minhash.count_common(against_mh, true).expect("incompatible sketches") as f64;

// only calculate results if we have shared hashes
if overlap > 0.0 {
Expand Down Expand Up @@ -104,6 +104,7 @@ pub fn manysearch(
let max_containment_ani = Some(f64::max(qani, mani));

let (total_weighted_hashes, n_weighted_found, average_abund, median_abund, std_abund) = if calc_abund_stats {
panic!("should not be reached.");
match query.minhash.inflated_abundances(&against_mh_ds) {
Ok((abunds, sum_weighted_overlap)) => {
let sum_all_abunds = against_mh_ds.sum_abunds() as usize;
Expand Down

0 comments on commit 7ea9a40

Please sign in to comment.