I have a list of 80 fastq files. These are 40 samples with 2 technical replicates each that I'd like to concatenate.
Rather than repeating for e.g:
cat sample1n1.fastq sample1n2.fastq > sample1_cat.fastq
cat sample2n1.fastq sample2n2.fastq > sample2_cat.fastq
etc...
Is there a command that automates this?
Thanks
For gzip files:
@shenwei356 this is not right. You appear to be missing a
s
at beginning of the command. This may also cause a problem since thecat
file may also get into this wild card.You're right. To avoid re-reading the existed output file, one can set the output to a different directory (not the current path), or use a different file extension like
.fq
.Or filter out the out file from the list (seems too verbose).