]> git.donarmstrong.com Git - fastq-tools.git/blobdiff - src/parse.c
A program to randomly sample reads from a fastq file.
[fastq-tools.git] / src / parse.c
index 1ccc7de241306890665c413a1ab34e64c568b37d..61e3efa3cab29160ce59e4823d9aaa726e335059 100644 (file)
@@ -241,6 +241,15 @@ int fastq_next(fastq_t* f, seq_t* seq)
 }
 
 
+void fastq_rewind(fastq_t* fqf)
+{
+    gzrewind(fqf->file);
+    fqf->state = STATE_ID1;
+    fqf->buf[0] = '\0';
+    fqf->c = fqf->buf;
+}
+
+
 void fastq_print(FILE* fout, seq_t* seq)
 {
     /* FASTQ */