<p>I&#39;ve downloaded a fastq file from SRA (http://trace.ncbi.nlm.nih.gov/Traces/sra/) containing reads from a paired-end Illumina 101 bp RNAseq experiment. The only problem is, it contains both read pairs in a single file, whereas I need separate files with all the _1.fq reads in one and the _2.fq reads in another.</p>

<p>Can anybody help? I&#39;m aware of the fastq-dump tool within the SRA Toolkit, but I couldn&#39;t get it to work when I was originally downloading the data.</p>

<p>Many thanks in advance.</p>

<p>My fastq file looks like this:</p>

<p>$ head sra_data.fastq<br />
@SRR1659960.1.1 1 length=101<br />
NAGAAATGAATGAGCCTACAGATGATAGGATGTTTCATGTGGTGTATGCATCGGGGTAGTCCGAGTAACGTCGGGGCATTCCGGATAGGCCGAGAAAGTGT<br />
+SRR1659960.1.1 1 length=101<br />
#1=BDDDDDHFBFIEHHHHAG&lt;HE@HGGE@HHFGHGGHHFHIHG@FFGGGHIIIIIFAC=F@GEGEECCDCECCBBBBCCCD&gt;9599&gt;C:@&gt;5@9&gt;?CCCD<br />
@SRR1659960.1.2 1 length=101<br />
CCCACTTCCACTATGTCCTATCAATAGGAGCTGTATTTGCCATCATAGGAGGCTTCATTCACTGATTTCCCCTATTCTCAGGCTACACCCTAGACCAAACC<br />
+SRR1659960.1.2 1 length=101<br />
&lt;7?BD?DD&lt;DFFABBEHEEFHII&gt;C:BCDD?&lt;C?FFC4E&gt;@DEF&gt;?FGHDFBBCG8??DGGIII:BF@C=FFC;C=D;@?EA76?DDBEC?&gt;&gt;ACCCABBB<br />
@SRR1659960.2.1 2 length=101<br />
NATAAAGTGTATGACAAATATACAAGGCTCCTAATATTGGTTTAACTTGGAGAAGTAGGTAAAGGAAGAAGGGNAAAGGAAATAGACAAAAAGACTACAGT</p>

Use Reformat from the BBMap package:

    reformat.sh in=sra_data.fastq out1=r1.fq out2=r2.fq interleaved