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:
commit
5ea2aff379
|
|
@ -288,10 +288,15 @@ public class ReferenceConfidenceVariantContextMerger {
|
||||||
for (final Allele a : vc.getAlternateAlleles()) {
|
for (final Allele a : vc.getAlternateAlleles()) {
|
||||||
if (a.isSymbolic()) {
|
if (a.isSymbolic()) {
|
||||||
result.add(a);
|
result.add(a);
|
||||||
// we always skip <NON_REF> when adding to finalAlleles; this is done outside if applies.
|
// 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.
|
// we also skip <*:DEL> if there isn't a real alternate allele.
|
||||||
if ( !a.equals(GATKVCFConstants.NON_REF_SYMBOLIC_ALLELE) && !vc.isSymbolic() )
|
if ( !a.equals(GATKVCFConstants.NON_REF_SYMBOLIC_ALLELE) && !vc.isSymbolic() )
|
||||||
finalAlleles.add(a);
|
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()) {
|
} else if (a.isCalled()) {
|
||||||
final Allele newAllele;
|
final Allele newAllele;
|
||||||
if (extraBaseCount > 0) {
|
if (extraBaseCount > 0) {
|
||||||
|
|
|
||||||
|
|
@ -502,4 +502,16 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest {
|
||||||
spec.disableShadowBCF();
|
spec.disableShadowBCF();
|
||||||
executeTest("testSpanningDeletionDoesNotGetGenotypedWithNoOtherAlleles", spec);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue