onecodex / needletail

Fast FASTX parsing and k-mer methods in Rust
MIT License
174 stars 20 forks source link

How to re-open a fastq.gz file? #61

Closed stela2502 closed 1 year ago

stela2502 commented 2 years ago

Hi I assume this question is a really stupid one, but I am currently parsing a set of two fastq files and need a second pass over these files. In the first I would detect which sample a cell is in and in the second I would write out the sample specific data into a new fastq file set.

I would not like to stop the program and start another one. And as I am quite new to Rust I do not know how to securely restart the scanning of a fastq file using your while let Some(record2) = readefile.next() logic.

Thank you very much for this package.

Keats commented 2 years ago

You cannot restart the parsing, you need to parse it again.