Interleave Paired-End Reads

Combine paired-end FASTQ files into a single interleaved FASTQ file

Supported formats: FASTQ, FQ and compressed FASTQ files (.fastq.gz, .fq.gz) (Maximum size: 500 MB per file)

Interleave Paired-End Reads

Function

Combines paired-end FASTQ files (R1 and R2) into a single interleaved FASTQ file where each forward read is immediately followed by its corresponding reverse read.


Input Format

  • R1 FASTQ file (.fastq, .fq, .fastq.gz)
  • R2 FASTQ file (.fastq, .fq, .fastq.gz)
  • Both files must contain the same reads in the same order.

Output Format

  • Single interleaved FASTQ file.
  • Reads appear as R1 → R2 → R1 → R2.
  • Original FASTQ records are preserved.

Applications

  • BWA MEM paired-end alignment.
  • Bowtie2 interleaved input.
  • Assembly pipelines.
  • Streaming paired-end workflows.
  • Simplified file management.

Example

R1.fastq

Read1/1
Read2/1

+

R2.fastq

Read1/2
Read2/2

↓

Interleaved.fastq

Read1/1
Read1/2
Read2/1
Read2/2

SeqKit Example

seqkit pair \
-1 R1.fastq.gz \
-2 R2.fastq.gz | \
seqkit interleaved \
-o interleaved.fastq.gz

BBMap Example

reformat.sh \
in1=R1.fastq.gz \
in2=R2.fastq.gz \
out=interleaved.fastq.gz

BWA Example

bwa mem -p \
reference.fa \
interleaved.fastq \
> aligned.sam

Suggested Reading


Important Notes:
  • R1 and R2 must contain the same number of reads.
  • Read order must be identical between both files.
  • Mismatched files can produce incorrect pairings.
  • Repair paired reads first if files have been independently filtered or trimmed.
  • Common repair tools include SeqKit Pair and BBMap repair.sh.