I sequenced some gut-samples for microbial communities (16S, paired-end, Illumina MiSeq, fastq).
e.g. Sample1_read1.fq Sample1_read2.fq Sample2_read1.fq Sample2_read2.fq ...etc
bbduk.sh -Xmx1g in1=Sample1_read1.fq in2=Sample1_read2 out1=Sample1_clean_read1.fq out2=Sample1_clean_read2 qtrim=rl trimq=10
Everything works fine, but now I'd like to run everything in one batch. How can I create a loop so the bbduk.sh goes through all the files in my folder (and always takes read1 and read2 of the same sample)?
Thanks a lot for your help in advance! (And let me know if I missed some vital information)