From ee68713267aad558f1856ea3ae5b1a232ad3a5fb Mon Sep 17 00:00:00 2001 From: Guillermo del Angel Date: Mon, 22 Aug 2011 20:42:47 -0400 Subject: [PATCH] Further Bug fixes to CountVariants: stratifications were wrong in case genotypes had no-calls, for example if we stratified by sample and a sample had a no-call, this no-call was considered a true variant and counts were incorrectly increased --- .../sting/gatk/walkers/varianteval/evaluators/CountVariants.java | 1 + 1 file changed, 1 insertion(+) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java index 711ed9e04..59ef3d992 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java @@ -99,6 +99,7 @@ public class CountVariants extends VariantEvaluator implements StandardEval { // This is really not correct. What we really want here is a polymorphic vs. monomorphic count (i.e. on the Genotypes). // So in order to maintain consistency with the previous implementation (and the intention of the original author), I've // added in a proxy check for monomorphic status here. + // Protect against case when vc only as no-calls too - can happen if we strafity by sample and sample as a single no-call. if ( !vc1.isVariant() || (vc1.hasGenotypes() && vc1.getHomRefCount() + vc1.getNoCallCount() == vc1.getNSamples()) ) { nRefLoci++; } else {