aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kmer_utils.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/kmer_utils.c b/kmer_utils.c
index 13eceed..e21ddb9 100644
--- a/kmer_utils.c
+++ b/kmer_utils.c
@@ -84,21 +84,21 @@ char *kmer_index_to_kmer(unsigned long long index, long kmer) {
static bool translate_nucleotides_to_numbers(char *str, size_t len, const unsigned char *lookup, bool *header) {
size_t i;
- for(i = 0; i < len; ++i) {
- if(str[i] == '>')
- *header = true;
-
- if(*header) {
- if(str[i] == '\n')
- *header = false;
-
- str[i] = ERROR;
- }
- else
- str[i] = lookup[(int)str[i]];
- }
+ for(i = 0; i < len; ++i) {
+ if(str[i] == '>')
+ *header = true;
+
+ if(*header) {
+ if(str[i] == '\n')
+ *header = false;
+
+ str[i] = ERROR;
+ }
+ else
+ str[i] = lookup[(int)str[i]];
+ }
- return *header;
+ return *header;
}
static size_t calculate_mer(const char *str, size_t str_len, size_t *pos, size_t kmer_len, size_t error_mer) {
@@ -155,8 +155,8 @@ unsigned long long *kmer_counts_from_file(FILE *fh, const unsigned int kmer) {
while((len = fread(&buffer, 1, 4096, fh)) != NULL) {
size_t i = 0;
- // returns header state,
- header = translate_nucleotides_to_numbers(buffer, len, kmer_alpha, &header);
+ // returns header state,
+ header = translate_nucleotides_to_numbers(buffer, len, kmer_alpha, &header);
for(i = 0; i < (len - kmer + 1); i++) {