use of org.broadinstitute.barclay.argparser.CommandLineParser in project gatk by broadinstitute.
the class ReadInputArgumentCollectionTest method testOptionalIsOptional.
@Test
public void testOptionalIsOptional() {
Object req = new Object() {
@ArgumentCollection
private ReadInputArgumentCollection ric = new OptionalReadInputArgumentCollection();
};
CommandLineParser clp = new CommandLineArgumentParser(req);
String[] args = {};
clp.parseArguments(System.out, args);
}
use of org.broadinstitute.barclay.argparser.CommandLineParser in project gatk by broadinstitute.
the class ReferenceInputArgumentCollectionTest method testOptionalIsOptional.
@Test
public void testOptionalIsOptional() {
String[] args = {};
WithOptionalReferenceCollection optional = new WithOptionalReferenceCollection();
CommandLineParser clp = new CommandLineArgumentParser(optional);
clp.parseArguments(System.out, args);
}
use of org.broadinstitute.barclay.argparser.CommandLineParser in project gatk by broadinstitute.
the class FeatureInputArgumentCollectionTest method testRequiredIsRequired.
@Test(expectedExceptions = CommandLineException.class)
public void testRequiredIsRequired() {
Object req = new Object() {
@ArgumentCollection
private RequiredFeatureInputArgumentCollection ric = new RequiredFeatureInputArgumentCollection();
};
CommandLineParser clp = new CommandLineArgumentParser(req);
String[] args = {};
clp.parseArguments(System.out, args);
}
use of org.broadinstitute.barclay.argparser.CommandLineParser in project gatk by broadinstitute.
the class IntervalArgumentCollectionTest method testOptionalIsOptional.
@Test
public void testOptionalIsOptional() {
WithOptionalIntervals opt = new WithOptionalIntervals();
CommandLineParser clp = new CommandLineArgumentParser(opt);
String[] args = {};
clp.parseArguments(System.out, args);
}
use of org.broadinstitute.barclay.argparser.CommandLineParser in project gatk by broadinstitute.
the class GATKToolUnitTest method testBestSequenceDictionary_fromReads.
@Test
public void testBestSequenceDictionary_fromReads() throws Exception {
final GATKTool tool = new TestGATKToolWithReads();
final CommandLineParser clp = new CommandLineArgumentParser(tool);
final File bamFile = new File(publicTestDir + "org/broadinstitute/hellbender/engine/reads_data_source_test1.bam");
final String[] args = { "-I", bamFile.getCanonicalPath() };
clp.parseArguments(System.out, args);
tool.onStartup();
//read the dict back in and compare to bam dict
final SAMSequenceDictionary toolDict = tool.getBestAvailableSequenceDictionary();
try (final SamReader open = SamReaderFactory.makeDefault().open(bamFile)) {
final SAMSequenceDictionary bamDict = open.getFileHeader().getSequenceDictionary();
toolDict.assertSameDictionary(bamDict);
bamDict.assertSameDictionary(toolDict);
Assert.assertEquals(toolDict, bamDict);
}
}
Aggregations