From a10cfe213bf360b9f83310b7c2dc1c06c4fa7d20 Mon Sep 17 00:00:00 2001 From: delangel Date: Mon, 20 Sep 2010 17:04:39 +0000 Subject: [PATCH] Small bug fix in simple indel genotyper: Likelihood of case where best haplotype pair was (REF,REF) was not computed correctly. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4314 348d0f76-0448-11de-a6fe-93d51630548a --- .../oneoffprojects/walkers/SimpleIndelGenotyperWalker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/SimpleIndelGenotyperWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/SimpleIndelGenotyperWalker.java index a4ee07319..f6bd5de79 100755 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/SimpleIndelGenotyperWalker.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/SimpleIndelGenotyperWalker.java @@ -227,7 +227,7 @@ public class SimpleIndelGenotyperWalker extends RefWalker { } int bestIndexI =-1, bestIndexJ=-1; - double callConfidence = 0.0; + double callConfidence = bestLikelihood; if (pileup.getReads().size() > 0) { @@ -270,8 +270,8 @@ public class SimpleIndelGenotyperWalker extends RefWalker { if (haplotypeLikehoodMatrix[i][j] < bestLikelihood) { bestIndexI = i; bestIndexJ = j; - if (i > 0 || j > 0) - callConfidence = bestLikelihood - haplotypeLikehoodMatrix[i][j]; + + callConfidence = bestLikelihood - haplotypeLikehoodMatrix[i][j]; bestLikelihood = haplotypeLikehoodMatrix[i][j]; } }