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:
parent
82e40340c0
commit
a5aaa14aaa
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue