This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can I merge fastq files from different runs?

Hello,

I run some samples on a novaseq instrument and two of my samples did not get enough reads so we added them again on another run. Is it ok to merge the fastq files using cat before using kallisto? The samples were prepared once so both runs were prepared using the same pool.

Thank you

rnaseq

1 answer

The samples were prepared once so both runs were prepared using the same pool.

Merging technical replicates of sequencing should be fine as long as the same kind of sequencer/sequencing length was used for both runs.

Thank you so much. Is using cat ok or is there a better way to do it? I tried to merge the fastq.gz using cat and zcat and I am getting the same output.

If you’re merging .gz-compressed files, then cat is fine here:

cat sample1_tech1.fastq.gz sample1_tech2.fastq.gz > sample1_merge.fastq.gz

cat combines them, preserving .gz compression.

zcat gives the same reads after decompression, which means it outputs plain (non-compressed) FASTQ unless you gzip it up again:

## decompressed merger of the two files ##
zcat sample1_tech1.fastq.gz sample1_tech2.fastq.gz > sample1_merge.fastq

## compressed merger of the two files (extra work compared to just using 'cat') ##
zcat sample1_tech1.fastq.gz sample1_tech2.fastq.gz | gzip > sample1_merge.fastq.gz

If your goal is a merged .fastq.gz file, cat is usually the most straightforward choice.

Log in to answer this question.