Commit e3df8cc5 authored by Peter van 't Hof's avatar Peter van 't Hof

Remove BIOPET_CONFIG_SCATTER env value, change flag to disable scatters

parent 85885148
......@@ -6,6 +6,7 @@ import nl.lumc.sasc.biopet.core.config.{ Config, Configurable }
import org.broadinstitute.gatk.utils.commandline.Argument
import org.broadinstitute.gatk.queue.QSettings
import org.broadinstitute.gatk.queue.function.QFunction
import org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFunction
trait BiopetQScript extends Configurable {
......@@ -15,8 +16,8 @@ trait BiopetQScript extends Configurable {
@Argument(doc = "Output directory", fullName = "output_directory", shortName = "outDir", required = true)
var outputDir: String = _
@Argument(doc = "Use scatter defaults, env value BIOPET_CONFIG_SCATTER", shortName = "SC", required = false)
var useScatterDefault: Boolean = false
@Argument(doc = "Disable all scatters", shortName = "DSC", required = false)
var disableScatterDefault: Boolean = false
var outputFiles: Map[String, File] = Map()
......@@ -28,10 +29,14 @@ trait BiopetQScript extends Configurable {
var functions: Seq[QFunction]
final def script() {
if (useScatterDefault) Config.global.loadDefaultScatterConfig
if (!outputDir.endsWith("/")) outputDir += "/"
init
biopetScript
if (disableScatterDefault) for (function <- functions) function match {
case f: ScatterGatherableFunction => f.scatterCount = 1
case _ =>
}
for (function <- functions) function match {
case f: BiopetCommandLineFunctionTrait => f.afterGraph
case _ =>
......
......@@ -28,10 +28,6 @@ class Config(var map: Map[String, Any]) extends Logging {
loadConfigEnv("BIOPET_CONFIG")
}
def loadDefaultScatterConfig() {
loadConfigEnv("BIOPET_CONFIG_SCATTER")
}
def loadConfigFile(configFile: File) {
logger.debug("Jsonfile: " + configFile)
val jsonText = scala.io.Source.fromFile(configFile).mkString
......
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