Search in sources :

Example 6 with VCFSimpleHeaderLine

use of htsjdk.variant.vcf.VCFSimpleHeaderLine in project gatk-protected by broadinstitute.

the class ReferenceConfidenceModelUnitTest method testGetHeaderLines.

@Test
public void testGetHeaderLines() throws Exception {
    final Set<VCFHeaderLine> vcfHeaderLines = model.getVCFHeaderLines();
    Assert.assertEquals(vcfHeaderLines.size(), 1);
    Assert.assertEquals(vcfHeaderLines.iterator().next(), new VCFSimpleHeaderLine(GATKVCFConstants.SYMBOLIC_ALLELE_DEFINITION_HEADER_TAG, GATKVCFConstants.NON_REF_SYMBOLIC_ALLELE_NAME, "Represents any possible alternative allele at this location"));
}
Also used : VCFHeaderLine(htsjdk.variant.vcf.VCFHeaderLine) VCFSimpleHeaderLine(htsjdk.variant.vcf.VCFSimpleHeaderLine) BaseTest(org.broadinstitute.hellbender.utils.test.BaseTest) Test(org.testng.annotations.Test)

Example 7 with VCFSimpleHeaderLine

use of htsjdk.variant.vcf.VCFSimpleHeaderLine in project gatk by broadinstitute.

the class GATKTool method getDefaultToolVCFHeaderLines.

/**
     * @return If addOutputVCFCommandLine is true, a set of VCF header lines containing the tool name, version,
     * date and command line, otherwise an empty set.
     */
protected Set<VCFHeaderLine> getDefaultToolVCFHeaderLines() {
    final Set<VCFHeaderLine> gatkToolHeaderLines = new HashSet<>();
    if (addOutputVCFCommandLine) {
        final Map<String, String> simpleHeaderLineMap = new HashMap<>(4);
        simpleHeaderLineMap.put("ID", this.getClass().getSimpleName());
        simpleHeaderLineMap.put("Version", getVersion());
        simpleHeaderLineMap.put("Date", Utils.getDateTimeForDisplay((ZonedDateTime.now())));
        simpleHeaderLineMap.put("CommandLine", getCommandLine());
        gatkToolHeaderLines.add(new VCFHeaderLine("source", this.getClass().getSimpleName()));
        gatkToolHeaderLines.add(new VCFSimpleHeaderLine(String.format("%sCommandLine", getToolkitName()), simpleHeaderLineMap));
    }
    return gatkToolHeaderLines;
}
Also used : VCFHeaderLine(htsjdk.variant.vcf.VCFHeaderLine) HashMap(java.util.HashMap) VCFSimpleHeaderLine(htsjdk.variant.vcf.VCFSimpleHeaderLine) HashSet(java.util.HashSet)

Aggregations

VCFSimpleHeaderLine (htsjdk.variant.vcf.VCFSimpleHeaderLine)7 VCFHeaderLine (htsjdk.variant.vcf.VCFHeaderLine)5 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)2 Test (org.testng.annotations.Test)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1