Skip to content
Snippets Groups Projects
Commit 23c3057d authored by Sander Bollen's avatar Sander Bollen
Browse files

give reference dictionary to writer

parent c7dddadd
No related branches found
No related tags found
No related merge requests found
......@@ -141,10 +141,16 @@ object VcfFilter extends ToolCommand {
val reader = new VCFFileReader(commandArgs.inputVcf, false)
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)
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))
var counterTotal = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment