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

Renaming values

parent 413f0bd1
......@@ -34,14 +34,14 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
class Sample(sampleId: String) extends AbstractSample(sampleId) {
def makeLibrary(id: String) = new Library(id)
class Library(libraryId: String) extends AbstractLibrary(libraryId) {
protected def addLibJobsInternal(): Unit = {}
protected def addJobs(): Unit = {}
}
var output: FastaOutput = _
var outputSnps: FastaOutput = _
protected def addSampleJobsInternal(): Unit = {
runLibsJobs()
protected def addJobs(): Unit = {
addLibsJobs()
output = addGenerateFasta(sampleId, sampleDir)
outputSnps = addGenerateFasta(sampleId, sampleDir, snpsOnly = true)
}
......
......@@ -54,7 +54,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
gatkVariantcalling.sampleID = sampleId
gatkVariantcalling.outputDir = libDir
protected def addLibJobsInternal(): Unit = {
protected def addJobs(): Unit = {
val bamFile: Option[File] = if (config.contains("R1")) {
mapping.input_R1 = config("R1")
mapping.input_R2 = config("R2")
......@@ -126,8 +126,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
gatkVariantcalling.sampleID = sampleId
gatkVariantcalling.outputDir = sampleDir + "/variantcalling/"
protected def addSampleJobsInternal(): Unit = {
runLibsJobs()
protected def addJobs(): Unit = {
addLibsJobs()
gatkVariantcalling.inputBams = libraries.map(_._2.mapping.finalBamFile).toList
gatkVariantcalling.preProcesBams = false
if (!singleSampleCalling) {
......
......@@ -47,10 +47,10 @@ trait MultiSampleQScript extends BiopetQScript {
val config = new ConfigFunctions(defaultSample = sampleId, defaultLibrary = libraryId)
/** Adds the library jobs */
final def addLibJobs(): Unit = {
final def addAndTrackJobs(): Unit = {
currentSample = Some(sampleId)
currentLib = Some(libraryId)
addLibJobsInternal()
addJobs()
currentLib = None
currentSample = None
}
......@@ -62,7 +62,7 @@ trait MultiSampleQScript extends BiopetQScript {
def libDir = sampleDir + "lib_" + libraryId + File.separator
/** Function that add library jobs */
protected def addLibJobsInternal()
protected def addJobs()
}
/** Library type, need implementation in pipeline */
......@@ -84,19 +84,19 @@ trait MultiSampleQScript extends BiopetQScript {
}
/** Adds sample jobs */
final def addSampleJobs(): Unit = {
final def addAndTrackJobs(): Unit = {
currentSample = Some(sampleId)
addSampleJobsInternal()
addJobs()
currentSample = None
}
/** Function to add sample jobs */
protected def addSampleJobsInternal()
protected def addJobs()
/** function runs all libraries in one call */
protected final def runLibsJobs(): Unit = {
protected final def addLibsJobs(): Unit = {
for ((libraryId, library) <- libraries) {
library.addLibJobs()
library.addAndTrackJobs()
}
}
......@@ -132,7 +132,7 @@ trait MultiSampleQScript extends BiopetQScript {
/** Runs runSingleSampleJobs method for each sample */
final def addSamplesJobs() {
for ((sampleId, sample) <- samples) {
sample.addSampleJobs()
sample.addAndTrackJobs()
}
}
......
......@@ -27,12 +27,12 @@ class MultisamplePipelineTemplate(val root: Configurable) extends QScript with M
def makeLibrary(id: String) = new Library(id)
class Library(libraryId: String) extends AbstractLibrary(libraryId) {
protected def addLibJobsInternal(): Unit = {
protected def addJobs(): Unit = {
// Library jobs
}
}
protected def addSampleJobsInternal(): Unit = {
protected def addJobs(): Unit = {
// Sample jobs
}
}
......
......@@ -74,7 +74,7 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
mapping.libraryId = libraryId
mapping.sampleId = sampleId
protected def addLibJobsInternal(): Unit = {
protected def addJobs(): Unit = {
flexiprep.outputDir = libDir + "flexiprep/"
flexiprep.input_R1 = inputFastq
flexiprep.init
......@@ -102,8 +102,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
}
}
protected def addSampleJobsInternal(): Unit = {
runLibsJobs()
protected def addJobs(): Unit = {
addLibsJobs()
val libraryBamfiles = libraries.map(_._2.mapping.finalBamFile).toList
val libraryFastqFiles = libraries.map(_._2.prefixFastq).toList
......
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