Variants that become hom-ref after regenotyping in GenotypeGVCFs are now getting output in -allSites mode.

This commit is contained in:
Laura Gauthier 2014-10-17 10:28:15 -04:00
parent 5465e4484e
commit 2b848ad859
1 changed files with 8 additions and 5 deletions

View File

@ -219,11 +219,14 @@ public class GenotypeGVCFs extends RodWalker<VariantContext, VariantContextWrite
// only re-genotype polymorphic sites
if ( result.isVariant() ) {
VariantContext regenotypedVC = genotypingEngine.calculateGenotypes(result);
if ( regenotypedVC == null )
return null;
regenotypedVC = GATKVariantContextUtils.reverseTrimAlleles(regenotypedVC);
result = addGenotypingAnnotations(originalVC.getAttributes(), regenotypedVC);
if ( regenotypedVC == null) {
if (!INCLUDE_NON_VARIANTS)
return null;
}
else {
regenotypedVC = GATKVariantContextUtils.reverseTrimAlleles(regenotypedVC);
result = addGenotypingAnnotations(originalVC.getAttributes(), regenotypedVC);
}
}
// if it turned monomorphic then we either need to ignore or fix such sites