Update the allele remapping code to handle the new spanning deletion allele.
Now that Ron updated the GATK so that we use star to represent spanning deletions, we need to catch those cases in the code that remaps alleles. Otherwise, we try to pad the stars and that's just bad. Added test from actual failing data.
This commit is contained in:
parent
719bb15340
commit
f994220617
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue