This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Adapter removing with Trimmomatic

While I was trying to do adapter removal using Timmomatic-0.39, it showed the following error.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

I used the following codes:

cd /mnt/gpfs2_4m/scratch/pba264/raw_reads module load ccs/conda/trimmomatic-0.39

for f in fastq.gz; do output=/mnt/gpfs2_4m/scratch/pba264/Analysis/2-Trimmomatic/${f%.}_trimmomatic.fastq.gz log=/mnt/gpfs2_4m/scratch/pba264/Analysis/2-Trimmomatic/${f%.*}_trimmomatic.Log java -jar /mnt/gpfs2_4m/scratch/pba264/Applications/Trimmomatic/trimmomatic-0.39.jar SE -threads 8 -phred33 $f $output ILLUMINACLIP: "/mnt/gpfs2_4m/scratch/pba264/Applications/Trimmomatic/Adapters/TruSeq3-SE.fa":2:20:10 SLIDINGWINDOW:5:20 MINLEN:18 done

Your suggestions will be appreciated.

rna-seq

1 answer

I think you miss the * in your loop. It should read: for f in *.fastq.gz, indicating, that you allow any number and any type of letters befor that.

Log in to answer this question.