use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class GenomicsDBImportIntegrationTest method testRequireOneOfVCFOrSampleNameFile.
@Test(expectedExceptions = CommandLineException.MissingArgument.class)
public void testRequireOneOfVCFOrSampleNameFile() {
final ArgumentsBuilder args = new ArgumentsBuilder().addArgument(GenomicsDBImport.WORKSPACE_ARG_NAME, createTempDir("workspace").getAbsolutePath()).addArgument("L", "1:1-10");
runCommandLine(args);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class GenomicsDBImportIntegrationTest method writeToGenomicsDB.
private void writeToGenomicsDB(final List<String> vcfInputs, final SimpleInterval interval, final String workspace, final int batchSize, final Boolean useBufferSize, final int bufferSizePerSample) {
final ArgumentsBuilder args = new ArgumentsBuilder();
args.addArgument("genomicsDBWorkspace", workspace);
args.addArgument("L", IntervalUtils.locatableToString(interval));
vcfInputs.forEach(vcf -> args.addArgument("V", vcf));
args.addArgument("batchSize", String.valueOf(batchSize));
if (useBufferSize)
args.addArgument("genomicsDBVCFBufferSize", String.valueOf(bufferSizePerSample));
runCommandLine(args);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class ExampleReadWalkerWithReferenceSparkIntegrationTest method testExampleIntervalWalker.
@Test
public void testExampleIntervalWalker() throws IOException {
final File out = File.createTempFile("out", ".txt");
out.delete();
out.deleteOnExit();
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(TEST_DATA_DIRECTORY + "reads_data_source_test1.bam");
args.add("--output");
args.add(out.getAbsolutePath());
args.add("--reference");
args.add(hg19MiniReference);
this.runCommandLine(args.getArgsArray());
File expected = new File(TEST_OUTPUT_DIRECTORY, "expected_ExampleReadWalkerWithReferenceIntegrationTest_output.txt");
IntegrationTestSpec.assertEqualTextFiles(new File(out, "part-00000"), expected);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CompareBaseQualitiesIntegrationTest method singleReadDiffTest.
@Test(dataProvider = "CompareBasesProvider")
public void singleReadDiffTest(File firstBam, File secondBam, File referenceFile, File outFile, List<Integer> staticQuantizationQuals, String diffFile) throws Exception {
final String resourceDir = getTestDataDir() + "/validation/";
ArgumentsBuilder args = new ArgumentsBuilder();
args.add(firstBam.getCanonicalPath());
args.add(secondBam.getCanonicalPath());
args.add("--" + "O");
args.add(outFile.getCanonicalPath());
if (null != referenceFile) {
args.add("-R");
args.add(referenceFile.getAbsolutePath());
}
if (staticQuantizationQuals != null && !staticQuantizationQuals.isEmpty()) {
for (int sq : staticQuantizationQuals) {
args.add("-SQQ");
args.add(sq);
}
}
final Object result = this.runCommandLine(args);
if (Objects.equals(firstBam, secondBam)) {
Assert.assertEquals(result, 0);
} else {
Assert.assertNotEquals(result, 0);
}
final File expected = new File(resourceDir, diffFile);
IntegrationTestSpec.assertEqualTextFiles(outFile, expected);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class GenotypeGVCFsIntegrationTest method testIntervalsAndOnlyOutputCallsStartingInIntervalsAreMutuallyRequired.
@Test
public void testIntervalsAndOnlyOutputCallsStartingInIntervalsAreMutuallyRequired() {
ArgumentsBuilder args = new ArgumentsBuilder().addVCF(getTestFile("leadingDeletion.g.vcf")).addReference(new File(b37_reference_20_21)).addOutput(createTempFile("tmp", ".vcf")).addBooleanArgument(GenotypeGVCFs.ONLY_OUTPUT_CALLS_STARTING_IN_INTERVALS_FULL_NAME, true);
Assert.assertThrows(CommandLineException.MissingArgument.class, () -> runCommandLine(args));
args.addArgument("L", "20:69512-69513");
runCommandLine(args);
}
Aggregations