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 7e9574a4f..9ea341d92 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -378,8 +378,14 @@ public class UnifiedGenotyperEngine { int endLoc = calculateEndPos(vc.getAlleles(), vc.getReference(), loc); + Set myAlleles = vc.getAlleles(); + // strip out the alternate allele if it's a ref call + if ( bestAFguess == 0 ) { + myAlleles = new HashSet(1); + myAlleles.add(vc.getReference()); + } VariantContext vcCall = new VariantContext("UG_call", loc.getContig(), loc.getStart(), endLoc, - vc.getAlleles(), genotypes, phredScaledConfidence/10.0, passesCallThreshold(phredScaledConfidence, atTriggerTrack) ? null : filter, attributes); + myAlleles, genotypes, phredScaledConfidence/10.0, passesCallThreshold(phredScaledConfidence, atTriggerTrack) ? null : filter, attributes); if ( annotationEngine != null ) { // first off, we want to use the *unfiltered* context for the annotations diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index 3fe089ee5..3aeaf41c8 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -105,8 +105,8 @@ public class @Test public void testParameter() { HashMap e = new HashMap(); - e.put( "-genotype", "683ce57f2fd3acd5f6fe7599c1ace169" ); - e.put( "-all_bases", "2ddf763c208602693cad942c9ccb804c" ); + e.put( "-genotype", "4ffcb1e1f20ce175783c32c30deef8db" ); + e.put( "-all_bases", "3d98205a31a133c11e518e095dc7ab65" ); e.put( "--min_base_quality_score 26", "5f1cfb9c7f82e6414d5db7aa344813ac" ); e.put( "--min_mapping_quality_score 26", "6c3ad441f3a23ade292549b1dea80932" ); e.put( "--max_mismatches_in_40bp_window 5", "5ecaf4281410b67e8e2e164f2ea0d58a" );