HaplotypeCaller--Exception in thread "main" java.lang.OutOfMemoryError: Java Heap Size. Allele -Specific- Annotation
If you are seeing an error, please provide(REQUIRED) :
a) GATK version used: 4.1.4.1
b) Exact command used:
gatk --java-options "-Xmx60G" HaplotypeCaller \
--emit-ref-confidence GVCF \
-R $ref_gen/ucsc.hg19.fasta \
-I $bamf/"$1".bqsr.bam \
-O $gvcf/"$1".HC.g.vcf.gz \
-bamout $bamf/"$1".realigned.bam \
--active-probability-threshold 0.0012 \
--assembly-region-padding 100 \
--bam-writer-type CALLED_HAPLOTYPES \
--linked-de-bruijn-graph \
-G StandardAnnotation \
-G AS_StandardAnnotation \
-G StandardHCAnnotation \
-OBI true
c) Entire error log:
(Entire error log too long. Skip the middle part)
bwa/0.7.17 is loaded
samtools/1.9 is loaded
java/8.0_161 is loaded
TrimGalore/0.4.5 is loaded
cutadapt/2.3 is loaded
sample_ID = A200273
special_region_interval =
Directly run haplotypecaller
16:21:07.671 WARN GATKAnnotationPluginDescriptor - Redundant enabled annotation group (StandardAnnotation) is enabled for this tool by default
16:21:07.672 WARN GATKAnnotationPluginDescriptor - Redundant enabled annotation group (StandardHCAnnotation) is enabled for this tool by default
16:21:07.721 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/yangyxt/software/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar!/com/intel/gkl/native/libgkl_compression.so
Aug 22, 2020 4:21:07 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
16:21:07.941 INFO HaplotypeCaller - ------------------------------------------------------------
16:21:07.941 INFO HaplotypeCaller - The Genome Analysis Toolkit (GATK) v4.1.4.1
16:21:07.941 INFO HaplotypeCaller - For support and documentation go to https://software.broadinstitute.org/gatk/
16:21:07.941 INFO HaplotypeCaller - Executing as yangyxt@paedyl01 on Linux v3.10.0-1062.18.1.el7.x86_64 amd64
16:21:07.942 INFO HaplotypeCaller - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_161-b12
16:21:07.942 INFO HaplotypeCaller - Start Date/Time: August 22, 2020 4:21:07 PM HKT
16:21:07.942 INFO HaplotypeCaller - ------------------------------------------------------------
16:21:07.942 INFO HaplotypeCaller - ------------------------------------------------------------
16:21:07.942 INFO HaplotypeCaller - HTSJDK Version: 2.21.0
16:21:07.942 INFO HaplotypeCaller - Picard Version: 2.21.2
16:21:07.942 INFO HaplotypeCaller - HTSJDK Defaults.COMPRESSION_LEVEL : 2
16:21:07.942 INFO HaplotypeCaller - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
16:21:07.942 INFO HaplotypeCaller - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
16:21:07.942 INFO HaplotypeCaller - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
16:21:07.942 INFO HaplotypeCaller - Deflater: IntelDeflater
16:21:07.943 INFO HaplotypeCaller - Inflater: IntelInflater
16:21:07.943 INFO HaplotypeCaller - GCS max retries/reopens: 20
16:21:07.943 INFO HaplotypeCaller - Requester pays: disabled
16:21:07.943 INFO HaplotypeCaller - Initializing engine
16:21:08.375 INFO HaplotypeCaller - Done initializing engine
16:21:08.379 INFO HaplotypeCallerEngine - Tool is in reference confidence mode and the annotation, the following changes will be made to any specified annotations: 'StrandBiasBySample' will be enabled. 'ChromosomeCounts', 'FisherStrand', 'StrandOddsRatio' and 'QualByDepth' annotations have been disabled
16:21:08.390 INFO HaplotypeCallerEngine - Standard Emitting and Calling confidence set to 0.0 for reference-model confidence output
16:21:08.390 INFO HaplotypeCallerEngine - All sites annotated with PLs forced to true for reference-model confidence output
16:21:08.423 INFO NativeLibraryLoader - Loading libgkl_utils.so from jar:file:/home/yangyxt/software/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar!/com/intel/gkl/native/libgkl_utils.so
16:21:08.424 INFO NativeLibraryLoader - Loading libgkl_pairhmm_omp.so from jar:file:/home/yangyxt/software/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar!/com/intel/gkl/native/libgkl_pairhmm_omp.so
16:21:08.470 INFO IntelPairHmm - Using CPU-supported AVX-512 instructions
16:21:08.470 INFO IntelPairHmm - Flush-to-zero (FTZ) is enabled when running PairHMM
16:21:08.470 INFO IntelPairHmm - Available threads: 10
16:21:08.470 INFO IntelPairHmm - Requested threads: 4
16:21:08.470 INFO PairHMM - Using the OpenMP multi-threaded AVX-accelerated native PairHMM implementation
16:21:08.523 INFO ProgressMeter - Starting traversal
16:21:08.524 INFO ProgressMeter - Current Locus Elapsed Minutes Regions Processed Regions/Minute
16:21:08.970 WARN InbreedingCoeff - InbreedingCoeff will not be calculated; at least 10 samples must have called genotypes
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_1663850432_seq_CAAGTCCCTGCCTACCTCCCAGCAGCCCGAGTGCGATCCTGTTCCTCCCTCACGGTGGCCTGTTGAGGCAGGGGGTCACGCTGAC]
...
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_1029448291_seq_GCTCTGCAGGAGGGCGGCTGCCTGTGTCCATCTGTCCATCCAGCTCTGCAGGAGGGCGGCTGCCTCTGTCCATCTGTCCATCCAG]
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_1821796360_seq_GGCTCTCCGAGGGCCAGGTGGCCACCCTGACCTTGGAGGTGGTCAGCAAAGCTTTGACCTTGGCCAGAAAGGAGGACACTGGCAG]
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_743754111_seq_GATGGTGTGGTGCTGGTCTGGATGGTGGGGTGCTGGTATGAATGGTGGGGGTGCTGGTGTGGATGGTGGGTGCTGGTCTGGATGG]
16:22:08.730 INFO ProgressMeter - chr1:2951947 1.0 12830 12786.1
Dangling End recovery killed because of a loop (findPath)
16:22:11.639 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
16:22:18.787 INFO ProgressMeter - chr1:3443230 1.2 14980 12791.9
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_1093171313_seq_CCAGACAACGCACAGCCACCAGACAACGCGCAGCCACCAGACAACGCGCAGCCACCAGACAACCCACAGCCACAGCCACCAGACA]
Found nothing Queue has this many: 0
Path that failed to extend was junction tree: [MultiDeBruijnVertex_id_825168902_seq_GAGGACATGACGTCCCCCTCCCCAAGTCCAGACGCTGCCTCAGGCCACCAGCACCGTGCAGTCCACAAAGCCCGGCCACCTCAGG]
16:22:28.942 INFO ProgressMeter - chr1:3807551 1.3 16670 12437.5
16:22:31.479 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
16:22:31.479 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
16:22:31.479 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
...
HaplotypeCallerGenotypingEngine - At position chr1:93911864-93911864 removed alt alleles where ploidy is 2 and original allele count is 51, whereas after trimming the allele count becomes 44. Alleles kept are:[A*, ATCAGGAGTTCGAGACCAGACCGGCCAACATGGTGAAAACCTATCTCCACTAAAAACACAAAATTTAGCTGGGCGTGGTGGCAGGCGCCTGTAATCCCAGCACTTTGAGAGGCTGAGGCGGGCGGATCACTTGAGG,....]
...
18:15:28.863 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
18:15:28.863 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
18:15:28.864 WARN StrandBiasBySample - Annotation will not be calculated, genotype is not called or alleleLikelihoodMap is null
20:04:47.996 INFO VectorLoglessPairHMM - Time spent in setup for JNI call : 0.618367589
20:04:47.997 INFO PairHMM - Total compute time in PairHMM computeLogLikelihoods() : 37.143243716
20:04:47.997 INFO SmithWatermanAligner - Total compute time in java Smith-Waterman : 64.10 sec
WARNING 2020-08-22 20:04:49 SortingCollection There is not enough memory per file for buffering. Reading will be unbuffered.
20:04:52.420 INFO HaplotypeCaller - Shutting down engine
[August 22, 2020 8:04:52 PM HKT] org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCaller done. Elapsed time: 223.75 minutes.
Runtime.totalMemory()=25072500736
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3181)
at java.util.ArrayList.grow(ArrayList.java:265)
at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:239)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:231)
at java.util.ArrayList.add(ArrayList.java:462)
at java.util.stream.Collectors$$Lambda$93/1474529475.accept(Unknown Source)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.Path.getVertices(Path.java:182)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.graphs.JunctionTreeKBestHaplotypeFinder.findBestHaplotypes(JunctionTreeKBestHaplotypeFinder.java:173)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.readthreading.ReadThreadingAssembler.findBestPaths(ReadThreadingAssembler.java:202)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.readthreading.ReadThreadingAssembler.runLocalAssembly(ReadThreadingAssembler.java:174)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.AssemblyBasedCallerUtils.assembleReads(AssemblyBasedCallerUtils.java:290)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCallerEngine.callRegion(HaplotypeCallerEngine.java:547)
at org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCaller.apply(HaplotypeCaller.java:240)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:308)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:281)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1048)
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:163)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:206)
at org.broadinstitute.hellbender.Main.main(Main.java:292)
Using GATK jar /home/yangyxt/software/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xmx40G -jar /home/yangyxt/software/gatk-4.1.4.1/gatk-package-4.1.4.1-local.jar HaplotypeCaller --emit-ref-confidence GVCF -R /paedwy/disk1/yangyxt/indexed_genome/ucsc.hg19.fasta -I /paedwy/disk1/yangyxt/wes/8_samples_20200819/aligned_results/A200273.bqsr.bam -O /paedwy/disk1/yangyxt/wes/8_samples_20200819/gvcfs/A200273.HC.g.vcf.gz -bamout /paedwy/disk1/yangyxt/wes/8_samples_20200819/aligned_results/A200273.realigned.bam --active-probability-threshold 0.001 --assembly-region-padding 100 --bam-writer-type CALLED_HAPLOTYPES --linked-de-bruijn-graph -G StandardAnnotation -G AS_StandardAnnotation -G StandardHCAnnotation -OBI true
real 223m50.833s
user 4622m13.075s
sys 61m17.175s
If not an error, choose a category for your question(REQUIRED):
a)How do I (......)?
b) What does (......) mean?
c) Why do I see (......)?
d) Where do I find (......)?
e) Will (......) be in future releases?
-
Hi Yangyxt, I noticed you posted two very similar questions. Have you solved one of them? What is your main issue to solve first?
-
Hi Brandt,
Thanks for your response. I did two things to work this thing out:
1. I increase the Xmx to 75Gb.
2. I increase the activity-probability-threshold to 0.0015.
I'm not sure which part exactly helps solve the issue. I guess the second operation matters more since I don't see the log records "Path failed to extend was junction tree" anymore.
-
Hi Yangyxt, thank you for posting the solution for the benefit of the community! Glad you solved this issue.
Please sign in to leave a comment.
3 comments