Skip to content

Commit

Permalink
added number of sequences parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
fstrozzi committed Nov 18, 2013
1 parent 16065e7 commit 7c3e034
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fastool.c
Expand Up @@ -41,6 +41,7 @@ int process_input(FILE *stream, int rev_comp, char *string, int to_fa, int ilmn_

kseq_t *seq;
seq = kseq_init(stream);
int count = 0;
if (rev_comp) {
while (kseq_read(seq) >= 0) {
char rev_seq[seq->seq.l];
Expand Down Expand Up @@ -75,6 +76,7 @@ int process_input(FILE *stream, int rev_comp, char *string, int to_fa, int ilmn_
sequence_to_print[3] = NULL;
}
print_seq(string, to_fa, sequence_to_print, ilmn_trin);
count++;
}
}
else {
Expand All @@ -93,10 +95,12 @@ int process_input(FILE *stream, int rev_comp, char *string, int to_fa, int ilmn_
sequence_to_print[3] = NULL;
}
print_seq(string, to_fa, sequence_to_print, ilmn_trin);
count++;
}
}

kseq_destroy(seq);
fprintf(stderr,"Sequences parsed: %d\n",count);
return 0;
}

Expand Down

0 comments on commit 7c3e034

Please sign in to comment.