Question: Trimmomatic Error : java.lang.ArrayIndexOutOfBoundsException: 1
gravatar for bwee
15 months ago by
bwee0 wrote:


I am getting the following error when trying to use trimmomatic. I cannot figure out what is wrong. I have reformatted my adapter fasta to be similar to theirs. I couldn't find any strange spaces in my arguments. Any help would be appreciated.

Here is my command:

java -jar path/to/trimmomatic-0.36.jar SE -phred33 in.fq.gz out.fq.gz ILLUMINACLIP:/path/to/adapter.fasta
TrimmomaticSE: Started with arguments:
 -phred33 in.fq.gz out.fq.gz ILLUMINACLIP:/path/to/adapter.fasta 
Automatically using 1 threads
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at org.usadellab.trimmomatic.trim.IlluminaClippingTrimmer.makeIlluminaClippingTrimmer(
    at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(
    at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(
    at org.usadellab.trimmomatic.Trimmomatic.main(

My adapter file:



qc trimmomatic • 784 views
ADD COMMENTlink modified 15 months ago • written 15 months ago by bwee0

Remove the Ns at the beginning of your adapter sequence, rerun the command, and see if that solves your problem.

ADD REPLYlink written 15 months ago by harold.smith.tarheel4.5k
gravatar for Pierre Lindenbaum
15 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum128k wrote:

there error is here:

I don't know trimmomatic but i imagine that this argument is not valid


syntax looks like this:

        String arg[] = args.split(":");

        File seqs=new File(arg[0]);

        int seedMaxMiss = Integer.parseInt(arg[1]);
        int minPalindromeLikelihood = Integer.parseInt(arg[2]);
int minSequenceLikelihood = Integer.parseInt(arg[3]);

... aaaaannd looking in the manual:

 ILLUMINACLIP:<fastaWithAdaptersEtc>:<seed mismatches>:<palindrome clip threshold>:<simple clip threshold> 
ADD COMMENTlink written 15 months ago by Pierre Lindenbaum128k

Thanks thats right!. Just found that too. I kept overlooking it in the docs.

ADD REPLYlink written 15 months ago by bwee0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1113 users visited in the last hour