How to concatenate reads from Illumina lanes
Introduction
In next-generation sequencing (NGS), it’s common to sequence the same sample across multiple Illumina lanes to increase coverage or meet sequencing depth requirements. However, analyzing data from multiple lanes requires concatenating the reads into a single file for downstream processing.
While using the --no-lane-splitting
option for Illumina's bcl2fastq
program fixes the need to concatenate read files manually, sometimes the reads are not merged and require. This post provides some simple ways to merge Illumina reads.
How to merge Illumina reads from different lanes
Note: this article is not about merging reverse and forward reads into one fastq file.
Option 1: using the command line
- Organize your reads to folders (one folder per samples)
- Navigate to the folder and run a concatenation command:
MacOS/Linux:
# Paired-end reads
cat *_R1.fastq.gz > merged_R1.fastq.gzcat *_R2.fastq.gz > merged_R2.fastq.gz
# Alternative format
cat *_R1_001.fastq.gz > merged_R1.fastq.gzcat *_R2_001.fastq.gz > merged_R2.fastq.gz
If you want to control the naming or which files to merge, or keep all samples in one folder you can use cat
without the *
operator to specify which files to merge:
# Replace the names below with your actual filenames
cat sample1_L1_R1.fastq.gz sample1_L2_R1.fastq.gz > sample1_merged_R1.fastq.gz
cat sample1_L1_R2.fastq.gz sample1_L2_R2.fastq.gz > sample1_merged_R2.fastq.gz
Windows Command Prompt:
# Paired-end reads
copy /b *_R1.fastq.gz merged_R1.fastq.gz
copy /b *_R2.fastq.gz merged_R2.fastq.gz
# Alternative format
copy /b *_R1_001.fastq.gz merged_R1.fastq.gz
copy /b *_R2_001.fastq.gz merged_R2.fastq.gz
Considerations
- If you’re working on a large dataset, it’s useful to create a more refined script which follows your folder structure and filename structure.
- Edit the commands to match the file format you have, for example use
.fastq
for uncompressed reads or.fq
if your files use that format. - Remember to keep R1 and R2 reads separate when concatenating paired-end sequencing data.
Option 2: automate with Solu
Solu Platform can perform this step automatically, saving time and reducing errors.

- Upload data: Upload your FASTQ files from multiple lanes directly to the Solu Platform
- Automated concatenation: Solu automatically identifies and concatenates reads by sample, ensuring paired-end files remain synchronized.
- Solu doesn’t yet have the option to download merged reads, but it will perform a de novo assembly and many more analyses for microbial genomic samples. Please let us know if the merged reads would be useful as a downloadable item!
FAQs
Q: What if my files are in different formats?
A: This guide assumes your files are in FASTQ format. You need to use software like bcl2fastq, BCL Convert, or ask the sequencing provider to provide the data in demultiplexed FASTQ format.
Q: Is Solu Platform suitable for beginners?
A: Absolutely! Solu has an intuitive interface and requires no installation or configuration, making it ideal for researchers at all skill levels.
Q: Can I concatenate single-end and paired-end reads together?
A: No, single-end and paired-end reads should be processed separately.
Q: How secure is my data on Solu Platform?
A: Solu prioritizes data security and complies with industry standards (HIPAA, ISO 27001) to ensure your data is protected at all times.
Q: Can Solu handle large datasets?
A: Yes, Solu is optimized to handle large datasets efficiently, making it a reliable choice for high-throughput sequencing projects.
Get started for free
Create your free Solu Platform account today to start analyzing genomes.