Commit ee949ad1 authored by Peter van 't Hof's avatar Peter van 't Hof

Fixing code warnings

parent cefa43a5
......@@ -62,7 +62,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
var fastqcR1After: Fastqc = _
var fastqcR2After: Fastqc = _
override def reportClass = {
override def reportClass: Some[FlexiprepReport] = {
val flexiprepReport = new FlexiprepReport(this)
flexiprepReport.outputDir = new File(outputDir, "report")
flexiprepReport.summaryFile = summaryFile
......@@ -74,6 +74,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
/** Function that's need to be executed before the script is accessed */
def init() {
paired = inputR2.isDefined
if (inputR1 == null) Logging.addError("Missing input R1 on flexiprep module")
if (sampleId == null || sampleId.isEmpty) Logging.addError("Missing sample ID on flexiprep module")
if (libId == null || libId.isEmpty) Logging.addError("Missing library ID on flexiprep module")
......@@ -147,10 +148,10 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
}
}
def fastqR1Qc = if (paired)
def fastqR1Qc: File = if (paired)
new File(outputDir, s"${sampleId.getOrElse("x")}-${libId.getOrElse("x")}.R1.qc.sync.fq.gz")
else new File(outputDir, s"${sampleId.getOrElse("x")}-${libId.getOrElse("x")}.R1.qc.fq.gz")
def fastqR2Qc = if (paired)
def fastqR2Qc: Option[File] = if (paired)
Some(new File(outputDir, s"${sampleId.getOrElse("x")}-${libId.getOrElse("x")}.R2.qc.sync.fq.gz"))
else None
......@@ -225,7 +226,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
/** Must returns stats to store into summary */
def summaryStats: Any = Map()
override def summaryDeps = qcCmdR1.summaryDeps ::: qcCmdR2.summaryDeps ::: super.summaryDeps
override def summaryDeps: List[File] = qcCmdR1.summaryDeps ::: qcCmdR2.summaryDeps ::: super.summaryDeps
}
pipe.deps ::= fastqcR1.output
......
......@@ -31,7 +31,7 @@ import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import nl.lumc.sasc.biopet.pipelines.flexiprep.Flexiprep
import nl.lumc.sasc.biopet.pipelines.gears.GearsSingle
import nl.lumc.sasc.biopet.pipelines.mapping.scripts.TophatRecondition
import nl.lumc.sasc.biopet.utils.{ Logging, textToSize }
import nl.lumc.sasc.biopet.utils.textToSize
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......@@ -127,7 +127,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
})
/** Settings to add to summary */
def summarySettings = Map(
def summarySettings: Map[String, Any] = Map(
"skip_metrics" -> skipMetrics,
"skip_flexiprep" -> skipFlexiprep,
"skip_markduplicates" -> skipMarkduplicates,
......@@ -137,7 +137,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
"number_of_chunks" -> (if (chunking) numberChunks.getOrElse(1) else None)
) ++ (if (root == null) Map("reference" -> referenceSummary) else Map())
override def reportClass = {
override def reportClass: Some[MappingReport] = {
val mappingReport = new MappingReport(this)
mappingReport.outputDir = new File(outputDir, "report")
mappingReport.summaryFile = summaryFile
......@@ -295,7 +295,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
addSummaryJobs()
}
protected lazy val bam2wig = if (config("generate_wig", default = false)) {
protected lazy val bam2wig: Option[Bam2Wig] = if (config("generate_wig", default = false)) {
Some(Bam2Wig(this, finalBamFile))
} else None
......
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