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

Moved samples to single root directory

parent 554cdfa6
......@@ -5,7 +5,12 @@ import nl.lumc.sasc.biopet.core.config.Configurable
trait MultiSampleQScript extends BiopetQScript {
var samples: Map[String, Any] = Map()
var globalSampleDir: String = _
def init {
globalSampleDir = outputDir + "samples/"
}
final def runSamplesJobs: Map[String, Map[String, File]] = {
var output: Map[String, Map[String, File]] = Map()
samples = config("samples")
......
......@@ -27,8 +27,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
var gvcfFiles: List[File] = Nil
var finalBamFiles: List[File] = Nil
def init() {
for (file <- configfiles) globalConfig.loadConfigFile(file)
override def init() {
super.init
reference = config("reference", required = true)
dbsnp = config("dbsnp")
if (config.contains("gvcfFiles"))
......@@ -81,7 +81,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
finalBamFiles ++= libraryBamfiles
val gatkVariantcalling = new GatkVariantcalling(this)
gatkVariantcalling.inputBams = libraryBamfiles
gatkVariantcalling.outputDir = outputDir + sampleID + "/variantcalling/"
gatkVariantcalling.outputDir = globalSampleDir + sampleID + "/variantcalling/"
gatkVariantcalling.init
gatkVariantcalling.biopetScript
addAll(gatkVariantcalling.functions)
......@@ -95,7 +95,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
var outputFiles: Map[String, File] = Map()
val runID: String = runConfig("ID").toString
val sampleID: String = sampleConfig("ID").toString
val runDir: String = outputDir + sampleID + "/run_" + runID + "/"
val runDir: String = globalSampleDir + sampleID + "/run_" + runID + "/"
var inputType = ""
if (runConfig.contains("inputtype")) inputType = runConfig("inputtype").toString
else inputType = config("inputtype", default = "dna").toString
......
......@@ -35,8 +35,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
)
)
def init() {
for (file <- configfiles) globalConfig.loadConfigFile(file)
override def init() {
super.init
if (!outputDir.endsWith("/")) outputDir += "/"
if (countBed == null) countBed = config("count_bed")
if (squishedCountBed == null) squishedCountBed = config("squished_count_bed")
......@@ -75,7 +75,7 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
var libraryBamfiles: List[File] = List()
var libraryFastqFiles: List[File] = List()
val sampleID: String = sampleConfig("ID").toString
val sampleDir: String = outputDir + sampleID + "/"
val sampleDir: String = globalSampleDir + sampleID + "/"
for ((library, libraryFiles) <- runLibraryJobs(sampleConfig)) {
libraryFastqFiles +:= libraryFiles("prefix_fastq")
libraryBamfiles +:= libraryFiles("FinalBam")
......@@ -105,7 +105,7 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
var outputFiles: Map[String, File] = Map()
val runID: String = runConfig("ID").toString
val sampleID: String = sampleConfig("ID").toString
val runDir: String = outputDir + sampleID + "/run_" + runID + "/"
val runDir: String = globalSampleDir + sampleID + "/run_" + runID + "/"
if (runConfig.contains("R1")) {
val flexiprep = new Flexiprep(this)
flexiprep.outputDir = runDir + "flexiprep/"
......
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