Skip to content

Commit

Permalink
fix merge mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Oct 15, 2024
1 parent 03102a5 commit 72d2044
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/core/src/index/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use getset::{CopyGetters, Getters, Setters};
use log::trace;
use serde::{Deserialize, Serialize};
use stats::{median, stddev};
use std::cmp::max;
use typed_builder::TypedBuilder;

use crate::ani_utils::{ani_ci_from_containment, ani_from_containment};
Expand Down
14 changes: 11 additions & 3 deletions src/core/src/index/revindex/disk_revindex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,20 @@ impl RevIndexOps for RevIndex {

let match_sig = self.collection.sig_for_dataset(dataset_id)?;
let match_mh = match_sig.minhash().unwrap().clone();
let scaled = query.scaled();

// make downsampled minhashes
let max_scaled = max(match_mh.scaled(), query.scaled());

let match_mh = match_mh
.downsample_scaled(scaled)
.downsample_scaled(max_scaled)
.expect("cannot downsample match");
>>>>>>> 7d111732d66faa0f957f7612d39f50e0d05aff01

// repeatedly downsample query, then extract to KmerMinHash
// => calculate_gather_stats
query = query
.downsample_scaled(max_scaled)
.expect("cannot downsample query");
let query_mh = KmerMinHash::from(query.clone());

// just calculate essentials here
let gather_result_rank = matches.len();
Expand Down

0 comments on commit 72d2044

Please sign in to comment.