Skip to content

Commit

Permalink
Always calc min and max minimiser count
Browse files Browse the repository at this point in the history
  • Loading branch information
eaasna committed Oct 11, 2024
1 parent bc8f614 commit 03b22fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/seqan
8 changes: 4 additions & 4 deletions src/raptor/threshold/threshold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit 03b22fa

Please sign in to comment.