use of htsjdk.variant.vcf.VCFIDHeaderLine in project gatk by broadinstitute.
the class GATKToolUnitTest method testGetDefaultToolVCFHeaderLines.
@Test
public void testGetDefaultToolVCFHeaderLines() throws IOException {
final TestGATKToolWithFeatures tool = new TestGATKToolWithFeatures();
final File vcfFile = new File(publicTestDir + "org/broadinstitute/hellbender/engine/feature_data_source_test_with_bigHeader.vcf");
final String[] args = { "--mask", vcfFile.getCanonicalPath(), "--" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "true" };
tool.instanceMain(args);
Set<VCFHeaderLine> stdHeaderLines = tool.getDefaultToolVCFHeaderLines();
VCFHeader hdr = new VCFHeader(stdHeaderLines);
VCFHeaderLine sourceLine = hdr.getOtherHeaderLine("source");
Assert.assertEquals(sourceLine.getValue(), tool.getClass().getSimpleName());
VCFIDHeaderLine commandLine = (VCFIDHeaderLine) hdr.getOtherHeaderLine("GATKCommandLine");
Assert.assertEquals(commandLine.getID(), tool.getClass().getSimpleName());
String commandLineString = commandLine.toString();
assertContains(commandLineString, "CommandLine=");
assertContains(commandLineString, "Version=");
assertContains(commandLineString, "Date=");
}
Aggregations