Bug Bulletin: we have identified a bug that affects indexing when producing gzipped VCFs. This will be fixed in the upcoming 3.2 release; in the meantime you need to reindex gzipped VCFs using Tabix.

Bug in various tools, 2.4-7 : "ArrayIndexOutOfBoundsException"

Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin
edited March 2013 in Announcements

As reported here:

If you encounter this bug too, please don't post a new question about it. Feel free to comment in this thread to let us know you have also had the same problem. Tell us what version of the GATK you were using and post your command line.

Thank you for your patience while we work to fix this issue.

Update: it seems the cases in the different tools aren't directly related. The PrintReads and HaplotypeCaller cases are now solved; still waiting on test files for the UG case.

Post edited by Geraldine_VdAuwera on

Geraldine Van der Auwera, PhD

Comments

  • nicolasnicolas Posts: 1

    New error in haplotypeCaller after arrayindexoutofboundsexception is fixed :

    ERROR ------------------------------------------------------------------------------------------
    ERROR stack trace

    org.broadinstitute.sting.utils.exceptions.ReviewedStingException: START (3942) > (39) STOP -- this should never happen -- call Mauricio! at org.broadinstitute.sting.utils.clipping.ReadClipper.hardClipByReferenceCoordinates(ReadClipper.java:537) at org.broadinstitute.sting.utils.clipping.ReadClipper.hardClipBothEndsByReferenceCoordinates(ReadClipper.java:235) at org.broadinstitute.sting.utils.clipping.ReadClipper.hardClipBothEndsByReferenceCoordinates(ReadClipper.java:246) at org.broadinstitute.sting.utils.clipping.ReadClipper.hardClipToRegion(ReadClipper.java:355) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.finalizeActiveRegion(HaplotypeCaller.java:585) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:477) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:132) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegion(TraverseActiveRegions.java:552) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegions(TraverseActiveRegions.java:512) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:244) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:69) at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:100) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:283) at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:245) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:152) at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:91)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 2.4-9-g532efad):
    ERROR
    ERROR Please visit the wiki to see if this is a known problem
    ERROR If not, please post the error, with stack trace, to the GATK forum
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions http://www.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: START (3942) > (39) STOP -- this should never happen -- call Mauricio!
    ERROR ------------------------------------------------------------------------------------------

    What is the phone number of Mauricio?

  • yhoangyhoang Posts: 1Member

    Hi, I am getting this problem for every sample I have

    ERROR stack trace java.lang.ArrayIndexOutOfBoundsException: 100
    ERROR A GATK RUNTIME ERROR has occurred (version 2.4-7-g5e89f01):
    ERROR MESSAGE: 100

    java -Xmx85g -jar /tools/gatk/2.4-7/gatk/GenomeAnalysisTK.jar \ -T BaseRecalibrator\ -R /refs/b37/human_g1k_v37.fasta \ -I bwamem.rmd.realigned.bam \ --knownSites /refs/b37/dbsnp_135.b37.vcf \ --knownSites /refs/b37/1000G_omni2.5.b37.sites.vcf\ -o bwamem_recal_data.grp

    And also, I got another problem: even after using --fix_misencoded_quality_scores in RealignerTargetCreator, there are some samples where I need to do the following step IndelRealigner with -allowPotentiallyMisencodedQuals, but with an older version (2.1.) I do not need to fix anything at all. What is the problem right here?

    Thanks

    Yen

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hi @nicolas,

    I will tell Mauricio that I'm going to post his phone number on the forum if he doesn't fix the bug quickly :)

    More seriously, can you post the command line that led to this error?

    Geraldine Van der Auwera, PhD

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hi Yen,

    Could you please try again with the latest version (2.4-9) and let me know if the first error still occurs?

    Regarding the second problem, older versions of gatk did not check base quality encoding. So you could have already had that problem but without knowing it.

    Geraldine Van der Auwera, PhD

  • aeonsimaeonsim Posts: 45Member

    Hi Looks like I'm still getting the ArrayIndexOutOfBoundsException: -1 with the 2.4.9 version of the HaplotypeCaller:

    java -Xmx6G -jar GenomeAnalysisTK-2.4-9-g532efad/GenomeAnalysisTK.jar -R bosTau6.fasta -T HaplotypeCaller -I odd.list -L chr13 -A LowMQ -stand_call_conf 50 -D /home/genmol2/chad/VCFs/Bos_taurus.dbsnp.137.ulg.vcf.gz -stand_emit_conf 10 -o HC-Trio-pMara.chr13.vcf -rf BadCigar -rf MaxInsertSize --maxInsertSize 1000
    
    ERROR ------------------------------------------------------------------------------------------
    ERROR stack trace

    java.lang.ArrayIndexOutOfBoundsException: -1 at org.broadinstitute.sting.gatk.walkers.haplotypecaller.GenotypingEngine.generateVCsFromAlignment(GenotypingEngine.java:675) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.GenotypingEngine.assignGenotypeLikelihoods(GenotypingEngine.java:140) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:500) at org.broadinstitute.sting.gatk.walkers.haplotypecaller.HaplotypeCaller.map(HaplotypeCaller.java:132) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegion(TraverseActiveRegions.java:552) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.processActiveRegions(TraverseActiveRegions.java:512) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:244) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:69) at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:100) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:283) at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:245) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:152) at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:91)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 2.4-9-g532efad):
    ERROR
    ERROR Please visit the wiki to see if this is a known problem
    ERROR If not, please post the error, with stack trace, to the GATK forum
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions http://www.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: -1
    ERROR ------------------------------------------------------------------------------------------
  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hi @aeonsim,

    i believe that's the second error case that we found using your data -- the fix for that problem is in our development version, but it was too complex to patch onto 2.4, so it will only be released in 2.5. That said the fix is in the nightly build of our dev tree, so you can try the latest nightly to confirm whether this is indeed fixed for you.

    Geraldine Van der Auwera, PhD

  • aeonsimaeonsim Posts: 45Member

    @Geraldine_VdAuwera Thanks I've had a go with the nightly version and I am no longer getting the error.

  • pascalgpascalg Posts: 2Member

    Hi,

    I have the same error as Yen as shown below. I tried the current version (v2.4-9-g532efad) and the nightly (nightly-2013-04-03-g231698f).

    Thanks,

    Pascal

    java -Xmx14g -jar GenomeAnalysisTK.jar \
     -T BaseRecalibrator \
     -I realigned.bam \
     -R rn5.fa \
     -S LENIENT \
     --log_to_file BR.log \
     -o realigned.recal.bam \
     --plot_pdf_file recal.pdf \
     --intermediate_csv_file recal.csv \
     --knownSites dbSNP136.vcf

    INFO 19:19:14,020 ProgressMeter - chr14:32233412 9.07e+07 5.3 h 3.5 m 24.1% 22.1 h 16.8 h INFO 19:20:06,316 GATKRunReport - Uploaded run statistics report to AWS S3

    ERROR ------------------------------------------------------------------------------------------
    ERROR stack trace

    java.lang.ArrayIndexOutOfBoundsException: 100 at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.calculateIsIndel(BaseRecalibrator.java:387) at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:253) at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:131) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:230) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:218) at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274) at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:102) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:56) at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:109) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:283) at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:245) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:152) at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:91)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 2.4-9-g532efad):
    ERROR
    ERROR Please visit the wiki to see if this is a known problem
    ERROR If not, please post the error, with stack trace, to the GATK forum
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions http://www.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: 100
    ERROR ------------------------------------------------------------------------------------------
  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hi Pascal,

    Could you please validate your input files? I see you're running with lenient validation, which may be letting through malformed data.

    Geraldine Van der Auwera, PhD

  • pascalgpascalg Posts: 2Member

    Thanks Geraldine, you are right, I should not run it in lenient mode. I checked the file by ValidateSamFile (and the vcf file by vcf-validator), but the same error occurs.

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    I see. Can you please try again with our very latest nightly build (see Downloads page)? I think we have a fix for this now.

    If that still doesn't work I'll need you to upload a snippet of your bam file to our server. Detailed instructions here: http://www.broadinstitute.org/gatk/guide/article?id=1894

    Geraldine Van der Auwera, PhD

  • Martin1Martin1 Posts: 6Member

    Hello, I have the same error for version 2.5.2. I my case it happens with the BaseRecalibrator:

    INFO 15:58:09,019 HelpFormatter - -------------------------------------------------------------------------------- INFO 15:58:09,023 HelpFormatter - The Genome Analysis Toolkit (GATK) v2.5-2-gf57256b, Compiled 2013/05/01 09:27:02 INFO 15:58:09,023 HelpFormatter - Copyright (c) 2010 The Broad Institute INFO 15:58:09,024 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk INFO 15:58:09,031 HelpFormatter - Program Args: -T BaseRecalibrator -nct 4 -R /data/common/Genomes/H.Sapiens/hg19_sorted/gatk/ucsc.hg19.fasta -knownSites /data/common/gatk_bundle_2.3/d bsnp_137.hg19.vcf -knownSites /data/common/gatk_bundle_2.3/1000G_omni2.5.hg19.vcf -knownSites /data/common/gatk_bundle_2.3/hapmap_3.3.hg19.vcf -I 5073.realign.bam -cov ReadGroupCovariat e -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate -o 5073.recal_data.grp INFO 15:58:09,031 HelpFormatter - Date/Time: 2013/05/02 15:58:09

    and the stack trace:

    ERROR stack trace

    java.lang.ArrayIndexOutOfBoundsException: 100 at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.calculateIsIndel(BaseRecalibrator.java:387) at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:253) at org.broadinstitute.sting.gatk.walkers.bqsr.BaseRecalibrator.map(BaseRecalibrator.java:131) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:230) at org.broadinstitute.sting.gatk.traversals.TraverseReadsNano$TraverseReadsMap.apply(TraverseReadsNano.java:218) at org.broadinstitute.sting.utils.nanoScheduler.NanoScheduler$ReadMapReduceJob.run(NanoScheduler.java:471) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

    Is this the same error?

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hi Martin,

    I think this is different from the others in this thread, but it might be the same as a similar case I'm currently looking into for someone else here: http://gatkforums.broadinstitute.org/discussion/2551/error-stack-trace

    Can you tell me if your file passes validation?

    Geraldine Van der Auwera, PhD

  • gathreygathrey Posts: 4Member

    Hello!

    I seem to be having simiar errors to the ones posted above but only while running HaplotypeCaller. Has this bug been fixed?

    I did not have any trouble with Unifiedgenotyper. I got the same error using multiple bam files or a single merged_bam file. I am running GATK version 2.52 on ubuntu.

    here is the stack trace:

    ERROR ------------------------------------------------------------------------------------------
    ERROR stack trace

    java.lang.ArrayIndexOutOfBoundsException: -50 at org.broadinstitute.sting.utils.BaseUtils.convertIUPACtoN(BaseUtils.java:172) at org.broadinstitute.sting.utils.fasta.CachingIndexedFastaSequenceFile.getSubsequenceAt(CachingIndexedFastaSequenceFile.java:272) at org.broadinstitute.sting.gatk.datasources.providers.LocusReferenceView.initializeReferenceSequence(LocusReferenceView.java:150) at org.broadinstitute.sting.gatk.datasources.providers.LocusReferenceView.(LocusReferenceView.java:126) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:221) at org.broadinstitute.sting.gatk.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:70) at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:100) at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:286) at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:245) at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:152) at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:91)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 2.5-2-gf57256b):
    ERROR
    ERROR Please check the documentation guide to see if this is a known problem
    ERROR If not, please post the error, with stack trace, to the GATK forum
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions http://www.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: -50

    My bam file is deduplicated-merged-realigned. I am running a very stripped down command as I am still scoping out what works trying to understand how this works. But here is the code:

    java -jar ~/Bioinformatics/GATK2/GenomeAnalysisTK.jar -T HaplotypeCaller -R ~/Bioinformatics/Aligned/agamp318.fa -I merged_realigned.bam -o ~/Bioinformatics/gatk_haplotypes/merged_bam.raw.snps.indels.vcf -debug

    thanks for the help! GA

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Can you please try running this again with the latest nightly build (see Downloads page)? The nightlies are built from the latest internal development version; they are not supported for general use but that will tell us if the bug is still present or not.

    Geraldine Van der Auwera, PhD

  • gathreygathrey Posts: 4Member

    Sure. I'll try that and get back to you :)

  • gathreygathrey Posts: 4Member

    I have not been able to run the nightly build because I am getting 'unsupported major.minor version 51.0' errors for java. I am running the latest java version and I am getting the same error on both linux and mac. I went all the way back to the oldest nightly build available, but I have the same error. So unable to figure this out but will keep trying.

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    I see -- @gathrey, when you say latest java version, which one do you mean exactly? We have been working on migrating from Java 6 to 7 so we're interested in the details if there are any version incompatibilities.

    Geraldine Van der Auwera, PhD

  • gathreygathrey Posts: 4Member

    @Geraldine: I am running Java Version 7 update 21 (build 1.7.0_21_b12)

    here is the full text of the error I am getting when I try to initiate GenomeAnalysisTK.jar

    Exception in thread "main" java.lang.UnsupportedClassVersionError: org/broadinstitute/sting/gatk/CommandLineGATK : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    Hope this is useful and thanks for helping!

    GA

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 5,260Administrator, GSA Member admin

    Hmm, that's strange. Could you please run java -version and javac -version, and post the complete output of each?

    Geraldine Van der Auwera, PhD

Sign In or Register to comment.