GATK CalculateContamination (paired mode) - NaN value
I am applying the Mutect2 pipeline (GATK v4.1.2.0) to my WES data (tumor samples and their matched normal counterparts) to detect somatic mutations. However, for two patients, when I try to calculate the contamination, the result is NaN. As a consequence, after running FilterMutectCalls, the output file (mutect2.filtered.vcf) is empty. Here's the pipeline:
# Pileup table for the tumour sample
${GATK} GetPileupSummaries \
-I ${BAM_TUM} \
-V ${SNP1000G} \
-O $OUT_FOLDER2/TUM.pileups.table
# Pileup table for the normal sample
${GATK} GetPileupSummaries \
-I ${BAM_NORM} \
-V ${SNP1000G} \
-O $OUT_FOLDER2/NORM.pileups.table
${GATK} CalculateContamination \
-I $OUT_FOLDER2/TUM.pileups.table \
-matched $OUT_FOLDER2/NORM.pileups.table \
-O $OUT_FOLDER2/contamination.table
${GATK} Mutect2 \
-R ${REFGENOME} \
-I ${BAM_TUM} \
-I ${BAM_NORM} \
-normal COLO829BL \
-tumor COLO829T \
--germline-resource ${SNP1000G} \
--panel-of-normals ${PON} \
-O ${OUT_FOLDER2}/mutect2.vcf
${GATK} FilterMutectCalls \
-R ${REFGENOME} \
-V ${OUT_FOLDER2}/mutect2.vcf \
--contamination-table $OUT_FOLDER2/contamination.table \
--min-allele-fraction 0.01 \
-O ${OUT_FOLDER2}/mutect2.filtered.vcf
And here's the log file for the CalculateContamination command:
21:41:35.208 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/opt/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Dec 15, 2025 9:42:35 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
21:42:35.569 INFO CalculateContamination - ------------------------------------------------------------
21:42:35.570 INFO CalculateContamination - The Genome Analysis Toolkit (GATK) v4.1.2.0
21:42:35.570 INFO CalculateContamination - For support and documentation go to https://software.broadinstitute.org/gatk/
21:42:35.573 INFO CalculateContamination - Executing as valentina@ped823 on Linux v3.10.0-957.1.3.el7.x86_64 amd64
21:42:35.573 INFO CalculateContamination - Java runtime: OpenJDK 64-Bit Server VM v1.8.0_92-b15
21:42:35.573 INFO CalculateContamination - Start Date/Time: December 15, 2025 9:41:35 PM CET
21:42:35.573 INFO CalculateContamination - ------------------------------------------------------------
21:42:35.573 INFO CalculateContamination - ------------------------------------------------------------
21:42:35.576 INFO CalculateContamination - HTSJDK Version: 2.19.0
21:42:35.576 INFO CalculateContamination - Picard Version: 2.19.0
21:42:35.576 INFO CalculateContamination - HTSJDK Defaults.COMPRESSION_LEVEL : 2
21:42:35.576 INFO CalculateContamination - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
21:42:35.576 INFO CalculateContamination - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
21:42:35.576 INFO CalculateContamination - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
21:42:35.576 INFO CalculateContamination - Deflater: IntelDeflater
21:42:35.576 INFO CalculateContamination - Inflater: IntelInflater
21:42:35.576 INFO CalculateContamination - GCS max retries/reopens: 20
21:42:35.576 INFO CalculateContamination - Requester pays: disabled
21:42:35.576 INFO CalculateContamination - Initializing engine
21:42:35.576 INFO CalculateContamination - Done initializing engine
21:42:37.120 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.228 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.236 WARN KernelSegmenter - Specified dimension of the kernel approximation (100) exceeds the number of data points (74) to segment; using all data points to calculate kernel matrix.
21:42:37.248 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.274 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.306 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.345 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.350 WARN KernelSegmenter - Specified dimension of the kernel approximation (100) exceeds the number of data points (98) to segment; using all data points to calculate kernel matrix.
21:42:37.370 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.411 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.455 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.493 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.544 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.568 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.594 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.627 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.644 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.666 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.683 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.696 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.716 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.732 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.747 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.762 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:37.781 INFO KernelSegmenter - Found 0 changepoints after applying the changepoint penalty.
21:42:45.164 INFO CalculateContamination - Shutting down engine
[December 15, 2025 9:42:45 PM CET] org.broadinstitute.hellbender.tools.walkers.contamination.CalculateContamination done. Elapsed time: 1.17 minutes.
Runtime.totalMemory()=2444230656
Tool returned:
SUCCESS
While here's the FilterMutectCalls log:
Using GATK jar /opt/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar defined in environment variable GATK_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 -jar /opt/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar LearnReadOrientationModel -I f1r2.tar.gz -O oribias.tar.gz
23:18:23.401 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/opt/gatk-4.1.2.0/gatk-package-4.1.2.0-local.jar!/com/intel/gkl/native/libgkl_compression.so
Dec 15, 2025 11:19:23 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
23:19:23.866 INFO FilterMutectCalls - ------------------------------------------------------------
23:19:23.867 INFO FilterMutectCalls - The Genome Analysis Toolkit (GATK) v4.1.2.0
23:19:23.867 INFO FilterMutectCalls - For support and documentation go to https://software.broadinstitute.org/gatk/
23:19:23.870 INFO FilterMutectCalls - Executing as valentina@ped823 on Linux v3.10.0-957.1.3.el7.x86_64 amd64
23:19:23.871 INFO FilterMutectCalls - Java runtime: OpenJDK 64-Bit Server VM v1.8.0_92-b15
23:19:23.871 INFO FilterMutectCalls - Start Date/Time: December 15, 2025 11:18:23 PM CET
23:19:23.871 INFO FilterMutectCalls - ------------------------------------------------------------
23:19:23.871 INFO FilterMutectCalls - ------------------------------------------------------------
23:19:23.872 INFO FilterMutectCalls - HTSJDK Version: 2.19.0
23:19:23.872 INFO FilterMutectCalls - Picard Version: 2.19.0
23:19:23.872 INFO FilterMutectCalls - HTSJDK Defaults.COMPRESSION_LEVEL : 2
23:19:23.872 INFO FilterMutectCalls - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
23:19:23.873 INFO FilterMutectCalls - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
23:19:23.873 INFO FilterMutectCalls - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
23:19:23.873 INFO FilterMutectCalls - Deflater: IntelDeflater
23:19:23.873 INFO FilterMutectCalls - Inflater: IntelInflater
23:19:23.873 INFO FilterMutectCalls - GCS max retries/reopens: 20
23:19:23.873 INFO FilterMutectCalls - Requester pays: disabled
23:19:23.873 INFO FilterMutectCalls - Initializing engine
23:19:24.274 INFO FeatureManager - Using codec VCFCodec to read file file:///data/PROJECTS/LIVIA/GIST_AIRC/GIST_AIRC_111225/23T072455/mutect/mutect2.vcf
23:19:24.307 INFO FilterMutectCalls - Done initializing engine
23:19:24.385 INFO IOUtils - Extracting data from archive: file:///data/PROJECTS/LIVIA/GIST_AIRC/GIST_AIRC_111225/23T072455/mutect/oribias.tar.gz
23:19:24.391 INFO IOUtils - Extracting file: ./15_S11.orientation_priors
23:19:24.423 INFO ProgressMeter - Starting traversal
23:19:24.424 INFO ProgressMeter - Current Locus Elapsed Minutes Variants Processed Variants/Minute
23:19:24.424 INFO FilterMutectCalls - Starting pass 0 through the variants
23:19:24.459 INFO FilterMutectCalls - Shutting down engine
[December 15, 2025 11:19:24 PM CET] org.broadinstitute.hellbender.tools.walkers.mutect.filtering.FilterMutectCalls done. Elapsed time: 1.02 minutes.
Runtime.totalMemory()=1847590912
java.lang.IllegalArgumentException: log10p: Log10-probability must be 0 or less
at org.broadinstitute.hellbender.utils.Utils.validateArg(Utils.java:724)
at org.broadinstitute.hellbender.utils.MathUtils.log10BinomialProbability(MathUtils.java:917)
at org.broadinstitute.hellbender.utils.MathUtils.binomialProbability(MathUtils.java:910)
at org.broadinstitute.hellbender.tools.walkers.mutect.filtering.ContaminationFilter.calculateErrorProbability(ContaminationFilter.java:56)
at org.broadinstitute.hellbender.tools.walkers.mutect.filtering.Mutect2VariantFilter.errorProbability(Mutect2VariantFilter.java:15)
at org.broadinstitute.hellbender.tools.walkers.mutect.filtering.ErrorProbabilities.lambda$new$1(ErrorProbabilities.java:19)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
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.mutect.filtering.ErrorProbabilities.<init>(ErrorProbabilities.java:19)
at org.broadinstitute.hellbender.tools.walkers.mutect.filtering.Mutect2FilteringEngine.accumulateData(Mutect2FilteringEngine.java:141)
at org.broadinstitute.hellbender.tools.walkers.mutect.filtering.FilterMutectCalls.nthPassApply(FilterMutectCalls.java:140)
at org.broadinstitute.hellbender.engine.MultiplePassVariantWalker.lambda$traverse$0(MultiplePassVariantWalker.java:40)
at org.broadinstitute.hellbender.engine.MultiplePassVariantWalker.lambda$traverseVariants$1(MultiplePassVariantWalker.java:77)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
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.MultiplePassVariantWalker.traverseVariants(MultiplePassVariantWalker.java:75)
at org.broadinstitute.hellbender.engine.MultiplePassVariantWalker.traverse(MultiplePassVariantWalker.java:40)
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)
Do you have any idea why this might be happening, and do you have any suggestions on how to address or overcome this issue?
Thanks in advance
• 724 views
•
link
0 answers
No answers yet.
Log in to answer this question.
it looks like like one of the probabilities are incorrect, check the VCF files, maybe something stands out right away
Thank you for the reply. What should I look for in the VCF files? Do you have any specific advice?