From 5e1c59c1619807b5f6358ff74346973cbe67b26b Mon Sep 17 00:00:00 2001 From: Evelin Aasna Date: Tue, 9 May 2023 11:56:38 +0200 Subject: [PATCH] If k-mer length not given explicitly, calculate from pigeonhole lemma --- include/stellar/options/index_options.hpp | 2 +- include/stellar/stellar_types.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stellar/options/index_options.hpp b/include/stellar/options/index_options.hpp index 562534949..f945a24ea 100644 --- a/include/stellar/options/index_options.hpp +++ b/include/stellar/options/index_options.hpp @@ -8,7 +8,7 @@ namespace stellar struct IndexOptions { - size_t qGram{7}; // length of the q-grams + size_t qGram{std::numeric_limits::max()}; // length of the q-grams double qgramAbundanceCut{1}; }; diff --git a/include/stellar/stellar_types.hpp b/include/stellar/stellar_types.hpp index ac0e0c5fa..17d6e0968 100755 --- a/include/stellar/stellar_types.hpp +++ b/include/stellar/stellar_types.hpp @@ -72,7 +72,7 @@ struct StellarStatistics assert(options.epsilon.numerator() == 0 || StellarOptions::absoluteErrors(options.epsilon, n1) == e1); kMerLength = options.qGram; - kMerComputed = options.qGram == (unsigned)-1; + kMerComputed = options.qGram == (size_t)-1; if (kMerComputed) kMerLength = std::min(std::max(1u, smin), 32u);