From 0fae798b3a661b896fb92bddf296c0607c886ed6 Mon Sep 17 00:00:00 2001 From: ebanks Date: Thu, 10 Dec 2009 04:26:06 +0000 Subject: [PATCH] 1. Discoverable base calculations don't care about Genotypes (use Variation's PError regardless of whether the call is ref or var - it's the correct value even for ref calls). 2. Call a base genotypable if any of the Genotypes is above the threshold (you can't assume there's a single Genotype associated with the Variation). git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2306 348d0f76-0448-11de-a6fe-93d51630548a --- .../varianteval/CallableBasesAnalysis.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/CallableBasesAnalysis.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/CallableBasesAnalysis.java index 7ca9a56d6..9e3dffe3a 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/CallableBasesAnalysis.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/varianteval/CallableBasesAnalysis.java @@ -68,15 +68,18 @@ public class CallableBasesAnalysis extends BasicVariantAnalysis implements Genot // For every threshold, updated discoverable and callable for (int i = 0; i < thresholds.length; i++) { double threshold = thresholds[i]; - Genotype genotype = ((VariantBackedByGenotype)eval).getCalledGenotype(); // update discoverable - if ( eval.isSNP() && eval.getNegLog10PError() >= threshold) + if ( eval.getNegLog10PError() >= threshold ) discoverable_bases[i]++; - if ( eval.isReference() && genotype.getNegLog10PError() >= threshold) - discoverable_bases[i]++; - if ( genotype.getNegLog10PError() >= threshold) - genotypable_bases[i]++; + + List genotypes = ((VariantBackedByGenotype)eval).getGenotypes(); + for ( Genotype g : genotypes ) { + if ( g.getNegLog10PError() >= threshold ) { + genotypable_bases[i]++; + break; + } + } } return null;