diff options
-rw-r--r-- | kmer_utils.c | 3 | ||||
-rw-r--r-- | mer_generator.c | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/kmer_utils.c b/kmer_utils.c index 2f0a923..713ef90 100644 --- a/kmer_utils.c +++ b/kmer_utils.c @@ -203,10 +203,9 @@ unsigned long long * get_kmer_counts_from_file(FILE *fh, const unsigned int kmer for(i = 0; i < (signed long long)(seq_length - kmer + 1); i++) { char *seq_h = &seq[i]; unsigned int j = 0; - for(j = 0; j < kmer; j++) { + for(j = 0; j < kmer; j++) if(seq_h[j] == 5) continue; - } counts[(*mer_ptr)(seq_h)]++; } diff --git a/mer_generator.c b/mer_generator.c index a20c56f..33f285a 100644 --- a/mer_generator.c +++ b/mer_generator.c @@ -19,10 +19,9 @@ main() { printf(" 0; }\n"); } - printf("int (*return_fn())(const char * )mer_ptr(int kmer) { switch(kmer) {"); + printf("typedef unsigned long long (*merptr_t)(const char *);\n"); + printf("merptr_t get_ptr(int kmer) { switch(kmer) {"); for(j = 1; j < 32; j++) - printf("case %d: return mer_%d;", j, j); - printf("}"); - - + printf("case %d: return mer_%d;\n", j, j); + printf("}\n"); } |