From d4398f26865498d734aa42c9f625d03e51c38ba8 Mon Sep 17 00:00:00 2001 From: delangel Date: Fri, 1 Oct 2010 18:39:45 +0000 Subject: [PATCH] silly bug fix: if I'm to do a short term hack to avoid -infinity likelihoods I might as well do it right. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4403 348d0f76-0448-11de-a6fe-93d51630548a --- .../genotyper/DindelGenotypeLikelihoodsCalculationModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java index 1da0f8221..e03f21334 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java @@ -47,7 +47,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo private final double insertionEndProbability = 0.5; private final double alphaDeletionProbability = 1e-3; private final int HAPLOTYPE_SIZE = 80; - private static final double MINUS_INFINITY = -1e200; + private static final double MINUS_LOG_INFINITY = -300; // todo - the following need to be exposed for command line argument control private final double indelHeterozygosity = 1.0/8000; @@ -130,7 +130,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo for (int k=0; k < 3; k++) { genotypeLikelihoods[k] = Math.log10(genotypeLikelihoods[k]); if (Double.isInfinite(genotypeLikelihoods[k])) - genotypeLikelihoods[k] = -MINUS_INFINITY; + genotypeLikelihoods[k] = MINUS_LOG_INFINITY; } GLs.put(sample.getKey(), new BiallelicGenotypeLikelihoods(sample.getKey(),vc.getReference(), vc.getAlternateAllele(0),