Merge pull request #981 from broadinstitute/eb_no_lone_dels
Fixed a small feature/bug that I introduced with the spanning deletions genotyping
This commit is contained in:
commit
5652cc6b5a
|
|
@ -261,7 +261,7 @@ public class GenotypeGVCFs extends RodWalker<VariantContext, VariantContextWrite
|
||||||
// only re-genotype polymorphic sites
|
// only re-genotype polymorphic sites
|
||||||
if ( result.isVariant() ) {
|
if ( result.isVariant() ) {
|
||||||
VariantContext regenotypedVC = genotypingEngine.calculateGenotypes(result);
|
VariantContext regenotypedVC = genotypingEngine.calculateGenotypes(result);
|
||||||
if ( regenotypedVC == null) {
|
if ( ! isProperlyPolymorphic(regenotypedVC) ) {
|
||||||
if (!INCLUDE_NON_VARIANTS)
|
if (!INCLUDE_NON_VARIANTS)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -295,6 +295,16 @@ public class GenotypeGVCFs extends RodWalker<VariantContext, VariantContextWrite
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether the provided VariantContext has real alternate alleles
|
||||||
|
*
|
||||||
|
* @param vc the VariantContext to evaluate
|
||||||
|
* @return true if it has proper alternate alleles, false otherwise
|
||||||
|
*/
|
||||||
|
private boolean isProperlyPolymorphic(final VariantContext vc) {
|
||||||
|
return ( vc != null && !vc.isSymbolic() );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add genotyping-based annotations to the new VC
|
* Add genotyping-based annotations to the new VC
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -480,4 +480,15 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest {
|
||||||
spec.disableShadowBCF();
|
spec.disableShadowBCF();
|
||||||
executeTest("testMultipleSpanningDeletionsMD5", spec);
|
executeTest("testMultipleSpanningDeletionsMD5", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true)
|
||||||
|
public void testSpanningDeletionDoesNotGetGenotypedWithNoOtherAlleles() {
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
"-T GenotypeGVCFs --no_cmdline_in_header -o %s -R " + b37KGReference +
|
||||||
|
" -V " + privateTestDir + "spanningDel.delOnly.g.vcf",
|
||||||
|
1,
|
||||||
|
Arrays.asList("46169d08f93e5ff57856c7b64717314b"));
|
||||||
|
spec.disableShadowBCF();
|
||||||
|
executeTest("testSpanningDeletionDoesNotGetGenotypedWithNoOtherAlleles", spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue