public void initialize() { // Initialize VCF header if (vcfWriter != null) { Map<String, VCFHeader> header = GATKVCFUtils.getVCFHeadersFromRodPrefix(getToolkit(), alleles.getName()); samples = SampleUtils.getSampleList( header, GATKVariantContextUtils.GenotypeMergeType.REQUIRE_UNIQUE); Set<VCFHeaderLine> headerLines = VCFUtils.smartMergeHeaders(header.values(), true); headerLines.add(new VCFHeaderLine("source", "GenotypeAndValidate")); headerLines.add( GATKVCFHeaderLines.getInfoLine(GATKVCFConstants.GENOTYPE_AND_VALIDATE_STATUS_KEY)); vcfWriter.writeHeader(new VCFHeader(headerLines, samples)); } // Filling in SNP calling arguments for UG UnifiedArgumentCollection uac = new UnifiedArgumentCollection(); uac.outputMode = OutputMode.EMIT_ALL_SITES; uac.alleles = alleles; // TODO -- if we change this tool to actually validate against the called allele, then this if // statement is needed; // TODO -- for now, though, we need to be able to validate the right allele (because we only // test isVariant below) [EB] // if (!bamIsTruth) uac.genotypingOutputMode = GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES; if (mbq >= 0) uac.MIN_BASE_QUALTY_SCORE = mbq; if (deletions >= 0) uac.MAX_DELETION_FRACTION = deletions; else uac.MAX_DELETION_FRACTION = 1.0; if (emitConf >= 0) uac.genotypeArgs.STANDARD_CONFIDENCE_FOR_EMITTING = emitConf; if (callConf >= 0) uac.genotypeArgs.STANDARD_CONFIDENCE_FOR_CALLING = callConf; final GenomeAnalysisEngine toolkit = getToolkit(); uac.GLmodel = GenotypeLikelihoodsCalculationModel.Model.SNP; snpEngine = new UnifiedGenotypingEngine( uac, FixedAFCalculatorProvider.createThreadSafeProvider(toolkit, uac, logger), toolkit); // Adding the INDEL calling arguments for UG UnifiedArgumentCollection uac_indel = uac.clone(); uac_indel.GLmodel = GenotypeLikelihoodsCalculationModel.Model.INDEL; indelEngine = new UnifiedGenotypingEngine( uac_indel, FixedAFCalculatorProvider.createThreadSafeProvider(toolkit, uac, logger), toolkit); // make sure we have callConf set to the threshold set by the UAC so we can use it later. callConf = uac.genotypeArgs.STANDARD_CONFIDENCE_FOR_CALLING; }