Skip to content

Commit

Permalink
stable multithreaded version
Browse files Browse the repository at this point in the history
  • Loading branch information
gf777 committed Sep 29, 2024
1 parent b49c3f0 commit 883da12
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion gfalibs
8 changes: 0 additions & 8 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ void Input::loadDB() {
getline(file, line);
file.close();
userInput.kLen = stol(line);
if (userInput.kLen < userInput.kPrefixLen)
userInput.kPrefixLen = userInput.kLen;
else
userInput.kPrefixLen = std::min((uint32_t)31,userInput.kLen);
}else if (userInput.kmerDB.size() > 1) {
fprintf(stderr, "More than one DB provided. Merge them first. Exiting.\n");
exit(EXIT_FAILURE);
Expand Down Expand Up @@ -146,10 +142,6 @@ void Input::read() { // reads the actual input and performing the tasks
}

userInput.kLen = k;
if (userInput.kLen < userInput.kPrefixLen)
userInput.kPrefixLen = userInput.kLen;
else
userInput.kPrefixLen = std::min((uint32_t)31,userInput.kLen);

KDB kcount(userInput); // a new empty kmerdb with the specified kmer length

Expand Down
6 changes: 1 addition & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,8 @@ int main(int argc, char **argv) {
}

userInput.kLen = atol(optarg);
if (userInput.kLen < userInput.kPrefixLen)
userInput.kPrefixLen = userInput.kLen;
else
userInput.kPrefixLen = std::min((uint32_t)31,userInput.kLen);
break;
case 's': // kmer length
case 's': // smer length

if (!isNumber(optarg)) {
fprintf(stderr, "input '%s' to option -%c must be a number\n", optarg, optopt);
Expand Down

0 comments on commit 883da12

Please sign in to comment.