From c06535b66549dd1070610e0ff181b61557b798cf Mon Sep 17 00:00:00 2001 From: jermp Date: Tue, 1 Mar 2022 17:40:58 +0100 Subject: [PATCH] removed useless option -n --- README.md | 5 +---- include/builder/build.cpp | 4 +--- include/util.hpp | 2 -- src/build.cpp | 5 ----- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index bdba58f..cc38a16 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ where the code was compiled (see the section [Compiling the Code](#compiling-the to show the usage of the driver program (reported below for convenience). - Usage: ./build [-h,--help] input_filename k m [-s seed] [-n max_num_kmers] [-l l] [-c c] [--canonical-parsing] [-o output_filename] [--check] [--bench] [--verbose] + Usage: ./build [-h,--help] input_filename k m [-s seed] [-l l] [-c c] [--canonical-parsing] [-o output_filename] [--check] [--bench] [--verbose] input_filename Must be a FASTA file (.fa/fasta extension) compressed with gzip (.gz) or not: @@ -108,9 +108,6 @@ to show the usage of the driver program (reported below for convenience). [-s seed] Seed for construction (default is 1). - [-n max_num_kmers] - Build the dictionary from at most this number of k-mers. - [-l l] A (integer) constant that controls the space/time trade-off of the dictionary. A reasonable values lies between 2 and 12 (default is 6). diff --git a/include/builder/build.cpp b/include/builder/build.cpp index 9e4dfd9..fcff19a 100644 --- a/include/builder/build.cpp +++ b/include/builder/build.cpp @@ -27,7 +27,6 @@ void parse_file(std::istream& is, parse_data& data, build_configuration const& b uint64_t k = build_config.k; uint64_t m = build_config.m; uint64_t seed = build_config.seed; - uint64_t max_num_kmers = build_config.max_num_kmers; uint64_t max_num_kmers_in_string = k - m + 1; uint64_t block_size = 2 * k - m; // max_num_kmers_in_string + k - 1 @@ -82,7 +81,7 @@ void parse_file(std::istream& is, parse_data& data, build_configuration const& b return true; }; - while (!is.eof() and data.num_kmers != max_num_kmers) { + while (!is.eof()) { std::getline(is, line); // skip header line std::getline(is, line); @@ -120,7 +119,6 @@ void parse_file(std::istream& is, parse_data& data, build_configuration const& b } ++data.num_kmers; - if (data.num_kmers == max_num_kmers) break; ++end; } diff --git a/include/util.hpp b/include/util.hpp index 6440e6e..088fbb2 100644 --- a/include/util.hpp +++ b/include/util.hpp @@ -60,7 +60,6 @@ struct build_configuration { : k(31) , m(17) , seed(constants::seed) - , max_num_kmers(-1) , l(constants::min_l) , c(constants::c) @@ -71,7 +70,6 @@ struct build_configuration { uint64_t k; // kmer size uint64_t m; // minimizer size uint64_t seed; - uint64_t max_num_kmers; uint64_t l; // drive dictionary trade-off double c; // drive PTHash trade-off diff --git a/src/build.cpp b/src/build.cpp index 9d690e4..b8acc64 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -24,8 +24,6 @@ int main(int argc, char** argv) { parser.add("seed", "Seed for construction (default is " + std::to_string(constants::seed) + ").", "-s", false); - parser.add("max_num_kmers", "Build the dictionary from at most this number of k-mers.", "-n", - false); parser.add("l", "A (integer) constant that controls the space/time trade-off of the dictionary. " "A reasonable values lies between 2 and 12 (default is " + @@ -60,9 +58,6 @@ int main(int argc, char** argv) { build_config.m = m; if (parser.parsed("seed")) build_config.seed = parser.get("seed"); - if (parser.parsed("max_num_kmers")) { - build_config.max_num_kmers = parser.get("max_num_kmers"); - } if (parser.parsed("l")) build_config.l = parser.get("l"); if (parser.parsed("c")) build_config.c = parser.get("c"); build_config.canonical_parsing = parser.get("canonical_parsing");