diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java index f764aada0..fe22a6d2c 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -159,7 +159,7 @@ public class UnifiedGenotyperEngine { public VariantCallContext calculateLikelihoodsAndGenotypes(RefMetaDataTracker tracker, ReferenceContext refContext, AlignmentContext rawContext) { Map stratifiedContexts = getFilteredAndStratifiedContexts(UAC, refContext, rawContext); VariantContext vc = calculateLikelihoods(tracker, refContext, stratifiedContexts, StratifiedAlignmentContext.StratifiedContextType.COMPLETE, null); - if ( vc == null ) + if ( vc == null || !vc.hasGenotypes() ) return null; VariantCallContext vcc = calculateGenotypes(tracker, refContext, rawContext, stratifiedContexts, vc); @@ -195,7 +195,7 @@ public class UnifiedGenotyperEngine { Allele refAllele = glcm.get().getLikelihoods(tracker, refContext, stratifiedContexts, type, genotypePriors, GLs, alternateAlleleToUse); - if (refAllele != null) + if ( refAllele != null ) return createVariantContextFromLikelihoods(refContext, refAllele, GLs); else return null;