Commit e043fab8 authored by Sander Bollen's avatar Sander Bollen

refactor to `configNamespace`

parent 00034b55
......@@ -26,7 +26,7 @@ class VariantRecalibrator(val root: Configurable) extends org.broadinstitute.gat
object VariantRecalibrator {
def apply(root: Configurable, input: File, recal_file: File, tranches_file: File, indel: Boolean = false): VariantRecalibrator = {
val vr = new VariantRecalibrator(root) {
override lazy val configName = "variantrecalibrator"
override lazy val configNamespace = "variantrecalibrator"
override def configPath: List[String] = (if (indel) "indel" else "snp") :: super.configPath
if (indel) {
mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.INDEL
......
......@@ -20,15 +20,15 @@ class Shiva(val root: Configurable) extends QScript with ShivaTrait {
qscript =>
def this() = this(null)
/** Make variantcalling submodule, this with the gatk modes in there */
/** Make variantcalling configNamespace, this with the gatk modes in there */
override def makeVariantcalling(multisample: Boolean = false) = {
if (multisample) new ShivaVariantcalling(qscript) {
override def namePrefix = "multisample"
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
override def configPath: List[String] = super.configPath ::: "multisample" :: Nil
}
else new ShivaVariantcalling(qscript) {
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
}
}
......
......@@ -27,7 +27,7 @@ import org.testng.annotations.{ DataProvider, Test }
class ShivaTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Shiva = {
new Shiva() {
override def configName = "shiva"
override def configNamespace = "shiva"
override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaTest.config))
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -29,7 +29,7 @@ import scala.collection.mutable.ListBuffer
class ShivaVariantcallingTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): ShivaVariantcalling = {
new ShivaVariantcalling() {
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaVariantcallingTest.config))
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -40,7 +40,7 @@ class BamMetricsTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): BamMetrics = {
new BamMetrics() {
override def configName = "bammetrics"
override def configNamespace = "bammetrics"
override def globalConfig = new Config(map)
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -131,11 +131,11 @@ trait BastyTrait extends MultiSampleQScript {
raxmlMl.p = Some(seed)
raxmlMl.n = outputName + "_ml"
raxmlMl.w = dirSufixRaxml
raxmlMl.N = config("ml_runs", default = 20, submodule = "raxml")
raxmlMl.N = config("ml_runs", default = 20, configNamespace = "raxml")
add(raxmlMl)
val r = new scala.util.Random(seed)
val numBoot = config("boot_runs", default = 100, submodule = "raxml").asInt
val numBoot = config("boot_runs", default = 100, configNamespace = "raxml").asInt
val bootList = for (t <- 0 until numBoot) yield {
val raxmlBoot = new Raxml(this)
raxmlBoot.input = variants
......
......@@ -30,7 +30,7 @@ import scala.collection.JavaConversions._
/** Biopet command line trait to auto check executable and cluster values */
trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
analysisName = configName
analysisName = configNamespace
@Input(doc = "deps", required = false)
var deps: List[File] = Nil
......
......@@ -19,7 +19,7 @@ import org.broadinstitute.gatk.queue.function.JavaCommandLineFunction
/** Biopet commandline class for java based programs */
trait BiopetJavaCommandLineFunction extends JavaCommandLineFunction with BiopetCommandLineFunction {
executable = config("java", default = "java", submodule = "java", freeVar = false)
executable = config("java", default = "java", configNamespace = "java", freeVar = false)
javaGCThreads = config("java_gc_threads", default = 4)
javaGCHeapFreeLimit = config("java_gc_heap_freelimit", default = 10)
......
......@@ -74,7 +74,7 @@ class BiopetPipe(val commands: List[BiopetCommandLineFunction]) extends BiopetCo
override def defaultThreads = 0
val root: Configurable = commands.head.root
override def configName = commands.map(_.configName).mkString("-")
override def configNamespace = commands.map(_.configNamespace).mkString("-")
def cmdLine: String = {
"(" + commands.head.cmdLine + (if (commands.head.stdinFile.isDefined) {
" < " + required(commands.head.stdinFile.map(_.getAbsoluteFile))
......
......@@ -31,7 +31,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
@Argument(doc = "JSON / YAML config file(s)", fullName = "config_file", shortName = "config", required = false)
val configfiles: List[File] = Nil
@Argument(doc = "Config values, value should be formatted like 'key=value' or 'path:path:key=value'", fullName = "config_value", shortName = "cv", required = false)
@Argument(doc = "Config values, value should be formatted like 'key=value' or 'configNamespace:configNamespace:key=value'", fullName = "config_value", shortName = "cv", required = false)
val configValues: List[String] = Nil
/** Output directory of pipeline */
......
......@@ -88,7 +88,7 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
else residentLimit = Some((_coreMemory + (0.5 * retryMultipler)) * residentFactor)
if (!config.contains("vmem")) vmem = Some((_coreMemory * (vmemFactor + (0.5 * retryMultipler))) + "G")
jobName = configName + ":" + (if (firstOutput != null) firstOutput.getName else jobOutputFile)
jobName = configNamespace + ":" + (if (firstOutput != null) firstOutput.getName else jobOutputFile)
}
override def setupRetry(): Unit = {
......
......@@ -70,7 +70,7 @@ trait MultiSampleQScript extends SummaryQScript { qscript: QScript =>
def libDir = new File(sampleDir, "lib_" + libId)
lazy val libTags: Map[String, Any] =
config("tags", default = Map(), freeVar = false, submodule = libId, path = List("samples", sampleId, "libraries"))
config("tags", default = Map(), freeVar = false, configNamespace = libId, path = List("samples", sampleId, "libraries"))
def sampleId = sample.sampleId
......@@ -91,7 +91,7 @@ trait MultiSampleQScript extends SummaryQScript { qscript: QScript =>
val libraries: Map[String, Library] = libIds.map(id => id -> makeLibrary(id)).toMap
lazy val sampleTags: Map[String, Any] =
config("tags", default = Map(), freeVar = false, submodule = sampleId, path = List("samples"))
config("tags", default = Map(), freeVar = false, configNamespace = sampleId, path = List("samples"))
lazy val gender = {
val g: Option[String] = sampleTags.get("gender").map(_.toString)
......
......@@ -36,7 +36,7 @@ object WriteDependencies extends Logging with Configurable {
val cache: mutable.Map[String, Int] = mutable.Map()
for (function <- functions) {
val baseName = function match {
case f: Configurable => f.configName
case f: Configurable => f.configNamespace
case f => f.getClass.getSimpleName
}
cache += baseName -> (cache.getOrElse(baseName, 0) + 1)
......
......@@ -24,7 +24,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
@Input(doc = "Python script", required = false)
var python_script: File = _
executable = config("exe", default = "python", submodule = "python", freeVar = false)
executable = config("exe", default = "python", configNamespace = "python", freeVar = false)
protected var python_script_name: String = _
......
......@@ -37,7 +37,7 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
private[summary] var summaryQScripts: List[SummaryQScript] = Nil
/** Name of the pipeline in the summary */
var summaryName = configName
var summaryName = configNamespace
/** Must return a map with used settings for this pipeline */
def summarySettings: Map[String, Any]
......@@ -103,7 +103,7 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
if (writeSummary.md5sum) {
if (!SummaryQScript.md5sumCache.contains(file)) {
val md5sum = new Md5sum(this) {
override def configName = "md5sum"
override def configNamespace = "md5sum"
override def cmdLine: String = super.cmdLine + " || " +
required("echo") + required("error_on_capture " + input.toString) + " > " + required(output)
......
......@@ -75,16 +75,16 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
def fetchVersion(f: QFunction): Option[(String, Any)] = {
f match {
case f: BiopetJavaCommandLineFunction with Version =>
Some(f.configName -> Map("version" -> f.getVersion.getOrElse(None),
Some(f.configNamespace -> Map("version" -> f.getVersion.getOrElse(None),
"java_md5" -> BiopetCommandLineFunction.executableMd5Cache.getOrElse(f.executable, None),
"java_version" -> f.getJavaVersion,
"jar_path" -> f.jarFile))
case f: BiopetCommandLineFunction with Version =>
Some(f.configName -> Map("version" -> f.getVersion.getOrElse(None),
Some(f.configNamespace -> Map("version" -> f.getVersion.getOrElse(None),
"md5" -> BiopetCommandLineFunction.executableMd5Cache.getOrElse(f.executable, None),
"path" -> f.executable))
case f: Configurable with Version =>
Some(f.configName -> Map("version" -> f.getVersion.getOrElse(None)))
Some(f.configNamespace -> Map("version" -> f.getVersion.getOrElse(None)))
case _ => None
}
}
......
......@@ -295,7 +295,7 @@ object WriteSummaryTest {
stats: Map[String, Any] = Map(),
c: Map[String, Any] = Map()) = new BiopetJavaCommandLineFunction with Summarizable with Version {
override def globalConfig = new Config(c)
override def configName = "java_command"
override def configNamespace = "java_command"
def root: Configurable = null
def summaryStats: Map[String, Any] = stats
def summaryFiles: Map[String, File] = files
......@@ -320,7 +320,7 @@ object WriteSummaryTest {
c: Map[String, Any] = Map()) =
new CommandLineFunction with Configurable with Summarizable with Version {
override def globalConfig = new Config(c)
override def configName = "version_command"
override def configNamespace = "version_command"
def root: Configurable = null
def summaryFiles: Map[String, File] = files
......
......@@ -40,7 +40,7 @@ class Fastqc(val root: Configurable) extends BiopetCommandLineFunction with Vers
var output: File = null
executable = config("exe", default = "fastqc")
var java_exe: String = config("exe", default = "java", submodule = "java", freeVar = false)
var java_exe: String = config("exe", default = "java", configNamespace = "java", freeVar = false)
var kmers: Option[Int] = config("kmers")
var quiet: Boolean = config("quiet", default = false)
var noextract: Boolean = config("noextract", default = false)
......
......@@ -28,7 +28,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
*/
class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFunction with Reference with Version {
executable = config("exe", submodule = "perl", default = "perl")
executable = config("exe", configNamespace = "perl", default = "perl")
var vepScript: String = config("vep_script")
@Input(doc = "input VCF", required = true)
......
......@@ -19,7 +19,7 @@ import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
abstract class Bcftools extends BiopetCommandLineFunction with Version {
override def subPath = "bcftools" :: super.subPath
executable = config("exe", default = "bcftools", submodule = "bcftools", freeVar = false)
executable = config("exe", default = "bcftools", configNamespace = "bcftools", freeVar = false)
def versionCommand = executable
def versionRegex = """Version: (.*)""".r
override def versionExitcode = List(0, 1)
......
......@@ -20,7 +20,7 @@ import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
/** General abstract class for bedtools extensions */
abstract class Bedtools extends BiopetCommandLineFunction with Version {
override def subPath = "bedtools" :: super.subPath
executable = config("exe", default = "bedtools", submodule = "bedtools")
executable = config("exe", default = "bedtools", configNamespace = "bedtools")
def versionCommand = executable + " --version"
def versionRegex = """bedtools (.*)""".r
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import org.broadinstitute.gatk.engine.phonehome.GATKRunReport
import org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK
trait GatkGeneral extends CommandLineGATK with CommandLineResources with Reference with Version {
var executable: String = config("java", default = "java", submodule = "java", freeVar = false)
var executable: String = config("java", default = "java", configNamespace = "java", freeVar = false)
override def subPath = "gatk" :: super.subPath
......
......@@ -24,7 +24,7 @@ import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
* Created by wyleung on 5-1-15
*/
abstract class IGVTools extends BiopetCommandLineFunction with Version {
executable = config("exe", default = "igvtools", submodule = "igvtools", freeVar = false)
executable = config("exe", default = "igvtools", configNamespace = "igvtools", freeVar = false)
def versionCommand = executable + " version"
def versionRegex = """IGV Version:? ([\w\.]*) .*""".r
override def versionExitcode = List(0)
......
......@@ -23,7 +23,7 @@ import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
* Created by sajvanderzeeuw on 12/19/14.
*/
abstract class Macs2 extends BiopetCommandLineFunction with Version {
executable = config("exe", default = "macs2", submodule = "macs2", freeVar = false)
executable = config("exe", default = "macs2", configNamespace = "macs2", freeVar = false)
def versionCommand = executable + " --version"
def versionRegex = """macs2 (.*)""".r
override def versionExitcode = List(0, 1)
......
......@@ -11,7 +11,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Output, Argument }
* manwe [subcommand]
*/
abstract class Manwe extends BiopetCommandLineFunction {
executable = config("exe", default = "manwe", submodule = "manwe")
executable = config("exe", default = "manwe", configNamespace = "manwe")
var manweConfig: File = createManweConfig(None)
......
......@@ -24,7 +24,7 @@ abstract class Sambamba extends BiopetCommandLineFunction with Version {
override def subPath = "sambamba" :: super.subPath
executable = config("exe", default = "sambamba", submodule = "sambamba", freeVar = false)
executable = config("exe", default = "sambamba", configNamespace = "sambamba", freeVar = false)
def versionCommand = executable
def versionRegex = """sambamba v(.*)""".r
override def versionExitcode = List(0, 1)
......
......@@ -20,7 +20,7 @@ import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
/** General class for samtools extensions */
abstract class Samtools extends BiopetCommandLineFunction with Version {
override def subPath = "samtools" :: super.subPath
executable = config("exe", default = "samtools", submodule = "samtools", freeVar = false)
executable = config("exe", default = "samtools", configNamespace = "samtools", freeVar = false)
def versionCommand = executable
def versionRegex = """Version: (.*)""".r
override def versionExitcode = List(0, 1)
......
......@@ -30,10 +30,10 @@ trait Configurable extends ImplicitConversions {
def configPath: List[String] = if (root != null) root.configFullPath else Nil
/** Gets name of module for config */
def configName = getClass.getSimpleName.toLowerCase
def configNamespace = getClass.getSimpleName.toLowerCase
/** ull path with module in there */
def configFullPath: List[String] = configPath ::: configName :: Nil
def configFullPath: List[String] = configPath ::: configNamespace :: Nil
/** Map to store defaults for config */
def defaults: Map[String, Any] = Map()
......@@ -69,7 +69,7 @@ trait Configurable extends ImplicitConversions {
def getConfigPath(sample: String = null, library: String = null, submodule: String = null) = {
(if (sample != null) "samples" :: sample :: Nil else Nil) :::
(if (library != null) "libraries" :: library :: Nil else Nil) :::
(if (submodule != null) configPath ::: configName :: Nil else configPath)
(if (submodule != null) configPath ::: configNamespace :: Nil else configPath)
}
/** Class is used for retrieval of config values */
......@@ -92,7 +92,7 @@ trait Configurable extends ImplicitConversions {
*
* @param key Name of value
* @param default Default value if not found
* @param submodule Adds to the path
* @param configNamespace Adds to the path
* @param freeVar Default true, if set false value must exist in module
* @param sample Default null, when set path is prefixed with "samples" -> "sampleID"
* @param library Default null, when set path is prefixed with "libraries" -> "libraryID"
......@@ -100,15 +100,15 @@ trait Configurable extends ImplicitConversions {
*/
def apply(key: String,
default: Any = null,
submodule: String = null,
configNamespace: String = null,
freeVar: Boolean = true,
sample: String = null,
library: String = null,
path: List[String] = null): ConfigValue = {
val s = if (sample != null || defaultSample.isEmpty) sample else defaultSample.get
val l = if (library != null || defaultLibrary.isEmpty) library else defaultLibrary.get
val m = if (submodule != null) submodule else configName
val p = if (path == null) getConfigPath(s, l, submodule) ::: subPath else path
val m = if (configNamespace != null) configNamespace else configNamespace
val p = if (path == null) getConfigPath(s, l, configNamespace) ::: subPath else path
val d = {
val value = Config.getValueFromMap(internalDefaults, ConfigValueIndex(m, p, key, freeVar))
if (value.isDefined) value.get.value else default
......@@ -120,22 +120,22 @@ trait Configurable extends ImplicitConversions {
/**
* Check if value exist in config
* @param key Name of value
* @param submodule Adds to the path
* @param configNamespace Adds to the path
* @param freeVar Default true, if set false value must exist in module
* @param sample Default null, when set path is prefixed with "samples" -> "sampleID"
* @param library Default null, when set path is prefixed with "libraries" -> "libraryID"
* @return true when value is found in config
*/
def contains(key: String,
submodule: String = null,
configNamespace: String = null,
freeVar: Boolean = true,
sample: String = null,
library: String = null,
path: List[String] = null) = {
val s = if (sample != null || defaultSample.isEmpty) sample else defaultSample.get
val l = if (library != null || defaultLibrary.isEmpty) library else defaultLibrary.get
val m = if (submodule != null) submodule else configName
val p = if (path == null) getConfigPath(s, l, submodule) ::: subPath else path
val m = if (configNamespace != null) configNamespace else configNamespace
val p = if (path == null) getConfigPath(s, l, configNamespace) ::: subPath else path
globalConfig.contains(m, p, key, freeVar, internalFixedValues) || Config.getValueFromMap(internalDefaults, ConfigValueIndex(m, p, key, freeVar)).isDefined
}
......
......@@ -30,7 +30,7 @@ import scala.sys.process.{ Process, ProcessLogger }
trait Rscript extends Configurable {
protected var script: File
def rscriptExecutable: String = config("exe", default = "Rscript", submodule = "rscript")
def rscriptExecutable: String = config("exe", default = "Rscript", configNamespace = "rscript")
/** This is the defaul implementation, to add arguments override this */
def cmd: Seq[String] = Seq(rscriptExecutable, script.getAbsolutePath)
......
......@@ -52,7 +52,7 @@ class ConfigurableTest extends TestNGSuite with Matchers {
@Test def testConfigurable(): Unit = {
val classC = new ClassC {
override def configName = "classc"
override def configNamespace = "classc"
override val globalConfig = new Config(ConfigurableTest.map)
override val fixedValues = Map("fixed" -> "fixed")
}
......
......@@ -37,7 +37,7 @@ import org.testng.annotations.{ AfterClass, DataProvider, Test }
class CarpTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Carp = {
new Carp() {
override def configName = "carp"
override def configNamespace = "carp"
override def globalConfig = new Config(map)
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -204,7 +204,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
fqSync.outputStats = new File(outDir, s"${sampleId.getOrElse("x")}-${libId.getOrElse("x")}.sync.stats")
val pipe = new BiopetFifoPipe(this, fqSync :: Nil) {
override def configName = "qc-cmd"
override def configNamespace = "qc-cmd"
override def beforeGraph(): Unit = {
fqSync.beforeGraph()
......
......@@ -36,7 +36,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Flexiprep = {
new Flexiprep() {
override def configName = "flexiprep"
override def configNamespace = "flexiprep"
override def globalConfig = new Config(map)
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -39,7 +39,7 @@ import org.testng.annotations._
class GearsSingleTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): GearsSingle = {
new GearsSingle {
override def configName = "gearssingle"
override def configNamespace = "gearssingle"
override def globalConfig = new Config(map)
......
......@@ -17,7 +17,7 @@ import org.testng.annotations.{ DataProvider, Test, AfterClass }
class GearsTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Gears = {
new Gears {
override def configName = "gears"
override def configNamespace = "gears"
override def globalConfig = new Config(map)
......
......@@ -31,7 +31,7 @@ abstract class GentrapTestAbstract(val expressionMeasure: String) extends TestNG
def initPipeline(map: Map[String, Any]): Gentrap = {
new Gentrap() {
override def configName = "gentrap"
override def configNamespace = "gentrap"
override def globalConfig = new Config(map)
// disable dict file check since it is based on the reference file name (which we can't modify here since
// we use the mock /usr/bin/test file
......
......@@ -35,7 +35,7 @@ import org.testng.annotations.{ BeforeClass, AfterClass, DataProvider, Test }
abstract class AbstractTestMapping(val aligner: String) extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Mapping = {
new Mapping {
override def configName = "mapping"
override def configNamespace = "mapping"
override def globalConfig = new Config(map)
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -36,15 +36,15 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
Some(shiva)
}
/** Method to make the variantcalling submodule of shiva */
/** Method to make the variantcalling configNamespace of shiva */
def makeVariantcalling(multisample: Boolean = false): ShivaVariantcallingTrait with QScript = {
if (multisample) new ShivaVariantcalling(qscript) {
override def namePrefix = "multisample"
override def configName: String = "shivavariantcalling"
override def configNamespace: String = "shivavariantcalling"
override def configPath: List[String] = super.configPath ::: "multisample" :: Nil
}
else new ShivaVariantcalling(qscript) {
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
}
}
......
......@@ -92,8 +92,8 @@ trait ShivaVariantcallingTrait extends SummaryQScript
caller.outputDir = new File(outputDir, caller.name)
add(caller)
addStats(caller.outputFile, caller.name)
val normalize: Boolean = config("execute_vt_normalize", default = false, submodule = caller.configName)
val decompose: Boolean = config("execute_vt_decompose", default = false, submodule = caller.configName)
val normalize: Boolean = config("execute_vt_normalize", default = false, configNamespace = caller.configNamespace)
val decompose: Boolean = config("execute_vt_decompose", default = false, configNamespace = caller.configNamespace)
val vtNormalize = new VtNormalize(this)
vtNormalize.inputVcf = caller.outputFile
......
......@@ -18,7 +18,7 @@ class RawVcf(val root: Configurable) extends Variantcaller {
val rawFiles = inputBams.map {
case (sample, bamFile) =>
val mp = new SamtoolsMpileup(this) {
override def configName = "samtoolsmpileup"
override def configNamespace = "samtoolsmpileup"
override def defaults = Map("samtoolsmpileup" -> Map("disable_baq" -> true, "min_map_quality" -> 1))
}
mp.input :+= bamFile
......@@ -29,7 +29,7 @@ class RawVcf(val root: Configurable) extends Variantcaller {
add(mp | m2v)
val vcfFilter = new VcfFilter(this) {
override def configName = "vcffilter"
override def configNamespace = "vcffilter"
override def defaults = Map("min_sample_depth" -> 8,
"min_alternate_depth" -> 2,
"min_samples_pass" -> 1,
......
......@@ -40,7 +40,7 @@ import scala.collection.mutable.ListBuffer
class ShivaSvCallingTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): ShivaSvCalling = {
new ShivaSvCalling {
override def configName = "shivasvcalling"
override def configNamespace = "shivasvcalling"
override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaSvCallingTest.config))
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -36,7 +36,7 @@ import org.testng.annotations.{ DataProvider, Test }
class ShivaTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Shiva = {
new Shiva() {
override def configName = "shiva"
override def configNamespace = "shiva"
override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaTest.config))
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -39,7 +39,7 @@ import scala.collection.mutable.ListBuffer
class ShivaVariantcallingTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): ShivaVariantcalling = {
new ShivaVariantcalling {
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaVariantcallingTest.config))
qSettings = new QSettings
qSettings.runName = "test"
......
......@@ -118,8 +118,8 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
def importAndActivateSample(sampleID: String, inputVcf: File,
gVCF: File, annotation: ManweAnnotateVcf): ManweActivateAfterAnnotImport = {
val minGQ: Int = config("minimum_genome_quality", default = 20, submodule = "manwe")
val isPublic: Boolean = config("varda_is_public", default = true, submodule = "manwe")
val minGQ: Int = config("minimum_genome_quality", default = 20, configNamespace = "manwe")
val isPublic: Boolean = config("varda_is_public", default = true, configNamespace = "manwe")
val bedTrack = new GvcfToBed(this)
bedTrack.inputVcf = gVCF
......@@ -184,7 +184,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
*/
def varda(vcf: File, gVcf: File): File = {
val annotationQueries: List[String] = config("annotation_queries", default = List("GLOBAL *"), submodule = "manwe")
val annotationQueries: List[String] = config("annotation_queries", default = List("GLOBAL *"), configNamespace = "manwe")
//TODO: add groups!!! Need sample-specific group tags for this
val annotate = new ManweAnnotateVcf(this)
......
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