Merge pull request #1033 from broadinstitute/eb_fix_spanning_dels_with_new_allele

Update the allele remapping code to handle the new spanning deletion allele.
This commit is contained in:
Eric Banks 2015-06-29 22:57:14 -04:00
commit 5ea2aff379
2 changed files with 19 additions and 2 deletions

View File

@ -288,10 +288,15 @@ public class ReferenceConfidenceVariantContextMerger {
for (final Allele a : vc.getAlternateAlleles()) {
if (a.isSymbolic()) {
result.add(a);
// we always skip <NON_REF> 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 <NON_REF> 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) {

View File

@ -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);
}
}