Concatenate fastq files before or after trimming?
3
0
Entering edit mode
5.0 years ago
eb13 ▴ 20

Hi all,

I have Fastq files for libraries which were split across four lanes (L001-L004) on one flow cell of the Illumina NextSeq. Does it matter if files are concatenated after undergoing trimming? I have already trimmed files individually using TrimGalore! and would like to concatenate before aligning, but am unsure if it is better to have concatenated before any processing of the reads.

After reading comments on Trimmomatic: Does it matter to trim the fastq before or after merging multiple replicates? and I have same samples in multiple lanes. What are all the steps to be taken before downstream analysis? , it appears you can concatenate at any point, but I am curious if this only applies to the pipelines used in those instances or if it applies more broadly.

Thank you in advance!

fastq concatenate illumina trimgalore • 3.6k views
ADD COMMENT
0
Entering edit mode

The only issue I can think of is having one lane with errors, in this case you would want to disregard this one altogether. If I remember correctly NextSeq has six cameras, each covering one third of a couple of lanes so the more common scenario would be two lanes having issues.

ADD REPLY
0
Entering edit mode

Great - thank you for your help @WouterDeCoster!

ADD REPLY
3
Entering edit mode
5.0 years ago

Trimming is done per read (pair) individually. As such it doesn't matter when you concatentate your files.

ADD COMMENT
0
Entering edit mode
5.0 years ago
tim.booth ▴ 110

Aside from the issue noted by @Asaf, the only other consideration is if you want overall trimming statistics then you will have to numerically add up the numbers from all the TrimGalore log files. But most people don't worry too much about these.

You say you want to concatenate before aligning but in most cases it's best to do the alignments separately, then sort the BAM files and only then merge them. The results will be the same but the point is that you can parallelize the slow alignment and sorting jobs (eg. on a cluster), and then merging the sorted BAM files is pretty quick.

ADD COMMENT
0
Entering edit mode
5.0 years ago
sklages ▴ 170

As already mentioned, technically it doesn't matter. Personally I'd merge the fastq files before trimming, simply to get an overall statistics after trimming.

ADD COMMENT

Login before adding your answer.

Traffic: 1830 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6