diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/ReferenceConfidenceVariantContextMerger.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/ReferenceConfidenceVariantContextMerger.java index 2780c3806..1bce6000c 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/ReferenceConfidenceVariantContextMerger.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/ReferenceConfidenceVariantContextMerger.java @@ -288,10 +288,15 @@ public class ReferenceConfidenceVariantContextMerger { for (final Allele a : vc.getAlternateAlleles()) { if (a.isSymbolic()) { result.add(a); - // we always skip when adding to finalAlleles; this is done outside if applies. - // we also skip <*DEL> if there isn't a real alternate allele. + // we always skip when adding to finalAlleles; this is done outside if it applies. + // we also skip <*:DEL> if there isn't a real alternate allele. if ( !a.equals(GATKVCFConstants.NON_REF_SYMBOLIC_ALLELE) && !vc.isSymbolic() ) finalAlleles.add(a); + } else if ( a == Allele.SPAN_DEL ) { + result.add(a); + // we skip * if there isn't a real alternate allele. + if ( !vc.isBiallelic() ) + finalAlleles.add(a); } else if (a.isCalled()) { final Allele newAllele; if (extraBaseCount > 0) { diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java index 601183705..73f410786 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java @@ -502,4 +502,16 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest { spec.disableShadowBCF(); executeTest("testSpanningDeletionDoesNotGetGenotypedWithNoOtherAlleles", spec); } + + @Test(enabled = true) + public void testGenotypingSpanningDeletionOverSpan() { + WalkerTestSpec spec = new WalkerTestSpec( + "-T GenotypeGVCFs --no_cmdline_in_header -o %s -R " + b37KGReference + + " -V " + privateTestDir + "spanningDel.delOverSpan.1.g.vcf -V " + + privateTestDir + "spanningDel.delOverSpan.2.g.vcf", + 0, + Arrays.asList("")); // we do not care about the md5; we just want to make sure it doesn't blow up with an error + spec.disableShadowBCF(); + executeTest("testGenotypingSpanningDeletionOverSpan", spec); + } } \ No newline at end of file