Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
ldgauthier committed May 23, 2018
1 parent f9a0cc4 commit 3547c12
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,25 @@ public void testEntireVariantContext(File input, File expected, List<String> ext
assertVariantContextsMatch(input, expected, extraArgs, reference);
}

@Test
private void assertVariantContextsMatch(File input, File expected, List<String> extraArgs, String reference) throws IOException {
try {
final VCFHeader header = VCFHeaderReader.readHeaderFrom(new SeekablePathStream( IOUtils.getPath(expected.getAbsolutePath())));
runGenotypeGVCFSAndAssertSomething(input, expected, extraArgs, (a, e) -> VariantContextTestUtils.assertVariantContextsAreEqualAlleleOrderIndependent(a, e, ATTRIBUTES_TO_IGNORE ,header), reference);
final VCFHeader header = VCFHeaderReader.readHeaderFrom(new SeekablePathStream(IOUtils.getPath(expected.getAbsolutePath())));
runGenotypeGVCFSAndAssertSomething(input, expected, extraArgs, (a, e) -> VariantContextTestUtils.assertVariantContextsAreEqualAlleleOrderIndependent(a, e, ATTRIBUTES_TO_IGNORE, header), reference);
} catch (java.io.IOException e) {
throw new AssertionError("There was a problem reading your expected input file");
}
}

private void assertGenotypesMatch(File input, File expected, List<String> additionalArguments, String reference) throws IOException {
runGenotypeGVCFSAndAssertSomething(input, expected, additionalArguments, VariantContextTestUtils::assertVariantContextsHaveSameGenotypes,
reference);
}

@Test(dataProvider = "gvcfWithPPs")
public void assertPPsAreStripped(File input, File expected, List<String> extraArgs, String reference) throws IOException {
runGenotypeGVCFSAndAssertSomething(input, expected, extraArgs, VariantContextTestUtils::assertGenotypeAttributeWasRemoved, reference);
}

private void assertGenotypesMatch(File input, File expected, List<String> additionalArguments, String reference) throws IOException {
runGenotypeGVCFSAndAssertSomething(input, expected, additionalArguments, VariantContextTestUtils::assertVariantContextsHaveSameGenotypes,
reference);
}

private void runGenotypeGVCFSAndAssertSomething(File input, File expected, List<String> additionalArguments, BiConsumer<VariantContext, VariantContext> assertion, String reference) throws IOException {
runGenotypeGVCFSAndAssertSomething(input.getAbsolutePath(), expected, additionalArguments, assertion, reference
Expand Down

0 comments on commit 3547c12

Please sign in to comment.