Skip to content

Commit

Permalink
fix the amount of iterations to calculate the k-mers
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Aug 28, 2024
1 parent c3000ff commit 99cc2a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sa-index/src/sa_searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ impl Searcher {
let start_cache_fill_time = get_time_ms().unwrap();

// Update the bounds for all 3-mers in the KTable
for i in 0..searcher.kmer_cache.base.pow(k as u32) {
let base = searcher.kmer_cache.base;
let length = (base.pow(k as u32 + 1) - base) / (base - 1);
for i in 0..length {
if i % print_step_size == 0 {
eprintln!("Updating kmer cache: {}% ({} seconds since start)", i / print_step_size, (get_time_ms().unwrap() - start_cache_fill_time) / 1000.0);
}
Expand Down

0 comments on commit 99cc2a5

Please sign in to comment.