aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-02-06 11:56:19 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-02-06 11:56:19 -0500
commitb0025ff7018379994a09ffe7189d65c7a1df0245 (patch)
tree59a8ede5eab7c92e23ef2c5f3810a85486c27b69
parent9e992537d7ffd25711efb69c46b5719e7505656d (diff)
updates
-rw-r--r--kmer_utils.c3
-rw-r--r--mer_generator.c9
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");
}