aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kmer_counts_per_sequence.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kmer_counts_per_sequence.c b/kmer_counts_per_sequence.c
index f725d5b..ac7ff44 100644
--- a/kmer_counts_per_sequence.c
+++ b/kmer_counts_per_sequence.c
@@ -20,6 +20,12 @@ int main(int argc, char **argv) {
size_t num_desired_indicies = 0;
size_t *desired_indicies = NULL;
+
+ if(argc < 3) {
+ printf("Please supply a filename and a kmer\n");
+ exit(EXIT_FAILURE);
+ }
+
unsigned long kmer = atoi(argv[2]);
if(kmer == 0) {
fprintf(stderr, "Error: invalid kmer.\n");
@@ -28,11 +34,6 @@ int main(int argc, char **argv) {
const unsigned long long width = (unsigned long long)1 << (kmer * 2);
- if(argc < 3) {
- printf("Please supply a filename and a kmer\n");
- exit(EXIT_FAILURE);
- }
-
if(argc == 4) {
specific_mers = true;
desired_indicies = malloc((width) * sizeof(size_t));