From 03b22faed2847c974971713106e42747b9f92440 Mon Sep 17 00:00:00 2001 From: Evelin Aasna Date: Fri, 11 Oct 2024 16:48:06 +0200 Subject: [PATCH] Always calc min and max minimiser count --- lib/seqan | 2 +- src/raptor/threshold/threshold.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/seqan b/lib/seqan index 8ce355dd..d1a9001f 160000 --- a/lib/seqan +++ b/lib/seqan @@ -1 +1 @@ -Subproject commit 8ce355dd960bbf7a5fa0292b49f7342f7e456da6 +Subproject commit d1a9001fc1ac69703d958fdbbccb6599206f1d53 diff --git a/src/raptor/threshold/threshold.cpp b/src/raptor/threshold/threshold.cpp index d8ca5c23..1c539665 100644 --- a/src/raptor/threshold/threshold.cpp +++ b/src/raptor/threshold/threshold.cpp @@ -19,7 +19,10 @@ threshold::threshold(threshold_parameters const & arguments) { uint8_t const kmer_size{arguments.shape.size()}; size_t const kmers_per_window = arguments.window_size - kmer_size + 1; - + size_t const kmers_per_pattern = arguments.query_length - kmer_size + 1; + minimal_number_of_minimizers = kmers_per_pattern / kmers_per_window; + maximal_number_of_minimizers = arguments.query_length - arguments.window_size + 1; + if (!std::isnan(arguments.percentage)) { threshold_kind = threshold_kinds::percentage; @@ -35,9 +38,6 @@ threshold::threshold(threshold_parameters const & arguments) else { threshold_kind = threshold_kinds::probabilistic; - size_t const kmers_per_pattern = arguments.query_length - kmer_size + 1; - minimal_number_of_minimizers = kmers_per_pattern / kmers_per_window; - maximal_number_of_minimizers = arguments.query_length - arguments.window_size + 1; precomp_correction = precompute_correction(arguments); precomp_thresholds = precompute_threshold(arguments); }