diff --git a/Makefile b/Makefile index ccd3933..6eabcaf 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ LDFLAGS = -pthread GFALIBS_DIR := $(CURDIR)/gfalibs -OBJS := main teloscope input +OBJS := main teloscope input tools BINS := $(addprefix $(BINDIR)/, $(OBJS)) head: $(BINS) gfalibs | $(BUILD) diff --git a/include/functions.h b/include/functions.h deleted file mode 100644 index 2dfbd82..0000000 --- a/include/functions.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef FUNCTIONS_H -#define FUNCTIONS_H - -#include -#include - -void generate_combinations(const std::string &pattern, std::string ¤t, size_t index, std::vector &combinations); - -#endif // FUNCTIONS_H diff --git a/include/main.h b/include/main.h index 0a6575a..8d20bee 100644 --- a/include/main.h +++ b/include/main.h @@ -47,6 +47,6 @@ #include "input-gfa.h" #include "input.h" // was in Mac's code -#include "functions.h" +#include "tools.h" #endif /* MAIN_H */ diff --git a/src/functions.cpp b/src/functions.cpp deleted file mode 100644 index 7c6c578..0000000 --- a/src/functions.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "functions.h" -#include - -std::unordered_map> IUPAC_DNA_map = { - {'A', {'A'}}, - {'C', {'C'}}, - {'G', {'G'}}, - {'T', {'T'}}, - {'R', {'A', 'G'}}, - {'Y', {'C', 'T'}}, - {'M', {'A', 'C'}}, - {'K', {'G', 'T'}}, - {'S', {'C', 'G'}}, - {'W', {'A', 'T'}}, - {'H', {'A', 'C', 'T'}}, - {'B', {'C', 'G', 'T'}}, - {'V', {'A', 'C', 'G'}}, - {'D', {'A', 'G', 'T'}}, - {'N', {'A', 'C', 'G', 'T'}} -}; - - -void generate_combinations(const std::string &pattern, std::string ¤t, size_t index, std::vector &combinations) { - if (index == pattern.size()) { - combinations.push_back(current); - return; - } - - char base = pattern[index]; - for (char c : IUPAC_DNA_map[base]) { - current[index] = c; - generate_combinations(pattern, current, index + 1, combinations); - } -} - - diff --git a/src/main.cpp b/src/main.cpp index 313a52b..2badc31 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -241,7 +241,7 @@ int main(int argc, char **argv) { printf("/// Teloscope v%s\n", version.c_str()); if (userInput.step > userInput.windowSize) { - fprintf(stderr, "Error: Step size (%d) larger than window size (%d) is not allowed.\n", userInput.step, userInput.windowSize); + fprintf(stderr, "Error: Step size (%d) cannot be larger than window size (%d)!\n", userInput.step, userInput.windowSize); exit(EXIT_FAILURE); } else if (userInput.step == userInput.windowSize) { @@ -355,5 +355,4 @@ int main(int argc, char **argv) { exit(EXIT_SUCCESS); -} - +} \ No newline at end of file