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

Switch defaults to a def instead of a var

parent f60b77cc
......@@ -35,9 +35,9 @@ trait Configurable extends ImplicitConversions {
protected[core] def configFullPath: List[String] = configPath ::: configName :: Nil
/** Map to store defaults for config */
var defaults: scala.collection.mutable.Map[String, Any] = {
if (root != null) scala.collection.mutable.Map(root.defaults.toArray: _*)
else scala.collection.mutable.Map()
def defaults: Map[String, Any] = {
if (root != null) root.defaults
else Map()
}
val config = new ConfigFunctions
......
......@@ -21,6 +21,7 @@ import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
import nl.lumc.sasc.biopet.core.ToolCommand
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import scala.collection.mutable.ArrayBuffer
import scala.io.Source
......@@ -50,7 +51,8 @@ class MpileupToVcf(val root: Configurable) extends BiopetJavaCommandLineFunction
override val defaultVmem = "6G"
memoryLimit = Option(2.0)
defaults ++= Map("samtoolsmpileup" -> Map("disable_baq" -> true, "min_map_quality" -> 1))
override def defaults = ConfigUtils.mergeMaps(Map("samtoolsmpileup" -> Map("disable_baq" -> true, "min_map_quality" -> 1)),
super.defaults)
override def afterGraph {
super.afterGraph
......
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