use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class MeanQualityByCycleSparkIntegrationTest method test1.
@Test(groups = "spark")
public void test1() throws IOException {
//Note we compare to non-spark outputs
final File unsortedBam = new File(TEST_DATA_DIR, "first5000a.bam");
final File expectedFile = new File(TEST_DATA_DIR, "meanqualbycycle.txt");
final File outfile = BaseTest.createTempFile("testMeanQualityByCycle", ".metrics");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(unsortedBam.getCanonicalPath());
args.add("--" + StandardArgumentDefinitions.OUTPUT_LONG_NAME);
args.add(outfile.getCanonicalPath());
this.runCommandLine(args.getArgsArray());
IntegrationTestSpec.assertEqualTextFiles(outfile, expectedFile, "#");
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class MeanQualityByCycleSparkIntegrationTest method test_PF_READS_ONLY_false.
@Test(groups = "spark")
public void test_PF_READS_ONLY_false() throws IOException {
//Note we compare to non-spark outputs
final File unsortedBam = new File(TEST_DATA_DIR, "example_pfFail_reads.bam");
final File expectedFile = new File(TEST_DATA_DIR, "pfFailBam.pf.txt");
final File outfile = BaseTest.createTempFile("pfFailBam.pf.", ".metrics");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(unsortedBam.getCanonicalPath());
args.add("--" + StandardArgumentDefinitions.OUTPUT_LONG_NAME);
args.add(outfile.getCanonicalPath());
args.add("--" + "pfReadsOnly");
args.add("false");
this.runCommandLine(args.getArgsArray());
IntegrationTestSpec.assertEqualTextFiles(outfile, expectedFile, "#");
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class PrintReadsSparkIntegrationTest method testNonExistentReference.
@Test(expectedExceptions = UserException.MissingReference.class)
public void testNonExistentReference() throws Exception {
final File inCram = new File(TEST_DATA_DIR, "print_reads.sorted.cram");
final File outCram = BaseTest.createTempFile("print_reads_bad_reference", ".cram");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(inCram.getCanonicalPath());
args.add("--" + StandardArgumentDefinitions.OUTPUT_LONG_NAME);
args.add(outCram.getCanonicalPath());
args.add("-R");
args.add(BaseTest.getSafeNonExistentFile("Nonexistent.fasta").getCanonicalPath());
runCommandLine(args.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class AbstractMarkDuplicatesCommandLineProgramTest method testMDOrderImpl.
protected void testMDOrderImpl(final File input, final File expectedOutput, final String extraArgs) throws Exception {
final File metricsFile = createTempFile("markdups_metrics", ".txt");
final File outputFile = createTempFile("markdups", ".bam");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("-" + StandardArgumentDefinitions.INPUT_SHORT_NAME);
args.add(input.getPath());
args.add("-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME);
args.add(outputFile.getAbsolutePath());
args.add("--METRICS_FILE");
args.add(metricsFile.getAbsolutePath());
args.add(extraArgs);
final CommandLineProgram markDuplicates = getCommandLineProgramInstance();
markDuplicates.instanceMain(args.getArgsArray());
SamAssertionUtils.assertEqualBamFiles(outputFile, expectedOutput, false, ValidationStringency.SILENT);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class ExampleVariantWalkerSparkIntegrationTest method testExampleVariantWalker.
@Test
public void testExampleVariantWalker() throws IOException {
final File out = File.createTempFile("out", ".txt");
out.delete();
out.deleteOnExit();
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("-L 1:100-200");
// note that joining with reads is not currently supported
args.add("-V");
args.add(TEST_DATA_DIRECTORY + "example_variants_withSequenceDict.vcf");
args.add("-auxiliaryVariants");
args.add(TEST_DATA_DIRECTORY + "feature_data_source_test.vcf");
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_ExampleVariantWalkerSparkIntegrationTest_output.txt");
IntegrationTestSpec.assertEqualTextFiles(new File(out, "part-00000"), expected);
}
Aggregations