diff --git a/README.md b/README.md index 1e7d590..bdba58f 100644 --- a/README.md +++ b/README.md @@ -100,10 +100,10 @@ to show the usage of the driver program (reported below for convenience). For example, it could be the de Bruijn graph topology output by BCALM. k - K-mer length (must be <= 32). + K-mer length (must be <= 31). m - Minimizer length (must be <= k). + Minimizer length (must be < k). [-s seed] Seed for construction (default is 1). diff --git a/include/builder/build.cpp b/include/builder/build.cpp index e0c83bd..3efcca0 100644 --- a/include/builder/build.cpp +++ b/include/builder/build.cpp @@ -448,7 +448,7 @@ void dictionary::build(std::string const& filename, build_configuration const& b " but got k = " + std::to_string(build_config.k)); } if (build_config.m == 0) throw std::runtime_error("m must be > 0"); - if (build_config.m > build_config.k) throw std::runtime_error("m must be <= k"); + if (build_config.m > build_config.k) throw std::runtime_error("m must be < k"); if (build_config.l > constants::max_l) { throw std::runtime_error("l must be <= " + std::to_string(constants::max_l)); } diff --git a/include/util.hpp b/include/util.hpp index 61b96b2..6440e6e 100644 --- a/include/util.hpp +++ b/include/util.hpp @@ -10,7 +10,7 @@ namespace sshash { namespace constants { -constexpr uint64_t max_k = 32; +constexpr uint64_t max_k = 31; // max *odd* size that can be packed into 64 bits constexpr uint64_t invalid = uint64_t(-1); constexpr uint64_t seed = 1; constexpr uint64_t hashcode_bits = 64; diff --git a/src/build.cpp b/src/build.cpp index ac76395..9d690e4 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -18,7 +18,7 @@ int main(int argc, char** argv) { "\t- one DNA sequence per line.\n" "\tFor example, it could be the de Bruijn graph topology output by BCALM."); parser.add("k", "K-mer length (must be <= " + std::to_string(constants::max_k) + ")."); - parser.add("m", "Minimizer length (must be <= k)."); + parser.add("m", "Minimizer length (must be < k)."); /* optional arguments */ parser.add("seed",