Commit 9e3f92bc authored by Sander Bollen's avatar Sander Bollen
Browse files

Adding check for database and cache. Removing print statements in normalizer test

parent 6bb6b014
......@@ -26,6 +26,7 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
//Boolean vars
var v: Boolean = config("v")
var q: Boolean = config("q")
var offline: Boolean = config("offline")
var no_progress: Boolean = config("no_progress")
var everything: Boolean = config("everything")
var force: Boolean = config("force")
......@@ -124,12 +125,22 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
var db_version: Option[Int] = config("db_version")
var buffer_size: Option[Int] = config("buffer_size")
override def afterGraph: Unit = {
super.afterGraph
if (!cache && !database) {
throw new IllegalArgumentException("Must supply either cache or database")
} else if (cache && dir == null) {
throw new IllegalArgumentException("Must supply dir to cache")
}
}
def cmdLine = required(executable) +
required(vep_script) +
required("-i", input) +
required("-o", output) +
conditional(v, "-v") +
conditional(q, "-q") +
conditional(offline, "--offline") +
conditional(no_progress, "--no_progress") +
conditional(everything, "--everything") +
conditional(force, "--force_overwrite") +
......
......@@ -102,7 +102,7 @@ object VEPNormalizer extends ToolCommand {
val writerBuilder = new VariantContextWriterBuilder()
writerBuilder.
setOutputFile(output).
setOutputFileType(VariantContextWriterBuilder.OutputType.VCF).
setOutputFileType(VariantContextWriterBuilder.OutputType.BLOCK_COMPRESSED_VCF).
setReferenceDictionary(seqDict)
val writer = writerBuilder.build()
writer.writeHeader(header)
......
......@@ -56,7 +56,6 @@ class VEPNormalizerTest extends TestNGSuite with MockitoSugar with Matchers {
}
def check(item: String) = {
println(record.getAttribute(item))
record.getAttribute(item).toString.split(""",""", -1).length should be(11)
}
......
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