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
This commit is contained in:
parent
4556e3b273
commit
2d1265771f
|
|
@ -316,6 +316,13 @@ public abstract class AlleleFrequencyCalculationModel implements Cloneable {
|
|||
}
|
||||
|
||||
public Pair<Integer, Double> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue