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

Added merge config

parent bee01c91
......@@ -5,17 +5,20 @@ import org.broadinstitute.sting.queue.function.CommandLineFunction
//import org.broadinstitute.sting.queue.function.QFunction
import org.broadinstitute.sting.commandline._
import java.io.File
import scala.sys.process._
class Ln(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "ln"
val config: Config = globalConfig.getAsConfig(this.analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Input file") var in: File = _
@Output(doc="Link destination") var out: File = _
def commandLine = "ln -sf %s %s".format(in, out)
def commandLine = {
"ln -sf " + required(in) + required(out)
}
}
object Ln {
......
......@@ -8,7 +8,7 @@ import java.io.File
class Sha1sum(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "sha1sum"
val config: Config = globalConfig.getAsConfig("sha1sum")
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Zipped file") var in: File = _
......
......@@ -8,7 +8,7 @@ import java.io.File
class Zcat(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "zcat"
val config: Config = globalConfig.getAsConfig("zcat")
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Zipped file") var in: File = _
......
......@@ -10,7 +10,7 @@ import java.io.File
class FastqSync(val globalConfig: Config) extends CommandLineFunction with Python {
def this() = this(new Config(Map()))
analysisName = "fastqsync"
val config: Config = globalConfig.getAsConfig(analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + analysisName + ": " + config)
setPythonScript("__init__.py", "scripts/pyfastqc/")
......
......@@ -9,7 +9,7 @@ import java.io.File
class FastqcToContams(val globalConfig: Config) extends CommandLineFunction with Python {
def this() = this(new Config(Map()))
analysisName = "getcontams"
val config: Config = globalConfig.getAsConfig(analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + analysisName + ": " + config)
setPythonScript("__init__.py", "scripts/pyfastqc/")
......
......@@ -9,7 +9,7 @@ import java.io.File
class FastqcToQualtype(val globalConfig: Config) extends CommandLineFunction with Python {
def this() = this(new Config(Map()))
analysisName = "getqualtype"
val config: Config = globalConfig.getAsConfig(analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + analysisName + ": " + config)
setPythonScript("__init__.py", "scripts/pyfastqc/")
......
......@@ -9,7 +9,7 @@ import java.io.File
class Seqstat(val globalConfig: Config) extends CommandLineFunction with Python {
def this() = this(new Config(Map()))
analysisName = "seqstat"
val config: Config = globalConfig.getAsConfig(analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + analysisName + ": " + config)
setPythonScript("__init__.py", "scripts/pyfastqc/")
......
......@@ -9,7 +9,7 @@ import java.io.File
class Summarize(val globalConfig: Config) extends CommandLineFunction with Python {
def this() = this(new Config(Map()))
analysisName = "flexiprep_sumarize"
val config: Config = globalConfig.getAsConfig(analysisName)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + analysisName + ": " + config)
setPythonScript("__init__.py", "scripts/pyfastqc/")
......
......@@ -10,7 +10,7 @@ import scala.sys.process._
class Cutadapt(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
analysisName = "cutadapt"
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig("cutadapt"), globalConfig)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Cutadapt exe", required=false)
......
......@@ -9,7 +9,7 @@ import scala.sys.process._
class Fastqc(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "fastqc"
val config: Config = globalConfig.getAsConfig("fastqc")
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="fastqc executeble", shortName="Fastqc_Exe")
......
......@@ -10,7 +10,7 @@ import scala.sys.process._
class Sickle(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "sickle"
val config: Config = globalConfig.getAsConfig("sickle")
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Sickle exe", required=false) var sickle_exe: File = new File(config.getAsString("exe", "/usr/local/bin/sickle"))
......
......@@ -9,7 +9,7 @@ import scala.sys.process._
class Bwa(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "bwa"
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig("bwa"), globalConfig)
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Argument(doc="Bwa executeble", shortName="bwa_exe", required=false) var bwa_exe: String = config.getAsString("exe", "/usr/local/bin/bwa")
......
......@@ -8,8 +8,8 @@ import scala.sys.process._
class Star(val globalConfig: Config) extends CommandLineFunction {
def this() = this(new Config(Map()))
this.analysisName = "STAR"
val config: Config = globalConfig.getAsConfig("star")
this.analysisName = "star"
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Argument(doc="STAR executeble", shortName="star_exe", required=false)
......
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