aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-10-31 10:17:47 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-10-31 10:17:47 -0400
commitbc78ff5c01b496fa9fa64a4f41e9c430087d82a3 (patch)
treed7f6228eef995c3073b60ec636f8993c192b2f3f
parent5f73d9a17280b0a388936365bace8a64a5568cea (diff)
fix a bug so we only read when the length is greater han the kmer
-rw-r--r--src/c/kmer_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/c/kmer_utils.c b/src/c/kmer_utils.c
index 3a1eba4..3c2a4cd 100644
--- a/src/c/kmer_utils.c
+++ b/src/c/kmer_utils.c
@@ -116,6 +116,8 @@ unsigned long long * get_kmer_counts_from_file(const char *fn, const unsigned in
// strip out all other newlines to handle multiline sequences
str = strnstrip(start, str, '\n',start_len);
size_t seq_length = strlen(str);
+ if(seq_length < kmer)
+ continue;
// relace A, C, G and T with 0, 1, 2, 3 respectively
// everything else is 5