Commit 23c3057d authored by Sander Bollen's avatar Sander Bollen
Browse files

give reference dictionary to writer

parent c7dddadd
...@@ -141,10 +141,16 @@ object VcfFilter extends ToolCommand { ...@@ -141,10 +141,16 @@ object VcfFilter extends ToolCommand {
val reader = new VCFFileReader(commandArgs.inputVcf, false) val reader = new VCFFileReader(commandArgs.inputVcf, false)
val header = reader.getFileHeader val header = reader.getFileHeader
val writer = new AsyncVariantContextWriter(new VariantContextWriterBuilder().setOutputFile(commandArgs.outputVcf).build) val writer = new AsyncVariantContextWriter(new VariantContextWriterBuilder().
setOutputFile(commandArgs.outputVcf).
setReferenceDictionary(header.getSequenceDictionary).
build)
writer.writeHeader(header) writer.writeHeader(header)
val invertedWriter = commandArgs.invertedOutputVcf.collect { case x => new VariantContextWriterBuilder().setOutputFile(x).build } val invertedWriter = commandArgs.invertedOutputVcf.collect { case x => new VariantContextWriterBuilder().
setOutputFile(x).
setReferenceDictionary(header.getSequenceDictionary).
build }
invertedWriter.foreach(_.writeHeader(header)) invertedWriter.foreach(_.writeHeader(header))
var counterTotal = 0 var counterTotal = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment