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.

GATK GenotypeGVCFs: OutOfMemoryError: Java heap space

Hi GATK team,

I used the following commands to detect jointly variants. However, after trying many times, it always gave me the following errors even though I already set up JAVA "-Xms -Xmx" and temporary path like your suggestions in privous question. could you tell me how I solve this problem?

gatk-4.0.8.1/gatk --java-options "-Xms5g -Xmx64g" GenotypeGVCFs -R human_g1k_v37_decoy.fasta -V gendb:///home/zhuwenjuan/12/gendb -G StandardAnnotation -D dbsnp_138.b37.vcf.gz -O raw.12.vcf.gz -stand-call-conf 30.0 --TMP_DIR /home/zhuwenjuan/12/temp

Errors:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.stream.StreamSupport.intStream(StreamSupport.java:138)
at java.util.Arrays.stream(Arrays.java:5053)
at java.util.Arrays.stream(Arrays.java:5035)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.isValidConformation(GeneralPloidyExactAFCalculator.java:315)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.computeLofK(GeneralPloidyExactAFCalculator.java:280)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.calculateACConformationAndUpdateQueue(GeneralPloidyExactAFCalculator.java:187)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.fastCombineMultiallelicPool(GeneralPloidyExactAFCalculator.java:148)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.combineSinglePools(GeneralPloidyExactAFCalculator.java:112)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyExactAFCalculator.computeLog10PNonRef(GeneralPloidyExactAFCalculator.java:25)
at org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.AFCalculator.getLog10PNonRef(AFCalculator.java:33)
at org.broadinstitute.hellbender.tools.walkers.genotyper.GenotypingEngine.calculateGenotypes(GenotypingEngine.java:255)
at org.broadinstitute.hellbender.tools.walkers.genotyper.GenotypingEngine.calculateGenotypes(GenotypingEngine.java:210)
at org.broadinstitute.hellbender.tools.walkers.GenotypeGVCFs.calculateGenotypes(GenotypeGVCFs.java:266)
at org.broadinstitute.hellbender.tools.walkers.GenotypeGVCFs.regenotypeVC(GenotypeGVCFs.java:222)
at org.broadinstitute.hellbender.tools.walkers.GenotypeGVCFs.apply(GenotypeGVCFs.java:201)
at org.broadinstitute.hellbender.engine.VariantWalkerBase.lambda$traverse$0(VariantWalkerBase.java:151)
at org.broadinstitute.hellbender.engine.VariantWalkerBase$$Lambda$98/1374785073.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:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
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.VariantWalkerBase.traverse(VariantWalkerBase.java:149)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:979)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:137)

Answers

  • AdelaideRAdelaideR Unconfirmed, Member, Broadie, Moderator admin

    HI @zhuwenjuan

    Two possibilities:

    1.) Java needs to be updated on your machine.
    2.) Your variant file is larger than the one provided in the example, so you may need to increase the java options to accommodate the file.

Sign In or Register to comment.