Commit 1c158133 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Refactor output dir

parent fdf13694
...@@ -37,10 +37,8 @@ trait BiopetQScript extends Configurable with GatkLogging { ...@@ -37,10 +37,8 @@ trait BiopetQScript extends Configurable with GatkLogging {
val configValues: List[String] = Nil val configValues: List[String] = Nil
var outputDir: File = { var outputDir: File = {
Config.getValueFromMap(globalConfig.map, ConfigValueIndex(this.configName, configPath, "output_dir")) match { if (config.contains("output_dir", path = Nil)) config("output_dir", path = Nil).asFile
case Some(value) => new File(value.asString).getAbsoluteFile else new File(".")
case _ => new File(".")
}
} }
@Argument(doc = "Disable all scatters", shortName = "DSC", required = false) @Argument(doc = "Disable all scatters", shortName = "DSC", required = false)
...@@ -64,11 +62,8 @@ trait BiopetQScript extends Configurable with GatkLogging { ...@@ -64,11 +62,8 @@ trait BiopetQScript extends Configurable with GatkLogging {
* Script from queue itself, final to force some checks for each pipeline and write report * Script from queue itself, final to force some checks for each pipeline and write report
*/ */
final def script() { final def script() {
if (config.contains("output_dir")) outputDir = config("output_dir").asFile.getAbsoluteFile outputDir = config("output_dir")
else { outputDir = outputDir.getAbsoluteFile
outputDir = new File(".").getAbsoluteFile
BiopetQScript.addError("No output_dir defined in config")
}
init init
biopetScript biopetScript
......
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