Skip to content

Commit

Permalink
If k-mer length not given explicitly, calculate from pigeonhole lemma
Browse files Browse the repository at this point in the history
  • Loading branch information
eaasna committed May 9, 2023
1 parent 3f75081 commit 5e1c59c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/stellar/options/index_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace stellar

struct IndexOptions
{
size_t qGram{7}; // length of the q-grams
size_t qGram{std::numeric_limits<size_t>::max()}; // length of the q-grams
double qgramAbundanceCut{1};
};

Expand Down
2 changes: 1 addition & 1 deletion include/stellar/stellar_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5e1c59c

Please sign in to comment.