for fastq_file_R1 in fastq/*_R1.fastq.gz
do
fastq_file_R2=$(echo $fastq_file_R1 | sed 's/_R1.fastq.gz/_R2.fastq.gz/')
echo "Processing: $fastq_file_R1"
trim_galore --paired -j 4 --quality 10 --length 20 --consider_already_trimmed 10 -o fastq/ $fastq_file_R1 $fastq_file_R2
done