[BioC] readFastq, writeFastq, compressed files and unix pipes.

Ivan Gregoretti ivangreg at gmail.com
Thu Dec 13 01:22:29 CET 2012


Hello ShortRead developers,

I recently tried to create an R script that could run as an ordinary
programme at the command line. It was something like

$ R --vanilla --slave -f ./myscript.R --input=input.fastq.gz
--output=output.fastq.gz

I tried and failed but I learned something in the process: readFastq()
and writeFastq() are not symmetrical.

Specifically:

1) readFastq() can tell the difference between a plain text FASTQ file
and a gzipped FASTQ file (.gz). Unlike that, writeFastq() always
outputs in plain text regardless of the suffix passed.

2) writeFastq() understands unix pipes because it conveniently accepts
the file argument "/dev/stdout". Unlike that, readFastq() does not
accept the file argument "/dev/stdin", so, no pipes are possible.

It would be great if readFastq() and writeFastq() were equally smart.
Please consider adding these functionalities.

Thank you,

Ivan





Ivan Gregoretti, PhD



More information about the Bioconductor mailing list