This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to run Trimmomatic with multiple files in a loop

Hi, I am trying to run the Trimmomatic for multiple fastq.gz files. So, I am trying to run it in a loop at bash script. Please suggest ways to improve the code that I am using below. Please note that I have basic skills in bash script so the code has silly mistakes.

for i in *_R1.fastq
do

java -jar /media/Data/apps/Trimmomatic-0.39/trimmomatic-0.39.jar PE -phred33 ${i}.1.fastq.gz ${i}.2.fastq.gz ${i}.trimmed_R1.fastq.gz 
${i}.untrimmed_R1.fastq.gz ${i}.trimmed_R2.fastq.gz ${i}.unpaired_R2.fastq.gz SLIDINGWINDOW:4:20 MINLEN:150 
ILLUMINACLIP:/media/Data/apps/Trimmomatic-0.39/adapters/NexteraPE-PE.fa:2:40:15

done
trimmomatic fastq trimming

do an echo. Use threads and specify the RAM for Trimmomatic

You keep asking variations of the same question. By now you should be able to troubleshoot these on your own. As I advised before, and cpad0112 reminded you, try these commands inside echo. You should be able to see instantly if the output is as intended.

0 answers

No answers yet.

Log in to answer this question.