Commit 986ffe92 authored by Sander Bollen's avatar Sander Bollen
Browse files

testing different output modes

parent 4fbe0d0d
......@@ -147,10 +147,12 @@ object VcfFilter extends ToolCommand {
build)
writer.writeHeader(header)
val invertedWriter = commandArgs.invertedOutputVcf.collect { case x => new VariantContextWriterBuilder().
setOutputFile(x).
setReferenceDictionary(header.getSequenceDictionary).
build }
val invertedWriter = commandArgs.invertedOutputVcf.collect {
case x => new VariantContextWriterBuilder().
setOutputFile(x).
setReferenceDictionary(header.getSequenceDictionary).
build
}
invertedWriter.foreach(_.writeHeader(header))
var counterTotal = 0
......
......@@ -70,7 +70,6 @@ object VcfWithVcf extends ToolCommand {
header.addMetaDataLine(newHeaderLine)
}
var idx = 0
for (record <- reader) {
......
......@@ -90,10 +90,9 @@ object VepNormalizer extends ToolCommand {
logger.debug("Parsing header")
val new_infos = parseCsq(header)
header.setWriteCommandLine(true)
val writer = new AsyncVariantContextWriter(new VariantContextWriterBuilder().
setOutputFile(output).setReferenceDictionary(header.getSequenceDictionary)
build())
build ())
for (info <- new_infos) {
val tmpheaderline = new VCFInfoHeaderLine(info, VCFHeaderLineCount.UNBOUNDED, VCFHeaderLineType.String, "A VEP annotation")
......
......@@ -15,6 +15,7 @@
*/
package nl.lumc.sasc.biopet.tools
import scala.util.Random
import org.scalatest.testng.TestNGSuite
import org.scalatest.mock.MockitoSugar
import org.scalatest.Matchers
......@@ -41,6 +42,46 @@ class VepNormalizerTest extends TestNGSuite with MockitoSugar with Matchers {
val vepped = new File(resourcePath("/VEP_oneline.vcf"))
val unvepped = new File(resourcePath("/unvepped.vcf"))
val vepped_path = resourcePath("/VEP_oneline.vcf")
val rand = new Random()
@Test def testGzOutputExplode(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".vcf.gz"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "explode")
main(arguments)
}
@Test def testVcfOutputExplode(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".vcf"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "explode")
main(arguments)
}
@Test def testBcfOutputExplode(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".bcf"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "explode")
main(arguments)
}
@Test def testGzOutputStandard(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".vcf.gz"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "standard")
main(arguments)
}
@Test def testVcfOutputStandard(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".vcf"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "standard")
main(arguments)
}
@Test def testBcfOutputStandard(): Unit = {
val tmp_path = "/tmp/VepNorm_" + rand.nextString(10) + ".bcf"
val arguments: Array[String] = Array("-I", vepped_path, "-O", tmp_path, "-m", "standard")
main(arguments)
}
@Test def testVEPHeaderLength() = {
val reader = new VCFFileReader(vepped, false)
val header = reader.getFileHeader
......
Markdown is supported
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