From a6a9c32bae2aa0b620c7ea4497885f23bdf84265 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Mon, 28 Oct 2013 12:08:58 -0400 Subject: update kmer utils --- src/c/kmer_utils.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/c') 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 #include +#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; } -- cgit v1.2.3