From 2d1265771fe3db62162aa5c645454418f2732490 Mon Sep 17 00:00:00 2001 From: ebanks Date: Wed, 29 Sep 2010 16:44:53 +0000 Subject: [PATCH] Fix for G: make sure to generate the genotype conformations in the grid for the target frequency when not using grid search for anything except the conformations git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4382 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/genotyper/AlleleFrequencyCalculationModel.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/AlleleFrequencyCalculationModel.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/AlleleFrequencyCalculationModel.java index 1a8e9a5d2..dbdb60b6d 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/AlleleFrequencyCalculationModel.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/AlleleFrequencyCalculationModel.java @@ -316,6 +316,13 @@ public abstract class AlleleFrequencyCalculationModel implements Cloneable { } public Pair getGenotype(int frequency, String sample) { + // it's possible that the genotype conformation hash wasn't initialized + if ( samplesToGenotypesPerAF.get(frequency) == null ) { + // confirm that the current frequency is the target one + if ( frequency != this.frequency ) + throw new IllegalStateException("Attempting to retrieve genotypes from an uninitialized hash for frequency " + frequency + " (the hash is current standing at frequency " + this.frequency + ")"); + recordGenotypes(); + } return samplesToGenotypesPerAF.get(frequency).get(sample); }