diff --git a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala index f0997173015f16b05bf73daddbb6fbcb10feb244..2764aebf0eadc68fe02151597c037740d5e94a05 100644 --- a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala +++ b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala @@ -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 { diff --git a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Sha1sum.scala b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Sha1sum.scala index d89e3d9ef2b0a9c3982653c3dfcb8edb9e96ca5c..2dded92c27894439efcd51b61da07ec1c5fa7db0 100644 --- a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Sha1sum.scala +++ b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Sha1sum.scala @@ -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 = _ diff --git a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Zcat.scala b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Zcat.scala index de8b4efdc6c0494344945340d50096eb0609a990..206d4bd0dfa639a297af03d798af7fa6dbd75c9e 100644 --- a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Zcat.scala +++ b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Zcat.scala @@ -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 = _ diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqSync.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqSync.scala index 131327f6512ba793065465547eaea6d5973563eb..4b5f179c711c68ac90d262fbfd7a657afcebaaf0 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqSync.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqSync.scala @@ -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/") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToContams.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToContams.scala index f72c912775ac494cbca8666633e67110c864d8b0..a0c4e9ff273918894d72f72ae824d700453f59e5 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToContams.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToContams.scala @@ -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/") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToQualtype.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToQualtype.scala index bbdaefa1f28a639a6031dd58669768c998b6b9d7..346d88d90d1e011b400d564cd9a101e525e00d2c 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToQualtype.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/FastqcToQualtype.scala @@ -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/") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Seqstat.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Seqstat.scala index 003b0753513d2c272c436528d3dacbb1274398e1..b046872d29f81b1d70c4625dae82fcc66f8f3cd1 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Seqstat.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Seqstat.scala @@ -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/") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Summarize.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Summarize.scala index fec2fecccf9c9c2078e08e32c15a69b5a73622bf..2375ffaff99180a7f6d7140e5989b6276d418dc9 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Summarize.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/pipelines/flexiprep/scripts/Summarize.scala @@ -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/") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Cutadapt.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Cutadapt.scala index b9bfbaff26ea9f1946e1caade5dbf99498aebc5f..c4c407ec342116958e962f4128bc07ab125ba7b7 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Cutadapt.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Cutadapt.scala @@ -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) diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Fastqc.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Fastqc.scala index 333581a520375e7a4eae80ccb37628d0faa99ddb..36e2e16d7947168a481a2ae1c80e61d91d1f04d0 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Fastqc.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Fastqc.scala @@ -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") diff --git a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Sickle.scala b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Sickle.scala index bb9b3ac568c5b80b2c1bd314a857a87997d297e3..156c2cefad1577a1767fca625de7f3be7fd781f9 100644 --- a/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Sickle.scala +++ b/flexiprep/src/main/java/nl/lumc/sasc/biopet/wrappers/fastq/Sickle.scala @@ -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")) diff --git a/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Bwa.scala b/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Bwa.scala index 905b56f32f2e96ef7356cecff25526c0470038f4..f6a5e70f147b057dfe96c9de6ccfa7d3eb3d9c8f 100644 --- a/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Bwa.scala +++ b/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Bwa.scala @@ -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") diff --git a/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Star.scala b/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Star.scala index 0cca136cb39b72119864e5df97972879094fe165..663344054257024f8ed3ec2018770a5efb881a0d 100644 --- a/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Star.scala +++ b/mapping/src/main/java/nl/lumc/sasc/biopet/wrappers/aligners/Star.scala @@ -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)