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