aboutsummaryrefslogtreecommitdiff
path: root/kmer_utils.h
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-04-11 10:10:38 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2014-04-11 10:10:38 -0400
commit564bdd120fa4e2de4c8419d774f1fa6e1d8a0fbc (patch)
treee0d0de42b496161650d9912ee306ecc071c23e41 /kmer_utils.h
parent2319585caf71cded277d045c9d4001566d753778 (diff)
parent26233d023b0b1febf0edf8ca5073f36f93b1a33b (diff)
Merge branch 'master' of github.com:mutantturkey/dna-utils
Diffstat (limited to 'kmer_utils.h')
-rw-r--r--kmer_utils.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/kmer_utils.h b/kmer_utils.h
index 9fcc03c..f5087f2 100644
--- a/kmer_utils.h
+++ b/kmer_utils.h
@@ -43,9 +43,23 @@ typedef struct {
typedef unordered_map<size_t,unsigned long long, kmer_noHash_hash, kmer_eq> kmer_map;
-unsigned char alpha[256];
-unsigned char reverse_alpha[4];
-unsigned char compliment[5];
+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,
+5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 1, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5,
+5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 1, 5, 5, 5, 2,
+5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 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, 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, 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};
+const char reverse_alpha[4] = { 'A', 'C', 'G', 'T' };
+
+ // compliments
+ // A C G T E E
+ // T G C A E E
+const char compliment[6] = { 3, 2, 1, 0, 5, 5};
// open file from filename in char array *fn, and try and parse in one mer per
// line, of size kmer, and store the indicies of those mers in the *arr