use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CreateHadoopBamSplittingIndexIntegrationTest method testNegativeGranularity.
@Test(expectedExceptions = CommandLineException.BadArgumentValue.class)
public void testNegativeGranularity() {
final ArgumentsBuilder args = getInputAndOutputArgs(SORTED_BAM, getTempIndexFile()).add("--" + CreateHadoopBamSplittingIndex.SPLITTING_INDEX_GRANULARITY_LONG_NAME).add(-10);
this.runCommandLine(args);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class PrintReadsSparkIntegrationTest method testSequenceDictionaryValidation.
@Test(expectedExceptions = UserException.IncompatibleSequenceDictionaries.class, groups = "spark")
public void testSequenceDictionaryValidation() throws Exception {
final File inCram = new File(getTestDataDir(), "print_reads.sorted.cram");
final File inRef = new File(getTestDataDir(), "print_reads.chr1only.fasta");
final File outBam = BaseTest.createTempFile("print_reads_spark", ".bam");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(inCram.getCanonicalPath());
args.add("-R");
args.add(inRef.getCanonicalPath());
args.add("--" + StandardArgumentDefinitions.OUTPUT_LONG_NAME);
args.add(outBam.getCanonicalPath());
this.runCommandLine(args.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class PrintReadsSparkIntegrationTest method testCoordinateSortedInRegion.
@Test(groups = "spark")
public void testCoordinateSortedInRegion() throws Exception {
final File inBam = new File(getTestDataDir(), "print_reads.sorted.bam");
final File expectedBam = new File(getTestDataDir(), "print_reads.sorted.chr1_1.bam");
final File outBam = BaseTest.createTempFile("print_reads_spark", ".bam");
ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--" + StandardArgumentDefinitions.INPUT_LONG_NAME);
args.add(inBam.getCanonicalPath());
args.add("--" + StandardArgumentDefinitions.OUTPUT_LONG_NAME);
args.add(outBam.getCanonicalPath());
args.add("-L chr7:1-100 -XL chr7:2-100");
this.runCommandLine(args.getArgsArray());
SamAssertionUtils.assertSamsEqual(outBam, expectedBam);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class PileupSparkIntegrationTest method testSimplePileup.
@Test(dataProvider = "shuffle")
public void testSimplePileup(boolean useShuffle) throws Exception {
final File out = createTempFile();
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(NA12878_20_21_WGS_bam);
args.add("--output");
args.add(out.getAbsolutePath());
args.add("--reference");
args.add(b37_reference_20_21);
args.add("-L 20:9999900-10000000");
if (useShuffle) {
args.add("--shuffle");
}
this.runCommandLine(args.getArgsArray());
File expected = new File(TEST_DATA_DIR, "expectedSimplePileup.txt");
IntegrationTestSpec.assertEqualTextFiles(new File(out, "part-00000"), expected);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class PileupSparkIntegrationTest method testInsertLengthPileup.
@Test(dataProvider = "shuffle")
public void testInsertLengthPileup(boolean useShuffle) throws Exception {
final File out = createTempFile();
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(NA12878_20_21_WGS_bam);
args.add("--output");
args.add(out.getAbsolutePath());
args.add("--reference");
args.add(b37_reference_20_21);
args.add("-L 20:10000092-10000112");
args.add("-outputInsertLength");
if (useShuffle) {
args.add("--shuffle");
}
this.runCommandLine(args.getArgsArray());
File expected = new File(TEST_DATA_DIR, "expectedInsertLengthPileup.txt");
IntegrationTestSpec.assertEqualTextFiles(new File(out, "part-00000"), expected);
}
Aggregations