From 4769ef8dad8379744a0b05938c848c2be9328431 Mon Sep 17 00:00:00 2001 From: Laura Gauthier Date: Wed, 2 Sep 2015 09:27:06 -0400 Subject: [PATCH] Fix bug when using --ignoreInputSamples --- .../walkers/variantutils/PosteriorLikelihoodsUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/PosteriorLikelihoodsUtils.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/PosteriorLikelihoodsUtils.java index c96fec979..517ddc3fa 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/PosteriorLikelihoodsUtils.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/PosteriorLikelihoodsUtils.java @@ -93,7 +93,10 @@ public class PosteriorLikelihoodsUtils { } //add zero allele counts for any reference alleles not seen in priors (if applicable) - totalAlleleCounts.put(vc1.getReference(),totalAlleleCounts.get(vc1.getReference())+numRefSamplesFromMissingResources); + int existingRefCounts = 0; + if (totalAlleleCounts.containsKey(vc1.getReference())) + existingRefCounts += totalAlleleCounts.get(vc1.getReference()); + totalAlleleCounts.put(vc1.getReference(),existingRefCounts+numRefSamplesFromMissingResources); } // now extract the counts of the alleles present within vc1, and in order