Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Error using VariantAnnotator -A PossibleDeNovo

cmorgan1cmorgan1 LondonMember
edited May 29 in Ask the GATK team

Hello there,

I am trying too annotate novel variants. I have a VCF file containing a single trio family.

I have run CalculateGenotypePosteriors on my file with no problems. I ran this with GATK4. I tried to run VariantAnnotator but kept getting errors that my ped file was incorrect .. which i believe is a bug following other discussions on the GATK forum. A workaround it seems is to perform VariantAnnotator using GATK3

I installed GATK3.8 and ran the following commands

gatk3 -T VariantAnnotator -V Fin_Fam4.vcf.gz -o Fin_Fam4.denovo.vcf.gz -A PossibleDeNovo -R $Genome --pedigree Fin_Fam4.ped

I got the following error and cannot make heads or tails of it nor can i find an example similar to this on the GATK forums. Would it be possible to take a look and advise?

ERROR stack trace
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.rangeCheck(ArrayList.java:657)
        at java.util.ArrayList.get(ArrayList.java:433)
        at htsjdk.variant.variantcontext.VariantContext.getAlternateAllele(VariantContext.java:879)
        at org.broadinstitute.gatk.tools.walkers.annotator.PossibleDeNovo.annotate(PossibleDeNovo.java:164)
        at org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine.annotateContext(VariantAnnotatorEngine.java:230)
        at org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine.annotateContext(VariantAnnotatorEngine.java:212)
        at org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotator.map(VariantAnnotator.java:355)
        at org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotator.map(VariantAnnotator.java:112)
        at org.broadinstitute.gatk.engine.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:267)
        at org.broadinstitute.gatk.engine.traversals.TraverseLociNano$TraverseLociMap.apply(TraverseLociNano.java:255)
        at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274)
        at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
        at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:144)
        at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:92)
        at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:48)
        at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:98)
        at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:323)
        at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:123)
        at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:256)
        at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:158)
        at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:108)

Best Answer

Answers

  • bshifawbshifaw Member, Broadie, Moderator admin

    What version of GATK4 did you use and what version of Java is installed ? I'm guessing your referencing the following forum thread regarding the use of gatk3. : gatk4-variantannotator-de-novo-ped-workshop-1809. The thread leads to the git issue ticket 5663 which should be the fix the original problem and seems to be merged to the latest release of gatk4.

  • cmorgan1cmorgan1 LondonMember
    edited May 31

    Hi Bshifaw, thanks for your comment.

    Originally i used gatk-package-4.0.11.0 - which was not updated to handel "-A VariantAnnotator"

    However, i have since updated to gatk-package-4.1.2.0-local.jar which is the most up to date package which is install-able through anaconda. I have paired this java version "1.8.0_45". I am now getting the same error when i tried to get this up and running on gatk3.8

    This error appears to have come up in previous posts (see: discussion 8675), however it remained unresolved here aswell.

    I have tested my VCF file through GATK ValidateVariants and there are no errors.

    The input files look as you would expect and I have had no problems running them through any of GATKs other programs.

    The ERROR stack trace is as follows:

    java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at htsjdk.variant.variantcontext.VariantContext.getAlternateAllele(VariantContext.java:879)
    at org.broadinstitute.hellbender.tools.walkers.annotator.PossibleDeNovo.annotate(PossibleDeNovo.java:131)
    at org.broadinstitute.hellbender.tools.walkers.annotator.VariantAnnotatorEngine.annotateContext(VariantAnnotatorEngine.java:278)
    at org.broadinstitute.hellbender.tools.walkers.annotator.VariantAnnotator.apply(VariantAnnotator.java:219)
    at org.broadinstitute.hellbender.engine.VariantWalker.lambda$traverse$0(VariantWalker.java:106)
    at org.broadinstitute.hellbender.engine.VariantWalker$$Lambda$91/1189303711.accept(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at org.broadinstitute.hellbender.engine.VariantWalker.traverse(VariantWalker.java:104)
    at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1039)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:139)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
    at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205)
    at org.broadinstitute.hellbender.Main.main(Main.java:291)

  • bshifawbshifaw Member, Broadie, Moderator admin

    @cmorgan1
    Mind providing a snippet of the sample also the full stacktrace of the executed command.
    Instructions mentioned here

  • cmorgan1cmorgan1 LondonMember

    @bshifaw,

    The full command that was used is as follows

    gatk VariantAnnotator \
    -V trio_data_posterior.vcf.gz \
    -O trio_data_posterior.denovo.vcf.gz \
    --tmp-dir $TMPDIR \
    -A PossibleDeNovo \
    -R $Genome \
    --pedigree trios.ped

    The stack trace is attached to this thread.

    I've upload the strack trace, the commands used to exectute ,VCF file and the associated ped file to the ftp.broadinstitute.org site. The data is in a file called CMORGAN_VARIANTANNOTATOR.tar.gz

    The GATK version is v4.1.2.0 and the java version is v1.8.0_45

    the $Genome file is for the hg19 genome.

    Thanks in advance for your help!

    Claire

  • cmorgan1cmorgan1 LondonMember

    Thank you for spending the time on this file and getting it working on your end. I wish i could say this is resolved on my end, but unfortunately it is not. I re-indexed my reference, ran the above commands and got the exact same errors as described in the stack trace above. I also downloaded a fresh reference from UCSC for the hg19 genome and created index, dict files and still got the same error.

    It's a very strange situation as all other programs in GATK work perfectly fine on my files. The program works fine on your machine with my files. To pinpoint whether it is somthing specific to do with environment on the server (its anaconda installation so shouldn't really be this) i will install gatk on my local machine and run the commands there. I'll report back when a solution has been reached to help guide any other users who may have run into similar issues in the future.

Sign In or Register to comment.