Commit 4875e508 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Add input files to pipelines

parent 5d8fb79d
......@@ -35,6 +35,7 @@ class Bam2Wig(val root: Configurable) extends QScript with BiopetQScript {
var bamFile: File = null
def init(): Unit = {
inputFiles :+= InputFile(bamFile)
}
def biopetScript(): Unit = {
......
......@@ -71,7 +71,8 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
}
/** executed before script */
def init() {
def init(): Unit = {
inputFiles :+= InputFile(inputBam)
}
/** Script to add jobs */
......
......@@ -89,6 +89,8 @@ trait BastyTrait extends MultiSampleQScript {
addAll(shiva.functions)
addSummaryQScript(shiva)
inputFiles :::= shiva.inputFiles
addSamplesJobs()
}
......
......@@ -21,6 +21,11 @@ class CheckMd5 extends InProcessFunction {
@Argument(required = true)
var md5sum: String = _
override def freezeFieldValues(): Unit = {
super.freezeFieldValues()
jobOutputFile = new File(md5file.getParentFile, md5file.getName + ".check.out")
}
/** Exits whenever the input md5sum is not the same as the output md5sum */
def run: Unit = {
val outputMd5sum = WriteSummary.parseChecksum(md5file).toLowerCase
......
......@@ -78,6 +78,10 @@ class Carp(val root: Configurable) extends QScript with MultiSampleQScript with
if (config.contains("R1")) {
mapping.input_R1 = config("R1")
if (config.contains("R2")) mapping.input_R2 = config("R2")
inputFiles :+= InputFile(mapping.input_R1, config("R1_md5"))
mapping.input_R2.foreach(inputFiles :+= InputFile(_, config("R2_md5")))
mapping.init()
mapping.biopetScript()
addAll(mapping.functions)
......
......@@ -844,6 +844,8 @@ class Gentrap(val root: Configurable) extends QScript
def addJobs(): Unit = {
// create per-library alignment file
addAll(mappingJob.functions)
// Input file checking
inputFiles :::= mappingJob.inputFiles
// add bigwig track
addAll(bam2wigModule.functions)
qscript.addSummaryQScript(mappingJob)
......
......@@ -88,6 +88,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
mapping.sampleId = Some(sampleId)
protected def addJobs(): Unit = {
inputFiles :+= InputFile(inputFastq, config("R1_md5"))
flexiprep.outputDir = new File(libDir, "flexiprep/")
flexiprep.input_R1 = inputFastq
flexiprep.init()
......
......@@ -35,6 +35,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
var inputVCF: File = _
def init(): Unit = {
inputFiles :+= InputFile(inputVCF)
}
override def defaults = ConfigUtils.mergeMaps(Map(
......
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