I need help to write a for loop to run Trimmomatic tool for quality trimming of paired end fastq files.
I need to write a for loop so that I can run an executable for all multiple files.
Input PE files looks like - C1_S1_L001_R1_001.fastq.gz
C1_S1_L001_R2_001.fastq.gz
C2_S39_L001_R1_001.fastq.gz
C2_S39_L001_R2_001.fastq.gz
T2_S41_L001_R1_001.fastq.gz
T2_S41_L001_R2_001.fastq.gz
T6_S45_L001_R1_001.fastq.gz
T6_S45_L001_R2_001.fastq.gz
To run trimmomatic for the paired reads corresponding to C1_S1_L001_R1_001.fastq.gz and C1_S1_L001_R2_001.fastq.gz, the following command works:
java -jar ~/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 C1_S1_L001_R1_001.fastq.gz C1_S1_L001_R2_001.fastq.gz C1_R1_paired.fq.gz C1_R1_unpaired.fq.gz C1_R2_paired.fq.gz C1_R2_unpaired.fq.gz LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:35
The framework provided by trimmomatic
java -jar <path to trimmomatic.jar> PE [-threads <threads] [-phred33 | -phred64] [-trimlog <logFile>] <input 1> <input 2> <paired output 1> <unpaired output 1> <paired output 2> <unpaired output 2> <step 1> ...
Any help please!
Thanks!
I need to write a for loop so that I can run an executable for all multiple files.
Input PE files looks like - C1_S1_L001_R1_001.fastq.gz
C1_S1_L001_R2_001.fastq.gz
C2_S39_L001_R1_001.fastq.gz
C2_S39_L001_R2_001.fastq.gz
T2_S41_L001_R1_001.fastq.gz
T2_S41_L001_R2_001.fastq.gz
T6_S45_L001_R1_001.fastq.gz
T6_S45_L001_R2_001.fastq.gz
To run trimmomatic for the paired reads corresponding to C1_S1_L001_R1_001.fastq.gz and C1_S1_L001_R2_001.fastq.gz, the following command works:
java -jar ~/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 C1_S1_L001_R1_001.fastq.gz C1_S1_L001_R2_001.fastq.gz C1_R1_paired.fq.gz C1_R1_unpaired.fq.gz C1_R2_paired.fq.gz C1_R2_unpaired.fq.gz LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:35
The framework provided by trimmomatic
java -jar <path to trimmomatic.jar> PE [-threads <threads] [-phred33 | -phred64] [-trimlog <logFile>] <input 1> <input 2> <paired output 1> <unpaired output 1> <paired output 2> <unpaired output 2> <step 1> ...
Any help please!
Thanks!
Comment