Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
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!
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.
GenotypeGVCF error: what(): std::bad_alloc

I have run GenotypeGVCF for 1200 samples across 27 chromosomes. I get vcf output for 24 of the chromosomes but 3. See my command and log below. I get this error for 2 chromosomes while the third just stops at the 'initialising engine' stage. I have submitted my job to a linux cluster and have used the same command for all chromosomes. I have tried to re-run this 3 chromosomes by giving additional memory but I get the same error.
Using GATK jar /share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-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 -Xmx52g -Xms52g
-jar /share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar GenotypeGVCFs
-V gendb:///GVCF_databases/Chrom4_GVCF_database
-O /VCF_output_by_chrom/Chrom4.vcf.gz
-R Reference_genome.fasta --use-new-qual-calculator --tmp-dir /home/Chrom4
18:22:09.545 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Sep 13, 2019 6:22:12 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
18:22:12.782 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.783 INFO GenotypeGVCFs - The Genome Analysis Toolkit (GATK) v4.1.2.0
18:22:12.783 INFO GenotypeGVCFs - For support and documentation go to https://software.broadinstitute.org/gatk/
18:22:12.783 INFO GenotypeGVCFs - Executing as [email protected] on Linux v3.10.0-957.12.2.el7.x86_64 amd64
18:22:12.783 INFO GenotypeGVCFs - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_131-b11
18:22:12.784 INFO GenotypeGVCFs - Start Date/Time: 13 September 2019 18:22:09 BST
18:22:12.784 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO GenotypeGVCFs - HTSJDK Version: 2.19.0
18:22:12.784 INFO GenotypeGVCFs - Picard Version: 2.19.0
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.COMPRESSION_LEVEL : 2
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
18:22:12.785 INFO GenotypeGVCFs - Deflater: IntelDeflater
18:22:12.785 INFO GenotypeGVCFs - Inflater: IntelInflater
18:22:12.786 INFO GenotypeGVCFs - GCS max retries/reopens: 20
18:22:12.786 INFO GenotypeGVCFs - Requester pays: disabled
18:22:12.786 INFO GenotypeGVCFs - Initializing engine
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Using GATK jar /share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-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 -Xmx52g -Xms52g
-jar /share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar GenotypeGVCFs
-V gendb:///GVCF_databases/Chrom4_GVCF_database
-O /VCF_output_by_chrom/Chrom4.vcf.gz
-R Reference_genome.fasta --use-new-qual-calculator --tmp-dir /home/Chrom4
18:22:09.545 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/share/apps/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Sep 13, 2019 6:22:12 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
18:22:12.782 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.783 INFO GenotypeGVCFs - The Genome Analysis Toolkit (GATK) v4.1.2.0
18:22:12.783 INFO GenotypeGVCFs - For support and documentation go to https://software.broadinstitute.org/gatk/
18:22:12.783 INFO GenotypeGVCFs - Executing as [email protected] on Linux v3.10.0-957.12.2.el7.x86_64 amd64
18:22:12.783 INFO GenotypeGVCFs - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_131-b11
18:22:12.784 INFO GenotypeGVCFs - Start Date/Time: 13 September 2019 18:22:09 BST
18:22:12.784 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO GenotypeGVCFs - HTSJDK Version: 2.19.0
18:22:12.784 INFO GenotypeGVCFs - Picard Version: 2.19.0
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.COMPRESSION_LEVEL : 2
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
18:22:12.785 INFO GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
18:22:12.785 INFO GenotypeGVCFs - Deflater: IntelDeflater
18:22:12.785 INFO GenotypeGVCFs - Inflater: IntelInflater
18:22:12.786 INFO GenotypeGVCFs - GCS max retries/reopens: 20
18:22:12.786 INFO GenotypeGVCFs - Requester pays: disabled
18:22:12.786 INFO GenotypeGVCFs - Initializing engine
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Tagged:
Answers
Hi @fmlad
We think this could be due to memory availability. Here are a couple of things you can try to resolve this error:
1) reduce the memory allocated. Try 40G, 30G, 20G, 10G.
2) Try to split the chromosomes that are causing the error and run them separately.
Let me know if this helps with the error.
What is the physical memory available on the machine you are using?