Hi All,

I would like to ask that is there an accurate tool/script for deinterleaving fastq files? I managed a 'bam to fastq' conversion according to http://gatkforums.broadinstitute.org/discussion/2908/howto-revert-a-bam-file-to-fastq-format and I would like to deinterleave the output fastq.

Many thanks!
Here is lightweight solution with [Pairfq][1]:

    curl -sL git.io/pairfq_lite | perl - splitpairs -i interl.fq -f 1.fq -r 2.fq

Where the input is the interleaved fastq and 1.fq and 2.fq are the forward and reverse reads, respectively (you can choose better names though!). This assumes the pairs are labeled properly (e.g., "/1" or " 1").

 [1]: https://github.com/sestaton/Pairfq