use of htsjdk.variant.vcf.VCFHeaderLine in project gatk by broadinstitute.
the class VcfUtilsUnitTest method createHeaderLines.
private Set<VCFHeaderLine> createHeaderLines() {
Set<VCFHeaderLine> headerLines = new HashSet<>(2);
headerLines.add(new VCFContigHeaderLine("##contig=<ID=1,length=249250621,assembly=b37>", vcfHeaderVersion, "", 0));
headerLines.add(new VCFContigHeaderLine("##contig=<ID=2,length=249250622,assembly=b37>", vcfHeaderVersion, "", 0));
return headerLines;
}
use of htsjdk.variant.vcf.VCFHeaderLine 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"));
}
use of htsjdk.variant.vcf.VCFHeaderLine in project gatk by broadinstitute.
the class Concordance method onTraversalStart.
@Override
public void onTraversalStart() {
Set<VCFHeaderLine> defaultToolHeaderLines = getDefaultToolVCFHeaderLines();
for (final ConcordanceState state : ConcordanceState.values()) {
snpCounts.put(state, new MutableLong(0));
indelCounts.put(state, new MutableLong(0));
}
if (truePositivesAndFalseNegativesVcf != null) {
truePositivesAndFalseNegativesVcfWriter = createVCFWriter(truePositivesAndFalseNegativesVcf);
final VCFHeader truthHeader = getTruthHeader();
truthHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE);
defaultToolHeaderLines.forEach(truthHeader::addMetaDataLine);
truePositivesAndFalseNegativesVcfWriter.writeHeader(truthHeader);
}
if (truePositivesAndFalsePositivesVcf != null) {
truePositivesAndFalsePositivesVcfWriter = createVCFWriter(truePositivesAndFalsePositivesVcf);
final VCFHeader evalHeader = getEvalHeader();
defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine);
evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE);
truePositivesAndFalsePositivesVcfWriter.writeHeader(evalHeader);
}
if (filteredTrueNegativesAndFalseNegativesVcf != null) {
filteredTrueNegativesAndFalseNegativesVcfWriter = createVCFWriter(filteredTrueNegativesAndFalseNegativesVcf);
final VCFHeader evalHeader = getEvalHeader();
evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE);
defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine);
filteredTrueNegativesAndFalseNegativesVcfWriter.writeHeader(evalHeader);
}
}
use of htsjdk.variant.vcf.VCFHeaderLine in project gatk by broadinstitute.
the class AnnotateVcfWithExpectedAlleleFraction method onTraversalStart.
@Override
public void onTraversalStart() {
final VCFHeader inputHeader = getHeaderForVariants();
final Set<VCFHeaderLine> headerLines = new HashSet<>(inputHeader.getMetaDataInSortedOrder());
headerLines.add(new VCFInfoHeaderLine(EXPECTED_ALLELE_FRACTION_NAME, 1, VCFHeaderLineType.Float, "expected allele fraction in pooled bam"));
final VCFHeader vcfHeader = new VCFHeader(headerLines, inputHeader.getGenotypeSamples());
headerLines.addAll(getDefaultToolVCFHeaderLines());
vcfWriter = createVCFWriter(outputVcf);
vcfWriter.writeHeader(vcfHeader);
final List<MixingFraction> mixingFractionsList = MixingFraction.readMixingFractions(inputMixingFractions);
final Map<String, Double> mixingfractionsMap = mixingFractionsList.stream().collect(Collectors.toMap(MixingFraction::getSample, MixingFraction::getMixingFraction));
mixingFractionsInSampleOrder = inputHeader.getSampleNamesInOrder().stream().mapToDouble(mixingfractionsMap::get).toArray();
}
Aggregations