From 845488ff94d53fb44f8be0e9edee4e074c926fb3 Mon Sep 17 00:00:00 2001 From: andrewk Date: Thu, 30 Jul 2009 21:54:06 +0000 Subject: [PATCH] VariantEval now decides whether a variant is not confidently called using BestVsNetxBest if genotypes are being evaluated and BestVsRef if not (variant discovery only). Also, the absolute value of the BestVsRef LOD (getVariantionConfidence) is used so that confident reference calls (if the GELI has output them) will show up in the final table as reference calls rather than no calls. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1347 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/varianteval/VariantEvalWalker.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/VariantEvalWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/VariantEvalWalker.java index 78da993b4..b4f1fe89c 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/VariantEvalWalker.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/VariantEvalWalker.java @@ -155,8 +155,16 @@ public class VariantEvalWalker extends RefWalker { AllelicVariant eval = (AllelicVariant)tracker.lookup("eval", null); //if ( eval!=null ) System.out.printf("Eval: %f %d %b%n", eval.getVariationConfidence(), minDiscoveryQ, eval.getVariationConfidence() < minDiscoveryQ); - if ( eval != null && eval.getVariationConfidence() < minDiscoveryQ ) - eval = null; + if ( eval != null ) { + out.println(eval); + if ( evalContainsGenotypes ) { + // Genotyping - use best vs. next best lod + if ( eval.getConsensusConfidence() < minDiscoveryQ ) eval = null; + } else { + // Variant discovery - use best vs. reference lod + if ( Math.abs(eval.getVariationConfidence()) < minDiscoveryQ ) eval = null; + } + } // update stats about all of the SNPs updateAnalysisSet(ALL_SNPS, eval, tracker, ref, context);