From 54facb2c51ae1869d5daf04b508dc1c2d28b17c5 Mon Sep 17 00:00:00 2001 From: ebanks Date: Sun, 27 Feb 2011 06:08:32 +0000 Subject: [PATCH] Small change for Mauricio so that the correct metrics get output when running in GENOTYPE_GIVEN_ALLELES mode. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5327 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;