aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-10-28 12:08:58 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-10-28 12:08:58 -0400
commita6a9c32bae2aa0b620c7ea4497885f23bdf84265 (patch)
tree88e4583cfffdb5eea5cc76492ca0610cd533eb22
parent3f20f3ba6b9b7375290ea8342dcca4e3e977829e (diff)
update kmer utils
-rw-r--r--src/c/kmer_utils.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/c/kmer_utils.c b/src/c/kmer_utils.c
index cf8d666..3a1eba4 100644
--- a/src/c/kmer_utils.c
+++ b/src/c/kmer_utils.c
@@ -4,6 +4,8 @@
#include <stdlib.h>
#include <string.h>
+#include "quikr.h"
+
const unsigned char alpha[256] =
{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
@@ -16,13 +18,9 @@ const unsigned char alpha[256] =
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5};
-inline unsigned long long pow_four(unsigned long long x) {
- return (unsigned long long)1 << (x * 2);
-}
-
// convert a string of k-mer size base-4 values into a
// base-10 index
-inline unsigned long num_to_index(const char *str, const int kmer, int *position, const long error_pos) {
+unsigned long num_to_index(const char *str, const int kmer, const long error_pos) {
int i = 0;
unsigned long out = 0;
@@ -31,7 +29,7 @@ inline unsigned long num_to_index(const char *str, const int kmer, int *position
for(i = kmer - 1; i >= 0; i--){
if(str[i] >> 2) {
- position += i;
+ // position += i;
return error_pos;
}