So, fastq-dump has the ability to be run on just an SRA file accession number, such that the SRA is converted to FASTQ on-the-fly, and the SRA doesn't have to be written to disk.
I'm curious whether it would be possible to use fastq-dump to write to a named pipe (using mkfifo) and feed that into another program, for example Trinity, to run an assembly on the FASTQ file without ever having to write all that data to disk. For large datasets, this could actually save quite a bit of time in aggregate.
Has anyone done something similar? I am going to try and experiment with the technique soon, but I a) don't know much about the mkfifo process to begin with and b) am unsure of how this procedure would work for paired-end data where fastq-dump is splitting the SRA file as it goes. How would one specify which output would go to which pipe?
EDIT: A (hypothetical) example:
mkfifo fileStream
fastq-dump SRR123456 > fileStream
Trinity --single fileStream misc_args
That should take the fastq-dump data and stream it into the named pipe "fileStream", which can then be used to stream data into Trinity. I don't know enough about all of the commands, however, to know if this makes any sense.
I would welcome any thoughts from more experienced users!
EDIT: Added update as an answer below.
bin1 infile | bin2 -
and see what happens. $\endgroup$ – kmm Dec 10 '14 at 23:21