From bc78ff5c01b496fa9fa64a4f41e9c430087d82a3 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 31 Oct 2013 10:17:47 -0400 Subject: fix a bug so we only read when the length is greater han the kmer --- src/c/kmer_utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/c/kmer_utils.c') 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 -- cgit v1.2.3