From fc0ef29e1aa74b13dc1f179ac755b8bf784af9bb Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Tue, 26 Nov 2013 10:37:12 -0500 Subject: working single threaded multifasta with rarity --- src/c/kmer_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/c/kmer_utils.c') diff --git a/src/c/kmer_utils.c b/src/c/kmer_utils.c index c1fc1e0..ca33156 100644 --- a/src/c/kmer_utils.c +++ b/src/c/kmer_utils.c @@ -100,6 +100,8 @@ unsigned long long * get_kmer_counts_from_file(const char *fn, const unsigned in char *start = strchr(line, '\n'); if(start == NULL) continue; + + start = start + 1; size_t start_len = strlen(start); @@ -132,11 +134,12 @@ unsigned long long * get_kmer_counts_from_file(const char *fn, const unsigned in // for each char in the k-mer check if it is an error char for(i = position + kmer - 1; i >= position; i--){ - if(str[i] >> 2) { + if(str[i] == 5) { mer = width; position = i; goto next; } + // if it's a newline, we should skip it // multiply this char in the mer by the multiply // and bitshift the multiply for the next round -- cgit v1.2.3