From eb67aee7326d64dfdfc4db7a4b849c0d73e1b648 Mon Sep 17 00:00:00 2001 From: delangel Date: Thu, 30 Sep 2010 21:38:22 +0000 Subject: [PATCH] bug fix: forgot to uncomment code to compute genotype likelihoods git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4397 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/genotyper/ExactAFCalculationModel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/ExactAFCalculationModel.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/ExactAFCalculationModel.java index 9122626bd..3be8fc29e 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/ExactAFCalculationModel.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/ExactAFCalculationModel.java @@ -208,25 +208,25 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel { if (bestGTguess == 0) { myAlleles.add(alleleA); myAlleles.add(alleleA); - //qual = posteriors[0] - Math.max(posteriors[1],posteriors[2]); + qual = posteriors[0] - Math.max(posteriors[1],posteriors[2]); } else if(bestGTguess == 1) { myAlleles.add(alleleA); myAlleles.add(alleleB); - //qual = posteriors[1] - Math.max(posteriors[0],posteriors[2]); + qual = posteriors[1] - Math.max(posteriors[0],posteriors[2]); } else { myAlleles.add(alleleB); myAlleles.add(alleleB); - // qual = posteriors[2] - Math.max(posteriors[1],posteriors[0]); + qual = posteriors[2] - Math.max(posteriors[1],posteriors[0]); } -/* + if (qual <= 0.0) { qual = 0.0; myAlleles.clear(); myAlleles.add(Allele.NO_CALL); -// myAlleles.add(Allele.NO_CALL); + myAlleles.add(Allele.NO_CALL); } -*/ + attributes.put(VCFConstants.GENOTYPE_QUALITY_KEY,String.format("%4.2f", 10*qual)); GenotypeLikelihoods likelihoods = new GenotypeLikelihoods(GL.getLikelihoods());