I got the following table containing sample names and corresponding replicates like this:
Sample Replicate S1 r12 S1 r25 S1 r68 S2 r58 S2 r34 S4 r13 etc.
In the folder I got the corresponding fastq files (for example: r12.fastq). The total amount of replicates is around 300 so making the:
cat r12.fastq r25.fastq r68.fastq > S1.fastq
would be really time consuming and exhausting.
I wonder if someone already faced such problem and could share the solution. I understand that here should be some kind of bash script with for loop but I got no idea how to organize it + the number of replicates is not the same for each sample.