Fix for GSA-601: Indels dropped during liftover. This was a true bug that was an effect of the switch over to the non-null representation of alleles in the VariantContext. Unfortunately, this tool didn't have integration tests - but it does now.

This commit is contained in:
Eric Banks 2012-10-07 01:19:52 -04:00
parent 82e40340c0
commit a5aaa14aaa
2 changed files with 10 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class FilterLiftedVariants extends RodWalker<Integer, Integer> {
boolean failed = false;
byte[] recordRef = vc.getReference().getBases();
for (int i = 0; i < recordRef.length && i < MAX_VARIANT_SIZE; i++) {
if ( recordRef[i] != ref[i + (vc.isPointEvent() ? 0 : 1)] ) {
if ( recordRef[i] != ref[i] ) {
failed = true;
break;
}

View File

@ -61,4 +61,13 @@ public class LiftoverVariantsIntegrationTest extends WalkerTest {
Arrays.asList("7e7bad0e1890753a01303c09a38ceb8d"));
executeTest("test hg18 to hg19, unsorted", spec);
}
@Test
public void testLiftoverFilteringOfIndels() {
WalkerTestSpec spec = new WalkerTestSpec(
"-T FilterLiftedVariants -o %s -R " + b37KGReference + " --variant:vcf " + privateTestDir + "liftover_indel_test.vcf",
1,
Arrays.asList("b9280bb4f310c72284251bc6f2bf2bb2"));
executeTest("test liftover filtering of indels", spec);
}
}