use of org.broadinstitute.hellbender.utils.variant.writers.GVCFWriter in project gatk by broadinstitute.
the class HaplotypeCallerEngine method makeVCFWriter.
/**
* Create a VCF or GVCF writer as appropriate, given our arguments
*
* @param outputVCF location to which the vcf should be written
* @param readsDictionary sequence dictionary for the reads
* @return a VCF or GVCF writer as appropriate, ready to use
*/
public VariantContextWriter makeVCFWriter(final String outputVCF, final SAMSequenceDictionary readsDictionary) {
Utils.nonNull(outputVCF);
Utils.nonNull(readsDictionary);
VariantContextWriter writer = GATKVariantContextUtils.createVCFWriter(new File(outputVCF), readsDictionary, false);
if (hcArgs.emitReferenceConfidence == ReferenceConfidenceMode.GVCF) {
try {
writer = new GVCFWriter(writer, hcArgs.GVCFGQBands, hcArgs.genotypeArgs.samplePloidy);
} catch (IllegalArgumentException e) {
throw new CommandLineException.BadArgumentValue("GQBands", "are malformed: " + e.getMessage());
}
}
return writer;
}
use of org.broadinstitute.hellbender.utils.variant.writers.GVCFWriter in project gatk-protected by broadinstitute.
the class HaplotypeCallerEngine method makeVCFWriter.
/**
* Create a VCF or GVCF writer as appropriate, given our arguments
*
* @param outputVCF location to which the vcf should be written
* @param readsDictionary sequence dictionary for the reads
* @return a VCF or GVCF writer as appropriate, ready to use
*/
public VariantContextWriter makeVCFWriter(final String outputVCF, final SAMSequenceDictionary readsDictionary) {
Utils.nonNull(outputVCF);
Utils.nonNull(readsDictionary);
VariantContextWriter writer = GATKVariantContextUtils.createVCFWriter(new File(outputVCF), readsDictionary, false);
if (hcArgs.emitReferenceConfidence == ReferenceConfidenceMode.GVCF) {
try {
writer = new GVCFWriter(writer, hcArgs.GVCFGQBands, hcArgs.genotypeArgs.samplePloidy);
} catch (IllegalArgumentException e) {
throw new CommandLineException.BadArgumentValue("GQBands", "are malformed: " + e.getMessage());
}
}
return writer;
}
Aggregations