aboutsummaryrefslogtreecommitdiff
path: root/kmer_total_count.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-10-02 21:38:43 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-10-02 21:38:43 -0400
commitf47ce6202d2bb6425638a9142bbbebd7d44fb64f (patch)
tree612415c474b838247fe187eb1a68a9f9805d19e0 /kmer_total_count.c
parent45628e09b8f2e496a8766c442626dd6a13465286 (diff)
use an external iterator so that we can skip over anything in range of an errorw
Diffstat (limited to 'kmer_total_count.c')
-rw-r--r--kmer_total_count.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kmer_total_count.c b/kmer_total_count.c
index 3a418ed..e953d88 100644
--- a/kmer_total_count.c
+++ b/kmer_total_count.c
@@ -1,13 +1,12 @@
// Copyright 2013 Calvin Morrison
#include <math.h>
-#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#include "kmer_utils.h"
+long position = 0;
+
int main(int argc, char **argv) {
char *line = NULL;
@@ -43,8 +42,8 @@ int main(int argc, char **argv) {
if(line[0] != '>' && read > kmer) {
convert_kmer_to_num(line, read);
- for(i = 0; i < (read - kmer); i++) {
- counts[num_to_index(&line[i],kmer, width)]++;
+ for(position = 0; position < (read - kmer); position++) {
+ counts[num_to_index(&line[position],kmer, width)]++;
}
}
}