Hi,
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
I am following the Mothur SOP, however, due to the partially bad read quality, I incorporated a quality filtering step before aligning the reads. Therefore, I use a tool from the BBDuk package
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)
Use these for inspiration: A: bash loop for alignment RNA-seq data or A: shell script for bowtie/bwa alignment pair end reads
Post if you would like additional help.