use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CountReadsIntegrationTest method testCountReads.
@Test(dataProvider = "filenames")
public void testCountReads(final String fileIn, final String referenceName) throws Exception {
final File ORIG_BAM = new File(getTestDataDir(), fileIn);
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(ORIG_BAM.getAbsolutePath());
if (null != referenceName) {
final File REF = new File(getTestDataDir(), referenceName);
args.add("-R");
args.add(REF.getAbsolutePath());
}
final Object res = this.runCommandLine(args.getArgsArray());
Assert.assertEquals(res, 8l);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CountReadsIntegrationTest method countReads.
private void countReads(final String interval_args, final String fileName, final String referenceName, final long count) {
final File ORIG_BAM = new File(getTestDataDir(), fileName);
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--input");
args.add(ORIG_BAM.getAbsolutePath());
if (null != referenceName) {
final File REF = new File(getTestDataDir(), referenceName);
args.add("-R");
args.add(REF.getAbsolutePath());
}
args.add(interval_args);
final Object res = this.runCommandLine(args.getArgsArray());
Assert.assertEquals(res, count);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class CountReadsIntegrationTest method testBogusArgs.
@Test(expectedExceptions = CommandLineException.class)
public void testBogusArgs() throws Exception {
//making sure that this blows up in a very specific way (UserException.CommandLineException) if we give bogus arguments
final ArgumentsBuilder args = new ArgumentsBuilder();
args.add("--fred");
this.runCommandLine(args.getArgsArray());
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class ApplyBQSRSparkIntegrationTest method testPRNoFailWithHighMaxCycle.
@Test(groups = "spark")
public void testPRNoFailWithHighMaxCycle() throws IOException {
String args = " -I " + hiSeqBam + " --bqsr_recal_file " + resourceDir + "HiSeq.1mb.1RG.highMaxCycle.table.gz" + "" + " -O " + createTempFile("ignore", ".me");
ArgumentsBuilder ab = new ArgumentsBuilder().add(args);
IntegrationTestSpec spec = new IntegrationTestSpec(ab.getString(), Arrays.<String>asList());
//this just checks that the tool does not blow up
spec.executeTest("testPRNoFailWithHighMaxCycle", this);
}
use of org.broadinstitute.hellbender.utils.test.ArgumentsBuilder in project gatk by broadinstitute.
the class BaseRecalibratorSparkIntegrationTest method testBlowUpOnBroadcastIncompatibleReference.
@Test(groups = "spark")
public void testBlowUpOnBroadcastIncompatibleReference() throws IOException {
//this should blow up because broadcast requires a 2bit reference
final String hiSeqBam_chr20 = getResourceDir() + WGS_B37_CH20_1M_1M1K_BAM;
final String dbSNPb37_chr20 = getResourceDir() + DBSNP_138_B37_CH20_1M_1M1K_VCF;
BQSRTest params = new BQSRTest(b37_reference_20_21, hiSeqBam_chr20, dbSNPb37_chr20, "-indelBQSR -enableBAQ " + "--joinStrategy BROADCAST", getResourceDir() + BQSRTestData.EXPECTED_WGS_B37_CH20_1M_1M1K_RECAL);
ArgumentsBuilder ab = new ArgumentsBuilder().add(params.getCommandLineNoApiKey());
IntegrationTestSpec spec = new IntegrationTestSpec(ab.getString(), 1, UserException.Require2BitReferenceForBroadcast.class);
spec.executeTest("testBQSR-" + params.args, this);
}
Aggregations