fastq-tools icon indicating copy to clipboard operation
fastq-tools copied to clipboard

Empty resulting fastq files after fastq-sample

Open ingkebil opened this issue 9 years ago • 1 comments

I'm running fastq-sample from the current HEAD like this:

./src/fastq-sample -n 10000 -o downsampled -s 12345 <(zcat *_1.fastq.gz) <(zcat *_2.fastq.gz)

And I get two empty fastq files as a result. Might there be a problem with using process substitution here?

ingkebil avatar Oct 08 '15 11:10 ingkebil

I've tested this out with intermediate files instead of process substitution and that seems to work like a charm.

After digging into the code a bit, my suspicion is the use of fastq_rewind which in turn uses rewind to go back to the start of the FILE. This is not something that is possible in a stream. I had expected fastq-sample to throw an error on that tho.

So I guess that's that. I'll have to use intermediate files.

ingkebil avatar Oct 09 '15 08:10 ingkebil