for (final VariantContext.Type type : VariantContext.Type.values()) { if (type.equals(vcType)) continue;
@Override public void initialize() { for (VariantContext.Type t : VariantContext.Type.values()) states.add(t.toString()); }
public void initialize() { // Get list of samples to include in the output Map<String, VCFHeader> vcfRods = GATKVCFUtils.getVCFHeadersFromRods(getToolkit()); TreeSet<String> vcfSamples = new TreeSet<String>(SampleUtils.getSampleList(vcfRods, GATKVariantContextUtils.GenotypeMergeType.REQUIRE_UNIQUE)); Collection<String> samplesFromFile = SampleUtils.getSamplesFromFiles(sampleFiles); Collection<String> samplesFromExpressions = SampleUtils.matchSamplesExpressions(vcfSamples, sampleExpressions); // first, add any requested samples samples.addAll(samplesFromFile); samples.addAll(samplesFromExpressions); samples.addAll(sampleNames); // if none were requested, we want all of them if ( samples.isEmpty() ) { samples.addAll(vcfSamples); } sampleSelector = getSampleSelectorObject(sampleMode, samples); // initialize frequency mode selector frequencyModeSelector = getFrequencyModeSelectorObject(freqMode, getToolkit().getGenomeLocParser()); // if user specified types to include, add these, otherwise, add all possible variant context types to list of vc types to include if (TYPES_TO_INCLUDE.isEmpty()) { for (VariantContext.Type t : VariantContext.Type.values()) selectedTypes.add(t); } else { for (VariantContext.Type t : TYPES_TO_INCLUDE) selectedTypes.add(t); } Set<VCFHeaderLine> headerLines = new HashSet<VCFHeaderLine>(); headerLines.add(new VCFHeaderLine("source", "ValidationSiteSelector")); vcfWriter.writeHeader(new VCFHeader(headerLines)); }
for (VariantContext.Type t : VariantContext.Type.values()) selectedTypes.add(t);