Skip to content

Commit

Permalink
removed useless option -n
Browse files Browse the repository at this point in the history
  • Loading branch information
jermp committed Mar 1, 2022
1 parent 8cd478c commit c06535b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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).

Expand Down
4 changes: 1 addition & 3 deletions include/builder/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions include/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 " +
Expand Down Expand Up @@ -60,9 +58,6 @@ int main(int argc, char** argv) {
build_config.m = m;

if (parser.parsed("seed")) build_config.seed = parser.get<uint64_t>("seed");
if (parser.parsed("max_num_kmers")) {
build_config.max_num_kmers = parser.get<uint64_t>("max_num_kmers");
}
if (parser.parsed("l")) build_config.l = parser.get<double>("l");
if (parser.parsed("c")) build_config.c = parser.get<double>("c");
build_config.canonical_parsing = parser.get<bool>("canonical_parsing");
Expand Down

0 comments on commit c06535b

Please sign in to comment.