use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class GenotypeGVCFsIntegrationTest method runGenotypeGVCFSAndAssertSomething.
private void runGenotypeGVCFSAndAssertSomething(String input, File expected, List<String> additionalArguments, BiConsumer<VariantContext, VariantContext> assertion, String reference) throws IOException {
final File output = createTempFile("genotypegvcf", ".vcf");
final ArgumentsBuilder args = new ArgumentsBuilder();
args.addReference(new File(reference)).addArgument("V", input).addOutput(output);
additionalArguments.forEach(args::add);
Utils.resetRandomGenerator();
runCommandLine(args);
final List<VariantContext> expectedVC = getVariantContexts(expected);
final List<VariantContext> actualVC = getVariantContexts(output);
assertForEachElementInLists(actualVC, expectedVC, assertion);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CompareDuplicatesSparkIntegrationTest method differentBamTest.
@Test(dataProvider = "CompareDifferentDuplicatesProvider", expectedExceptions = UserException.class, groups = "spark")
public void differentBamTest(File firstBam, File secondBam) throws Exception {
// These files are the same and should produce no diffs.
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(firstBam.getCanonicalPath());
args.add("--" + "I2");
args.add(secondBam.getCanonicalPath());
args.add("--" + "throwOnDiff");
args.add("true");
this.runCommandLine(args.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CompareDuplicatesSparkIntegrationTest method identicalBamTest.
@Test(dataProvider = "CompareIdenticalDuplicatesProvider", groups = "spark")
public void identicalBamTest(File firstBam, File secondBam) throws Exception {
// These files are the same and should produce no diffs.
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(firstBam.getCanonicalPath());
args.add("--" + "I2");
args.add(secondBam.getCanonicalPath());
args.add("--" + "throwOnDiff");
args.add("true");
this.runCommandLine(args.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class VariantWalkerIntegrationTest method testRequiresSequenceDictionaryForInterval.
@Test(expectedExceptions = UserException.class)
public void testRequiresSequenceDictionaryForInterval() throws Exception {
String fileIn = "count_variants.vcf";
String moreArgs = "-L 1";
final File ORIG_FILE = new File(getTestDataDir(), fileIn);
ArgumentsBuilder ab = new ArgumentsBuilder();
ab.add("--variant " + ORIG_FILE.getAbsolutePath());
ab.add(moreArgs);
this.runCommandLine(ab.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class VariantWalkerIntegrationTest method testMissingContigForInterval.
@Test(expectedExceptions = UserException.MalformedGenomeLoc.class)
public void testMissingContigForInterval() throws Exception {
String fileIn = "count_variants_withSequenceDict.vcf";
String moreArgs = "-L 25";
final File ORIG_FILE = new File(getTestDataDir(), fileIn);
ArgumentsBuilder ab = new ArgumentsBuilder();
ab.add("--variant " + ORIG_FILE.getAbsolutePath());
ab.add(moreArgs);
this.runCommandLine(ab.getArgsArray());
}
Aggregations