Skip to content

Commit

Permalink
Merge pull request #8 from seqan/kmer_default
Browse files Browse the repository at this point in the history
[FIX] If k-mer length not given explicitly then calculate from pigeonhole lemma
  • Loading branch information
SGSSGene authored May 10, 2023
2 parents c4280f7 + 5e1c59c commit 39f3e29
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{32}; // 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 39f3e29

Please sign in to comment.