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

This commit is contained in:
Guillermo del Angel 2011-08-22 20:42:47 -04:00
parent c270384b2e
commit ee68713267
1 changed files with 1 additions and 0 deletions

View File

@ -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 {