Skip to content

Commit

Permalink
add print information to track filling the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Aug 27, 2024
1 parent b6ff10d commit a26ce06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sa-index/src/sa_searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,14 @@ impl Searcher {
// Create the Searcher object
let mut searcher = Self { sa, kmer_cache, proteins, suffix_index_to_protein };

let print_step_size = searcher.kmer_cache.base.pow(k as u32) / 100;

// Update the bounds for all 3-mers in the KTable
for i in 0..searcher.kmer_cache.base.pow(k as u32) {
if i % print_step_size == 0 {
eprintln!("Updating kmer cache: {}%", i / print_step_size);
}

let kmer = searcher.kmer_cache.index_to_kmer(i);

// Calculate stricter starting bounds for the 3-mers
Expand All @@ -164,6 +170,8 @@ impl Searcher {
}
}

eprintln!("Updating kmer cache: 100%");

searcher
}

Expand Down

0 comments on commit a26ce06

Please sign in to comment.