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:
parent
c270384b2e
commit
ee68713267
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue