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

Fixed case class

parent b21fac92
......@@ -35,7 +35,7 @@ class Bam2Wig(val root: Configurable) extends QScript with BiopetQScript {
var bamFile: File = null
def init(): Unit = {
inputFiles :+= InputFile(bamFile)
inputFiles :+= new InputFile(bamFile)
}
def biopetScript(): Unit = {
......
......@@ -72,7 +72,7 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
/** executed before script */
def init(): Unit = {
inputFiles :+= InputFile(inputBam)
inputFiles :+= new InputFile(inputBam)
}
/** Script to add jobs */
......
......@@ -48,7 +48,7 @@ trait BiopetQScript extends Configurable with GatkLogging {
var outputFiles: Map[String, File] = Map()
protected case class InputFile(file: File, md5: Option[String] = None)
type InputFile = BiopetQScript.InputFile
var inputFiles: List[InputFile] = Nil
......@@ -112,3 +112,7 @@ trait BiopetQScript extends Configurable with GatkLogging {
add(function)
}
}
object BiopetQScript {
protected case class InputFile(file: File, md5: Option[String] = None)
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ class CheckChecksum extends InProcessFunction {
if (outputChecksum != checksum.toLowerCase) {
logger.error(s"Input file: '$inputFile' md5sum is not as expected, aborting pipeline")
System.exit(1)
Runtime.getRuntime.halt(130)
}
}
}
\ No newline at end of file
......@@ -79,8 +79,8 @@ class Carp(val root: Configurable) extends QScript with MultiSampleQScript with
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")))
inputFiles :+= new InputFile(mapping.input_R1, config("R1_md5"))
mapping.input_R2.foreach(inputFiles :+= new InputFile(_, config("R2_md5")))
mapping.init()
mapping.biopetScript()
......
......@@ -85,8 +85,8 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
paired = input_R2.isDefined
inputFiles :+= InputFile(input_R1)
input_R2.foreach(inputFiles :+= InputFile(_))
inputFiles :+= new InputFile(input_R1)
input_R2.foreach(inputFiles :+= new InputFile(_))
if (input_R1.endsWith(".gz")) R1_name = input_R1.getName.substring(0, input_R1.getName.lastIndexOf(".gz"))
else if (input_R1.endsWith(".gzip")) R1_name = input_R1.getName.substring(0, input_R1.getName.lastIndexOf(".gzip"))
......
......@@ -137,8 +137,8 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
require(sampleId.isDefined, "Missing sample ID on mapping module")
require(libId.isDefined, "Missing library ID on mapping module")
inputFiles :+= InputFile(input_R1)
input_R2.foreach(inputFiles :+= InputFile(_))
inputFiles :+= new InputFile(input_R1)
input_R2.foreach(inputFiles :+= new InputFile(_))
paired = input_R2.isDefined
......
......@@ -88,7 +88,7 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
mapping.sampleId = Some(sampleId)
protected def addJobs(): Unit = {
inputFiles :+= InputFile(inputFastq, config("R1_md5"))
inputFiles :+= new InputFile(inputFastq, config("R1_md5"))
flexiprep.outputDir = new File(libDir, "flexiprep/")
flexiprep.input_R1 = inputFastq
......
......@@ -136,11 +136,11 @@ trait ShivaTrait extends MultiSampleQScript with SummaryQScript with Reference {
case (true, _) => mapping.foreach(mapping => {
mapping.input_R1 = config("R1")
mapping.input_R2 = config("R2")
inputFiles :+= InputFile(mapping.input_R1, config("R1_md5"))
mapping.input_R2.foreach(inputFiles :+= InputFile(_, config("R2_md5")))
inputFiles :+= new InputFile(mapping.input_R1, config("R1_md5"))
mapping.input_R2.foreach(inputFiles :+= new InputFile(_, config("R2_md5")))
})
case (false, true) => {
inputFiles :+= InputFile(config("bam"), config("bam_md5"))
inputFiles :+= new InputFile(config("bam"), config("bam_md5"))
config("bam_to_fastq", default = false).asBoolean match {
case true =>
val samToFastq = SamToFastq(qscript, config("bam"),
......
......@@ -35,7 +35,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
var inputVCF: File = _
def init(): Unit = {
inputFiles :+= InputFile(inputVCF)
inputFiles :+= new 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