Question: Trimmomatic Error : java.lang.ArrayIndexOutOfBoundsException: 1
0
gravatar for bwee
11 weeks ago by
bwee0
bwee0 wrote:

Hello,

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(IlluminaClippingTrimmer.java:54)
    at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(TrimmerFactory.java:32)
    at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(Trimmomatic.java:59)
    at org.usadellab.trimmomatic.TrimmomaticSE.run(TrimmomaticSE.java:303)
    at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:85)

My adapter file:

>adapter_SE
NNNNTGGAATTCTCGGGTGCCAAGG

Thanks

qc trimmomatic • 191 views
ADD COMMENTlink modified 11 weeks ago • written 11 weeks 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 11 weeks ago by harold.smith.tarheel4.3k
1
gravatar for Pierre Lindenbaum
11 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

there error is here: https://github.com/timflutre/trimmomatic/blob/3694641a92d4dd9311267fed85b05c7a11141e7c/src/org/usadellab/trimmomatic/trim/IlluminaClippingTrimmer.java#L54

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

ILLUMINACLIP:/path/to/adapter.fasta

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: http://www.usadellab.org/cms/?page=trimmomatic

 ILLUMINACLIP:<fastaWithAdaptersEtc>:<seed mismatches>:<palindrome clip threshold>:<simple clip threshold> 
ADD COMMENTlink written 11 weeks ago by Pierre Lindenbaum120k

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

ADD REPLYlink written 11 weeks ago by bwee0
Please log in to add an answer.

Help
Access

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