From a3af8046e39711a4e60385eb7ab6759adc1fbf37 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Fri, 3 Jul 2015 14:17:01 +0200
Subject: [PATCH] Fix code style warnings

---
 .../bammetrics/BammetricsReport.scala         |  6 ++---
 .../lumc/sasc/biopet/extensions/Bowtie.scala  |  7 +++--
 .../nl/lumc/sasc/biopet/extensions/Cat.scala  |  2 +-
 .../sasc/biopet/extensions/Cutadapt.scala     |  2 +-
 .../sasc/biopet/extensions/Freebayes.scala    |  6 +++--
 .../nl/lumc/sasc/biopet/extensions/Gzip.scala |  2 +-
 .../nl/lumc/sasc/biopet/extensions/Ln.scala   | 14 +++++-----
 .../lumc/sasc/biopet/extensions/Md5sum.scala  |  4 +--
 .../lumc/sasc/biopet/extensions/Pbzip2.scala  |  6 ++---
 .../PythonCommandLineFunction.scala           |  2 +-
 .../lumc/sasc/biopet/extensions/Raxml.scala   |  4 +--
 .../RscriptCommandLineFunction.scala          |  4 ++-
 .../sasc/biopet/extensions/RunGubbins.scala   |  4 +--
 .../lumc/sasc/biopet/extensions/Sha1sum.scala |  2 +-
 .../lumc/sasc/biopet/extensions/Sickle.scala  | 10 +++----
 .../lumc/sasc/biopet/extensions/Stampy.scala  |  4 +--
 .../nl/lumc/sasc/biopet/extensions/Star.scala | 18 ++++++-------
 .../lumc/sasc/biopet/extensions/Tabix.scala   |  2 +-
 .../extensions/VariantEffectPredictor.scala   |  4 +--
 .../nl/lumc/sasc/biopet/extensions/Zcat.scala |  2 +-
 .../extensions/bcftools/BcftoolsCall.scala    |  7 ++---
 .../bedtools/BedtoolsCoverage.scala           |  2 +-
 .../bedtools/BedtoolsIntersect.scala          |  4 +--
 .../extensions/breakdancer/Breakdancer.scala  |  6 ++---
 .../breakdancer/BreakdancerCaller.scala       |  4 +--
 .../breakdancer/BreakdancerConfig.scala       |  6 ++---
 .../breakdancer/BreakdancerVCF.scala          |  2 +-
 .../sasc/biopet/extensions/bwa/BwaAln.scala   |  4 +--
 .../sasc/biopet/extensions/bwa/BwaMem.scala   |  4 +--
 .../sasc/biopet/extensions/bwa/BwaSampe.scala |  4 +--
 .../sasc/biopet/extensions/bwa/BwaSamse.scala |  4 +--
 .../biopet/extensions/clever/Clever.scala     |  6 ++---
 .../extensions/clever/CleverCaller.scala      |  6 ++---
 .../sasc/biopet/extensions/delly/Delly.scala  |  6 ++---
 .../extensions/gatk/CombineVariants.scala     |  6 +++--
 .../sasc/biopet/extensions/gatk/Gatk.scala    |  6 +++--
 .../biopet/extensions/igvtools/IGVTools.scala |  9 ++++---
 .../extensions/igvtools/IGVToolsCount.scala   | 12 ++++-----
 .../biopet/extensions/kraken/Kraken.scala     |  6 ++---
 .../extensions/macs2/Macs2CallPeak.scala      |  2 +-
 .../picard/AddOrReplaceReadGroups.scala       |  2 +-
 .../extensions/picard/BedToIntervalList.scala |  2 ++
 .../picard/CalculateHsMetrics.scala           |  4 +--
 .../CollectAlignmentSummaryMetrics.scala      |  2 +-
 .../picard/CollectGcBiasMetrics.scala         |  6 ++---
 .../picard/CollectInsertSizeMetrics.scala     |  2 +-
 .../picard/CollectMultipleMetrics.scala       | 27 +++++++++----------
 .../picard/CollectRnaSeqMetrics.scala         |  2 +-
 .../picard/CollectTargetedPcrMetrics.scala    |  6 +++--
 .../extensions/picard/CollectWgsMetrics.scala |  6 +++--
 .../extensions/picard/MarkDuplicates.scala    |  4 +--
 .../biopet/extensions/picard/Picard.scala     | 13 ++++-----
 .../biopet/extensions/picard/ReorderSam.scala |  4 +--
 .../biopet/extensions/picard/SortSam.scala    |  6 ++---
 .../biopet/extensions/pindel/Pindel.scala     |  6 ++---
 .../extensions/pindel/PindelCaller.scala      |  4 +--
 .../extensions/pindel/PindelConfig.scala      | 18 ++++++-------
 .../rscript/{XYPlot.scala => LinePlot.scala}  |  4 ++-
 .../extensions/rscript/StackedBarPlot.scala   |  2 ++
 .../extensions/sambamba/SambambaIndex.scala   |  6 ++---
 .../extensions/sambamba/SambambaMarkdup.scala |  4 +--
 .../extensions/samtools/SamtoolsMpileup.scala | 10 +++----
 .../extensions/samtools/SamtoolsView.scala    |  6 ++---
 .../biopet/extensions/seqtk/SeqtkSeq.scala    |  2 +-
 .../extensions/varscan/Mpileup2cns.scala      |  2 +-
 65 files changed, 184 insertions(+), 177 deletions(-)
 rename public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/{XYPlot.scala => LinePlot.scala} (90%)

diff --git a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala b/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
index 44ea111b2..c1fd6bc64 100644
--- a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
+++ b/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
@@ -5,7 +5,7 @@ import java.io.{ File, PrintWriter }
 import nl.lumc.sasc.biopet.core.config.Configurable
 import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportBuilder, ReportPage, ReportSection }
 import nl.lumc.sasc.biopet.core.summary.{ Summary, SummaryValue }
-import nl.lumc.sasc.biopet.extensions.rscript.{ StackedBarPlot, XYPlot }
+import nl.lumc.sasc.biopet.extensions.rscript.{ StackedBarPlot, LinePlot }
 
 class BammetricsReport(val root: Configurable) extends ReportBuilderExtension {
   val builder = BammetricsReport
@@ -204,7 +204,7 @@ object BammetricsReport extends ReportBuilder {
 
     tsvWriter.close()
 
-    val plot = new XYPlot(null)
+    val plot = new LinePlot(null)
     plot.input = tsvFile
     plot.output = pngFile
     plot.ylabel = Some("Reads")
@@ -292,7 +292,7 @@ object BammetricsReport extends ReportBuilder {
 
     tsvWriter.close()
 
-    val plot = new XYPlot(null)
+    val plot = new LinePlot(null)
     plot.input = tsvFile
     plot.output = pngFile
     plot.ylabel = Some("Bases")
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Bowtie.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Bowtie.scala
index d904c8905..83102008d 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Bowtie.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Bowtie.scala
@@ -59,8 +59,8 @@ class Bowtie(val root: Configurable) extends BiopetCommandLineFunction with Refe
   var maqerr: Option[Int] = config("maqerr")
   var maxins: Option[Int] = config("maxins")
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
@@ -81,10 +81,9 @@ class Bowtie(val root: Configurable) extends BiopetCommandLineFunction with Refe
       optional("--maxins", maxins) +
       required(reference) +
       (R2 match {
-        case Some(r2) => {
+        case Some(r2) =>
           required("-1", R1) +
             optional("-2", r2)
-        }
         case _ => required(R1)
       }) +
       " > " + required(output)
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala
index bc7e6acfd..7f2493d57 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala
@@ -52,6 +52,6 @@ object Cat {
     val cat = new Cat(root)
     cat.input = input
     cat.output = output
-    return cat
+    cat
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
index 566396f69..8ab066387 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
@@ -76,7 +76,7 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction with Su
     val stats: mutable.Map[String, Int] = mutable.Map("trimmed" -> 0, "tooshort" -> 0, "toolong" -> 0)
     val adapter_stats: mutable.Map[String, Int] = mutable.Map()
 
-    if (stats_output.exists) for (line <- Source.fromFile(stats_output).getLines) {
+    if (stats_output.exists) for (line <- Source.fromFile(stats_output).getLines()) {
       line match {
         case trimR(m)                 => stats += ("trimmed" -> m.toInt)
         case tooShortR(m)             => stats += ("tooshort" -> m.toInt)
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala
index 9d9fff930..1c15cda9a 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala
@@ -22,6 +22,8 @@ import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Reference }
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
 /**
+ * Extension for freebayes
+ *
  * Created by pjvan_thof on 3/3/15.
  */
 class Freebayes(val root: Configurable) extends BiopetCommandLineFunction with Reference {
@@ -42,8 +44,8 @@ class Freebayes(val root: Configurable) extends BiopetCommandLineFunction with R
   override val versionRegex = """version:  (.*)""".r
   override def versionCommand = executable + " --version"
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala
index 5643fe9f7..2168771f8 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala
@@ -41,6 +41,6 @@ object Gzip {
     val gzip = new Gzip(root)
     gzip.input = input
     gzip.output = output
-    return gzip
+    gzip
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala
index 95c0a3ba9..dfb3d699e 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala
@@ -51,11 +51,11 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
   lazy val cmd: String = {
     lazy val inCanonical: String = {
       // need to remove "/~" to correctly expand path with tilde
-      input.getCanonicalPath().replace("/~", "")
+      input.getCanonicalPath.replace("/~", "")
     }
 
     lazy val outCanonical: String = {
-      output.getCanonicalPath().replace("/~", "")
+      output.getCanonicalPath.replace("/~", "")
     }
 
     lazy val inToks: Array[String] = {
@@ -68,8 +68,8 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
 
     lazy val commonPrefixLength: Int = {
       val maxLength = scala.math.min(inToks.length, outToks.length)
-      var i: Int = 0;
-      while (i < maxLength && inToks(i) == outToks(i)) i += 1;
+      var i: Int = 0
+      while (i < maxLength && inToks(i) == outToks(i)) i += 1
       i
     }
 
@@ -108,11 +108,11 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
     }
   }
 
-  override def run {
+  override def run() {
     val stdout = new StringBuffer()
     val stderr = new StringBuffer()
     val process = Process(cmd).run(ProcessLogger(stdout append _ + "\n", stderr append _ + "\n"))
-    val exitcode = process.exitValue
+    val exitcode = process.exitValue()
     if (exitcode != 0) {
       throw new Exception("Error creating symbolic link, this was the original message: \n" + stderr)
     }
@@ -136,6 +136,6 @@ object Ln {
     ln.input = input
     ln.output = output
     ln.relative = relative
-    return ln
+    ln
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala
index 983886031..0fef34345 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Md5sum.scala
@@ -45,7 +45,7 @@ object Md5sum {
     val md5sum = new Md5sum(root)
     md5sum.input = fastqfile
     md5sum.output = new File(outDir, fastqfile.getName + ".md5")
-    return md5sum
+    md5sum
   }
 
   /** Makes md5sum with md5 file in same dir as input file */
@@ -53,6 +53,6 @@ object Md5sum {
     val md5sum = new Md5sum(root)
     md5sum.input = file
     md5sum.output = new File(file.getParentFile, file.getName + ".md5")
-    return md5sum
+    md5sum
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala
index 782f38003..b0bca5351 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala
@@ -37,8 +37,8 @@ class Pbzip2(val root: Configurable) extends BiopetCommandLineFunction {
   override val defaultCoreMemory = memory.getOrElse(1000).toDouble / 1000
   override val defaultThreads = 2
 
-  override def beforeCmd {
-    if (!memory.isEmpty) memory = Option(memory.get * threads)
+  override def beforeCmd() {
+    if (memory.isDefined) memory = Option(memory.get * threads)
   }
 
   /** return commandline to execute */
@@ -58,6 +58,6 @@ object Pbzip2 {
     val pbzip2 = new Pbzip2(root)
     pbzip2.input = input
     pbzip2.output = output
-    return pbzip2
+    pbzip2
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala
index 5c1b75665..59e4ed04c 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/PythonCommandLineFunction.scala
@@ -57,7 +57,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
   }
 
   /** return basic command to prefix the complete command with */
-  def getPythonCommand(): String = {
+  def getPythonCommand: String = {
     required(executable) + required(python_script)
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
index c6e30d7dd..c2e7e5bca 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
@@ -72,11 +72,11 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
   var executableThreads: Option[String] = config("exe_pthreads")
 
   /** Sets correct output files to job */
-  override def beforeGraph {
+  override def beforeGraph() {
     require(w != null)
     if (threads == 0) threads = getThreads(defaultThreads)
     executable = if (threads > 1 && executableThreads.isDefined) executableThreads.get else executableNonThreads
-    super.beforeGraph
+    super.beforeGraph()
     out :::= List(Some(getInfoFile), getBestTreeFile, getBootstrapFile, getBipartitionsFile).flatten
     f match {
       case "d" if b.isEmpty => for (t <- 0 until N.getOrElse(1)) {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RscriptCommandLineFunction.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RscriptCommandLineFunction.scala
index 2bf749193..cd45ff92b 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RscriptCommandLineFunction.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RscriptCommandLineFunction.scala
@@ -22,6 +22,8 @@ import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
 import scala.sys.process._
 
 /**
+ * General rscript extension
+ *
  * Created by wyleung on 17-2-15.
  */
 trait RscriptCommandLineFunction extends BiopetCommandLineFunction {
@@ -30,7 +32,7 @@ trait RscriptCommandLineFunction extends BiopetCommandLineFunction {
 
   executable = config("exe", default = "Rscript", submodule = "Rscript")
 
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     checkScript()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
index df69543ea..0f86bf810 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
@@ -53,8 +53,8 @@ class RunGubbins(val root: Configurable) extends BiopetCommandLineFunction {
   var noCleanup: Boolean = config("no_cleanup", default = false)
 
   /** Set correct output files */
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     require(outputDirectory != null)
     jobLocalDir = outputDirectory
     if (prefix.isEmpty) prefix = Some(fastafile.getName)
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala
index e1aeff15d..9b21f0afa 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala
@@ -41,6 +41,6 @@ object Sha1sum {
     val sha1sum = new Sha1sum(root)
     sha1sum.input = input
     sha1sum.output = new File(outDir, input.getName + ".sha1")
-    return sha1sum
+    sha1sum
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala
index c1e95e91c..9b387ab44 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala
@@ -62,7 +62,7 @@ class Sickle(val root: Configurable) extends BiopetCommandLineFunction with Summ
   override def versionCommand = executable + " --version"
 
   /** Sets qualityType is still empty */
-  override def beforeGraph {
+  override def beforeGraph() {
     if (qualityType.isEmpty) qualityType = Some(defaultQualityType)
   }
 
@@ -100,22 +100,20 @@ class Sickle(val root: Configurable) extends BiopetCommandLineFunction with Summ
 
     var stats: mutable.Map[String, Int] = mutable.Map()
 
-    if (output_stats.exists) for (line <- Source.fromFile(output_stats).getLines) {
+    if (output_stats.exists) for (line <- Source.fromFile(output_stats).getLines()) {
       line match {
         // single run
         case sKept(num)              => stats += ("num_reads_kept" -> num.toInt)
         case sDiscarded(num)         => stats += ("num_reads_discarded_total" -> num.toInt)
         // paired run
         case pPairKept(reads, pairs) => stats += ("num_reads_kept" -> reads.toInt)
-        case pSingleKept(total, r1, r2) => {
+        case pSingleKept(total, r1, r2) =>
           stats += ("num_reads_kept_R1" -> r1.toInt)
           stats += ("num_reads_kept_R2" -> r2.toInt)
-        }
         case pPairDiscarded(reads, pairs) => stats += ("num_reads_discarded_both" -> reads.toInt)
-        case pSingleDiscarded(total, r1, r2) => {
+        case pSingleDiscarded(total, r1, r2) =>
           stats += ("num_reads_discarded_R1" -> r1.toInt)
           stats += ("num_reads_discarded_R2" -> r2.toInt)
-        }
         case _ =>
       }
     }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala
index 161a3ccf9..1401fc971 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala
@@ -70,8 +70,8 @@ class Stampy(val root: Configurable) extends BiopetCommandLineFunction with Refe
   override def versionCommand = executable + " --help"
 
   /** Sets readgroup when not set yet */
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     require(readgroup != null)
     if (reference == null) reference = referenceFasta()
   }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala
index 11a5c515f..7195916ec 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala
@@ -68,7 +68,7 @@ class Star(val root: Configurable) extends BiopetCommandLineFunction with Refere
 
   /** Sets output files for the graph */
   override def beforeGraph() {
-    super.beforeGraph
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
     genomeDir = config("genomeDir", new File(reference.getAbsoluteFile.getParent, "star"))
     if (outFileNamePrefix != null && !outFileNamePrefix.endsWith(".")) outFileNamePrefix += "."
@@ -111,7 +111,7 @@ object Star {
    * @param R1 R1 fastq file
    * @param R2 R2 fastq file
    * @param outputDir Outputdir for Star
-   * @param isIntermediate
+   * @param isIntermediate When set true jobs are flaged as intermediate
    * @param deps Deps to add to wait on run
    * @return Return Star
    *
@@ -123,8 +123,8 @@ object Star {
     star.outputDir = outputDir
     star.isIntermediate = isIntermediate
     star.deps = deps
-    star.beforeGraph
-    return star
+    star.beforeGraph()
+    star
   }
 
   /**
@@ -133,7 +133,7 @@ object Star {
    * @param R1 R1 fastq file
    * @param R2 R2 fastq file
    * @param outputDir Outputdir for Star
-   * @param isIntermediate
+   * @param isIntermediate When set true jobs are flaged as intermediate
    * @param deps Deps to add to wait on run
    * @return Return Star
    */
@@ -146,21 +146,21 @@ object Star {
     val starCommand_pass1 = Star(configurable, R1, R2, new File(outputDir, "aln-pass1"))
     starCommand_pass1.isIntermediate = isIntermediate
     starCommand_pass1.deps = deps
-    starCommand_pass1.beforeGraph
+    starCommand_pass1.beforeGraph()
 
     val starCommand_reindex = new Star(configurable)
     starCommand_reindex.sjdbFileChrStartEnd = starCommand_pass1.outputTab
     starCommand_reindex.outputDir = new File(outputDir, "re-index")
     starCommand_reindex.runmode = "genomeGenerate"
     starCommand_reindex.isIntermediate = isIntermediate
-    starCommand_reindex.beforeGraph
+    starCommand_reindex.beforeGraph()
 
     val starCommand_pass2 = Star(configurable, R1, R2, new File(outputDir, "aln-pass2"))
     starCommand_pass2.genomeDir = starCommand_reindex.outputDir
     starCommand_pass2.isIntermediate = isIntermediate
     starCommand_pass2.deps = deps
-    starCommand_pass2.beforeGraph
+    starCommand_pass2.beforeGraph()
 
-    return (starCommand_pass2.outputSam, List(starCommand_pass1, starCommand_reindex, starCommand_pass2))
+    (starCommand_pass2.outputSam, List(starCommand_pass1, starCommand_reindex, starCommand_pass2))
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala
index c32326f34..a63f0e931 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala
@@ -66,7 +66,7 @@ class Tabix(val root: Configurable) extends BiopetCommandLineFunction {
   /** Formats that tabix can handle */
   private val validFormats: Set[String] = Set("gff", "bed", "sam", "vcf", "psltbl")
 
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     p match {
       case Some(fmt) =>
         require(validFormats.contains(fmt), "-p flag must be one of " + validFormats.mkString(", "))
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
index 407d42891..c028d135c 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
@@ -141,8 +141,8 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
   var db_version: Option[Int] = config("db_version")
   var buffer_size: Option[Int] = config("buffer_size")
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     if (!cache && !database) {
       throw new IllegalArgumentException("Must supply either cache or database")
     } else if (cache && dir.isEmpty) {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala
index 8eb73021f..65f2a2067 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala
@@ -44,6 +44,6 @@ object Zcat {
     val zcat = new Zcat(root)
     zcat.input = input
     zcat.output = output
-    return zcat
+    zcat
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala
index 433df8105..f79d0fb56 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala
@@ -20,10 +20,7 @@ import java.io.File
 import nl.lumc.sasc.biopet.core.config.Configurable
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
-/**
- * This extension is based on bcftools 1.1-134
- * @param root
- */
+/** This extension is based on bcftools 1.1-134 */
 class BcftoolsCall(val root: Configurable) extends Bcftools {
   @Input(doc = "Input File")
   var input: File = _
@@ -36,7 +33,7 @@ class BcftoolsCall(val root: Configurable) extends Bcftools {
   var c: Boolean = config("c", default = false)
   var m: Boolean = config("m", default = false)
 
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     require(c != m)
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
index 80b3aa8f2..e69431323 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
@@ -43,7 +43,7 @@ class BedtoolsCoverage(val root: Configurable) extends Bedtools {
 
   var inputTag = "-a"
 
-  override def beforeCmd {
+  override def beforeCmd() {
     if (input.getName.endsWith(".bam")) inputTag = "-abam"
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
index 74ec49f49..2f01ca14d 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
@@ -40,7 +40,7 @@ class BedtoolsIntersect(val root: Configurable) extends Bedtools {
 
   var inputTag = "-a"
 
-  override def beforeCmd {
+  override def beforeCmd() {
     if (input.getName.endsWith(".bam")) inputTag = "-abam"
   }
 
@@ -63,6 +63,6 @@ object BedtoolsIntersect {
     bedtoolsIntersect.output = output
     bedtoolsIntersect.minOverlap = minOverlap
     bedtoolsIntersect.count = count
-    return bedtoolsIntersect
+    bedtoolsIntersect
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/Breakdancer.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/Breakdancer.scala
index feab55e49..3674b50f4 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/Breakdancer.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/Breakdancer.scala
@@ -77,8 +77,8 @@ object Breakdancer extends PipelineCommand {
     breakdancer.input = input
     breakdancer.reference = reference
     breakdancer.workdir = runDir
-    breakdancer.init
-    breakdancer.biopetScript
-    return breakdancer
+    breakdancer.init()
+    breakdancer.biopetScript()
+    breakdancer
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala
index 72baafb55..b94e78052 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala
@@ -58,7 +58,7 @@ class BreakdancerCaller(val root: Configurable) extends BiopetCommandLineFunctio
   var h: Boolean = config("h", default = false)
   var y: Option[Int] = config("y", default = 30)
 
-  override def beforeCmd {
+  override def beforeCmd() {
   }
 
   def cmdLine = required(executable) +
@@ -86,6 +86,6 @@ object BreakdancerCaller {
     val bdcaller = new BreakdancerCaller(root)
     bdcaller.input = input
     bdcaller.output = output
-    return bdcaller
+    bdcaller
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala
index 88b8521ad..4f1a22f37 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala
@@ -43,17 +43,17 @@ object BreakdancerConfig {
     val bdconf = new BreakdancerConfig(root)
     bdconf.input = input
     bdconf.output = output
-    return bdconf
+    bdconf
   }
 
   def apply(root: Configurable, input: File, outputDir: String): BreakdancerConfig = {
     val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
     val outputFile = new File(dir + swapExtension(input.getName))
-    return apply(root, input, outputFile)
+    apply(root, input, outputFile)
   }
 
   def apply(root: Configurable, input: File): BreakdancerConfig = {
-    return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
+    apply(root, input, new File(swapExtension(input.getAbsolutePath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.substring(0, inputFile.lastIndexOf(".bam")) + ".breakdancer.cfg"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala
index 986ace419..ce756711a 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala
@@ -42,6 +42,6 @@ object BreakdancerVCF {
     val bd = new BreakdancerVCF(root)
     bd.input = input
     bd.output = output
-    return bd
+    bd
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala
index 17d167579..12055e79b 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala
@@ -64,8 +64,8 @@ class BwaAln(val root: Configurable) extends Bwa with Reference {
   override val defaultCoreMemory = 4.0
   override val defaultThreads = 8
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala
index b2f4c4821..91cde1082 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala
@@ -71,8 +71,8 @@ class BwaMem(val root: Configurable) extends Bwa with Reference {
   override val defaultCoreMemory = 4.0
   override val defaultThreads = 8
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala
index c8f5f11fb..c6afc21d0 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala
@@ -57,8 +57,8 @@ class BwaSampe(val root: Configurable) extends Bwa with Reference {
 
   var r: String = _
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala
index e36369ab1..a2d979ca0 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala
@@ -43,8 +43,8 @@ class BwaSamse(val root: Configurable) extends Bwa with Reference {
   var n: Option[Int] = config("n")
   var r: String = _
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/Clever.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/Clever.scala
index a978cbef4..76436ecd2 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/Clever.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/Clever.scala
@@ -57,9 +57,9 @@ object Clever extends PipelineCommand {
     val cleverpipeline = new Clever(root)
     cleverpipeline.input = input
     cleverpipeline.workdir = runDir
-    cleverpipeline.init
-    cleverpipeline.biopetScript
-    return cleverpipeline
+    cleverpipeline.init()
+    cleverpipeline.biopetScript()
+    cleverpipeline
   }
 
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala
index 642a9c2ad..e8eba06e0 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala
@@ -9,7 +9,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
 class CleverCaller(val root: Configurable) extends BiopetCommandLineFunction {
   executable = config("exe", default = "clever")
 
-  private lazy val versionexecutable: File = config("version_exe", default = (new File(executable).getParent + "/ctk-version"))
+  private lazy val versionexecutable: File = config("version_exe", default = new File(executable).getParent + "/ctk-version")
 
   override val defaultThreads = 8
 
@@ -45,7 +45,7 @@ class CleverCaller(val root: Configurable) extends BiopetCommandLineFunction {
   var k: Boolean = config("k", default = false) // keep working directory
   var r: Boolean = config("r", default = false) // take read groups into account
 
-  override def beforeCmd {
+  override def beforeCmd() {
     if (workdir == null) throw new Exception("Clever :: Workdirectory is not defined")
     //    if (input.getName.endsWith(".sort.bam")) sorted = true
   }
@@ -70,6 +70,6 @@ object CleverCaller {
     clever.reference = reference
     clever.cwd = svDir
     clever.workdir = runDir
-    return clever
+    clever
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/Delly.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/Delly.scala
index 74effc8bc..919adbd26 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/Delly.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/Delly.scala
@@ -107,9 +107,9 @@ object Delly extends PipelineCommand {
     val dellypipeline = new Delly(root)
     dellypipeline.input = input
     dellypipeline.workdir = runDir
-    dellypipeline.init
-    dellypipeline.biopetScript
-    return dellypipeline
+    dellypipeline.init()
+    dellypipeline.biopetScript()
+    dellypipeline
   }
 
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala
index d70c82ec4..1d2c90a5f 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala
@@ -21,6 +21,8 @@ import nl.lumc.sasc.biopet.core.config.Configurable
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
 /**
+ * Extension for CombineVariants from GATK
+ *
  * Created by pjvan_thof on 2/26/15.
  */
 class CombineVariants(val root: Configurable) extends Gatk {
@@ -45,8 +47,8 @@ class CombineVariants(val root: Configurable) extends Gatk {
     inputMap += file -> name
   }
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     genotypeMergeOptions match {
       case Some("UNIQUIFY") | Some("PRIORITIZE") | Some("UNSORTED") | Some("REQUIRE_UNIQUE") | None =>
       case _ => throw new IllegalArgumentException("Wrong option for genotypeMergeOptions")
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala
index a6e2e7561..448736ae1 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala
@@ -21,6 +21,8 @@ import nl.lumc.sasc.biopet.core.{ BiopetJavaCommandLineFunction, Reference }
 import org.broadinstitute.gatk.utils.commandline.Input
 
 /**
+ * General extension for GATK module
+ *
  * Created by pjvan_thof on 2/26/15.
  */
 abstract class Gatk extends BiopetJavaCommandLineFunction with Reference {
@@ -54,8 +56,8 @@ abstract class Gatk extends BiopetJavaCommandLineFunction with Reference {
   override def getVersion = super.getVersion.collect { case version => "Gatk " + version }
   override def dictRequired = true
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala
index d0785a24c..e4e2e63d1 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala
@@ -13,15 +13,16 @@
  * license; For commercial users or users who do not want to follow the AGPL
  * license, please contact us to obtain a separate license.
  */
-/**
- * Created by wyleung on 5-1-15.
- */
 
 package nl.lumc.sasc.biopet.extensions.igvtools
 
 import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
 
-/** General igvtools extension */
+/**
+ * General igvtools extension
+ *
+ * Created by wyleung on 5-1-15
+ */
 abstract class IGVTools extends BiopetCommandLineFunction {
   executable = config("exe", default = "igvtools", submodule = "igvtools", freeVar = false)
   override def versionCommand = executable + " version"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
index c7da6a87b..d34f9e711 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
@@ -62,13 +62,13 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
 
   override val defaultCoreMemory = 4.0
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
 
     (tdf, wig) match {
-      case (Some(tdf), _) => jobLocalDir = tdf.getParentFile
-      case (_, Some(wig)) => jobLocalDir = wig.getParentFile
-      case _              => throw new IllegalArgumentException("Must have a wig or tdf file")
+      case (Some(t), _) => jobLocalDir = t.getParentFile
+      case (_, Some(w)) => jobLocalDir = w.getParentFile
+      case _            => throw new IllegalArgumentException("Must have a wig or tdf file")
     }
 
     wig.foreach(x => if (!x.getAbsolutePath.endsWith(".wig"))
@@ -123,6 +123,6 @@ object IGVToolsCount {
     val counting = new IGVToolsCount(root)
     counting.input = input
     counting.genomeChromSizes = genomeChromSizes
-    return counting
+    counting
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala
index f0ecc2452..d4e15f29b 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala
@@ -58,8 +58,8 @@ class Kraken(val root: Configurable) extends BiopetCommandLineFunction {
   override def versionCommand = executable + " --version"
 
   /** Sets readgroup when not set yet */
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
   }
 
   /** Returns command to execute */
@@ -68,7 +68,7 @@ class Kraken(val root: Configurable) extends BiopetCommandLineFunction {
       "--db" + required(db) +
       optional("--threads", nCoresRequest) +
       conditional(inputFastQ, "--fastq-input") +
-      conditional(inputFastQ == false, "--fasta-input") +
+      conditional(!inputFastQ, "--fasta-input") +
       conditional(quick, "--quick")
 
     min_hits match {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala
index 1401ac86c..f96b9b80f 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala
@@ -74,7 +74,7 @@ class Macs2CallPeak(val root: Configurable) extends Macs2 {
   var callsummits: Boolean = config("callsummits", default = false)
 
   /** Sets output files */
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     if (name.isEmpty) throw new IllegalArgumentException("Name is not defined")
     if (outputdir == null) throw new IllegalArgumentException("Outputdir is not defined")
     output_narrow = new File(outputdir + name.get + ".narrowPeak")
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala
index 3ee970e3f..0df7dffef 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala
@@ -87,6 +87,6 @@ object AddOrReplaceReadGroups {
     addOrReplaceReadGroups.output = output
     if (sortOrder == null) addOrReplaceReadGroups.sortOrder = "coordinate"
     else addOrReplaceReadGroups.sortOrder = sortOrder
-    return addOrReplaceReadGroups
+    addOrReplaceReadGroups
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala
index c30364f79..1959de662 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala
@@ -7,6 +7,8 @@ import nl.lumc.sasc.biopet.core.config.Configurable
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
 /**
+ * Extension for piacrd's BedToIntervalList tool
+ *
  * Created by pjvan_thof on 4/15/15.
  */
 class BedToIntervalList(val root: Configurable) extends Picard with Reference {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala
index 5ae220f04..ac69069e3 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala
@@ -50,8 +50,8 @@ class CalculateHsMetrics(val root: Configurable) extends Picard with Summarizabl
   @Argument(doc = "BAIT_SET_NAME", required = false)
   var baitSetName: String = _
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala
index 47203bdfd..3a456cede 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala
@@ -76,6 +76,6 @@ object CollectAlignmentSummaryMetrics {
     val collectAlignmentSummaryMetrics = new CollectAlignmentSummaryMetrics(root)
     collectAlignmentSummaryMetrics.input = input
     collectAlignmentSummaryMetrics.output = new File(outputDir, input.getName.stripSuffix(".bam") + ".alignmentMetrics")
-    return collectAlignmentSummaryMetrics
+    collectAlignmentSummaryMetrics
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala
index 8b14b31cb..167aeca9b 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala
@@ -53,8 +53,8 @@ class CollectGcBiasMetrics(val root: Configurable) extends Picard with Summariza
   @Argument(doc = "IS_BISULFITE_SEQUENCED", required = false)
   var isBisulfiteSequinced: Option[Boolean] = config("isbisulfitesequinced")
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (outputChart == null) outputChart = new File(output + ".pdf")
     if (reference == null) reference = referenceFasta()
   }
@@ -84,6 +84,6 @@ object CollectGcBiasMetrics {
     val collectGcBiasMetrics = new CollectGcBiasMetrics(root)
     collectGcBiasMetrics.input :+= input
     collectGcBiasMetrics.output = new File(outputDir, input.getName.stripSuffix(".bam") + ".gcbiasmetrics")
-    return collectGcBiasMetrics
+    collectGcBiasMetrics
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala
index 09e38eb9f..c5f4c5a8a 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala
@@ -57,7 +57,7 @@ class CollectInsertSizeMetrics(val root: Configurable) extends Picard with Summa
   @Argument(doc = "HISTOGRAM_WIDTH", required = false)
   var histogramWidth: Option[Int] = config("histogramWidth")
 
-  override def beforeGraph {
+  override def beforeGraph() {
     outputHistogram = new File(output + ".pdf")
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala
index 425cc98e9..5b54455e7 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala
@@ -8,6 +8,8 @@ import nl.lumc.sasc.biopet.core.summary.{ Summarizable, SummaryQScript }
 import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
 
 /**
+ * Extension for piacrd's CollectMultipleMetrics tool
+ *
  * Created by pjvan_thof on 4/16/15.
  */
 class CollectMultipleMetrics(val root: Configurable) extends Picard with Summarizable {
@@ -36,29 +38,24 @@ class CollectMultipleMetrics(val root: Configurable) extends Picard with Summari
   @Output
   protected var outputFiles: List[File] = Nil
 
-  override def beforeGraph: Unit = {
-    program.foreach(p => p match {
-      case _ if p == Programs.CollectAlignmentSummaryMetrics.toString => {
+  override def beforeGraph(): Unit = {
+    program.foreach {
+      case p if p == Programs.CollectAlignmentSummaryMetrics.toString =>
         outputFiles :+= new File(outputName + ".alignment_summary_metrics")
-      }
-      case _ if p == Programs.CollectInsertSizeMetrics.toString => {
+      case p if p == Programs.CollectInsertSizeMetrics.toString =>
         outputFiles :+= new File(outputName + ".insert_size_metrics")
         outputFiles :+= new File(outputName + ".insert_size_histogram.pdf")
-      }
-      case _ if p == Programs.QualityScoreDistribution.toString => {
+      case p if p == Programs.QualityScoreDistribution.toString =>
         outputFiles :+= new File(outputName + ".quality_distribution_metrics")
         outputFiles :+= new File(outputName + ".test.quality_distribution.pdf")
-      }
-      case _ if p == Programs.MeanQualityByCycle.toString => {
+      case p if p == Programs.MeanQualityByCycle.toString =>
         outputFiles :+= new File(outputName + ".quality_by_cycle_metrics")
         outputFiles :+= new File(outputName + ".quality_by_cycle.pdf")
-      }
-      case _ if p == Programs.CollectBaseDistributionByCycle.toString => {
+      case p if p == Programs.CollectBaseDistributionByCycle.toString =>
         outputFiles :+= new File(outputName + ".base_distribution_by_cycle_metrics")
         outputFiles :+= new File(outputName + ".base_distribution_by_cycle.pdf")
-      }
-      case _ => BiopetQScript.addError("Program '" + p + "' does not exist for 'CollectMultipleMetrics'")
-    })
+      case p => BiopetQScript.addError("Program '" + p + "' does not exist for 'CollectMultipleMetrics'")
+    }
   }
 
   override def commandLine = super.commandLine +
@@ -104,7 +101,7 @@ class CollectMultipleMetrics(val root: Configurable) extends Picard with Summari
           "insert_size_histogram" -> new File(outputName + ".insert_size_histogram.pdf"),
           "insert_size_metrics" -> new File(outputName + ".insert_size_metrics"))
       case otherwise => Map()
-    }.foldLeft(Map.empty[String, File]) { case (acc, m) => (acc ++ m) }
+    }.foldLeft(Map.empty[String, File]) { case (acc, m) => acc ++ m }
   }
 }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala
index 999fa8d44..334741278 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala
@@ -68,7 +68,7 @@ class CollectRnaSeqMetrics(val root: Configurable) extends Picard with Summariza
   @Argument(doc = "Stop after processing N reads", required = false)
   var stopAfter: Option[Long] = config("stop_after")
 
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     if (refFlat == null) refFlat = config("refFlat")
     val validFlags = StrandSpecificity.values.map(_.toString).toSet
     strandSpecificity match {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala
index 87f241d66..c01bb0b69 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala
@@ -8,6 +8,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable
 import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
 
 /**
+ * Extension for piacrd's CollectTargetedPcrMetrics
+ *
  * Created by pjvan_thof on 4/16/15.
  */
 class CollectTargetedPcrMetrics(val root: Configurable) extends Picard with Summarizable with Reference {
@@ -38,8 +40,8 @@ class CollectTargetedPcrMetrics(val root: Configurable) extends Picard with Summ
   @Argument(doc = "CUSTOM_AMPLICON_SET_NAME", required = false)
   var customAmpliconSetName: Option[String] = config("custom_amplicon_set_name")
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala
index 0f2956cb9..99b21139f 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala
@@ -8,6 +8,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable
 import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
 
 /**
+ * Extension for piacrda's CollectWgsMetrics
+ *
  * Created by pjvan_thof on 4/16/15.
  */
 class CollectWgsMetrics(val root: Configurable) extends Picard with Summarizable with Reference {
@@ -38,8 +40,8 @@ class CollectWgsMetrics(val root: Configurable) extends Picard with Summarizable
   @Argument(doc = "INCLUDE_BQ_HISTOGRAM", required = false)
   var includeBqHistogram: Boolean = config("include_bq_histogram", default = false)
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala
index 961adf761..310d81d79 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala
@@ -74,8 +74,8 @@ class MarkDuplicates(val root: Configurable) extends Picard with Summarizable {
   @Output(doc = "Bam Index", required = true)
   private var outputIndex: File = _
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (createIndex) outputIndex = new File(output.getAbsolutePath.stripSuffix(".bam") + ".bai")
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala
index b8f745bc3..2393f1c34 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala
@@ -111,20 +111,18 @@ object Picard extends Logging {
   def getMetrics(file: File, tag: String = "METRICS CLASS",
                  groupBy: Option[String] = None): Option[Any] = {
     getMetricsContent(file, tag) match {
-      case Some((header, content)) => {
+      case Some((header, content)) =>
         (content.size, groupBy) match {
-          case (_, Some(group)) => {
+          case (_, Some(group)) =>
             val groupId = header.indexOf(group)
             if (groupId == -1) throw new IllegalArgumentException(group + " not existing in header of: " + file)
             if (header.count(_ == group) > 1) logger.warn(group + " multiple times seen in header of: " + file)
-            Some((for (c <- content) yield c(groupId).toString() -> {
+            Some((for (c <- content) yield c(groupId).toString -> {
               header.filter(_ != group).zip(c.take(groupId) ::: c.takeRight(c.size - groupId - 1)).toMap
             }).toMap)
-          }
           case (1, _) => Some(header.zip(content.head).toMap)
           case _      => Some(header :: content)
         }
-      }
       case _ => None
     }
   }
@@ -137,10 +135,9 @@ object Picard extends Logging {
    */
   def getHistogram(file: File, tag: String = "HISTOGRAM") = {
     getMetricsContent(file, tag) match {
-      case Some((header, content)) => {
+      case Some((header, content)) =>
         val colums = header.zipWithIndex.map(x => x._1 -> content.map(_.lift(x._2))).toMap
         Some(colums)
-      }
       case _ => None
     }
   }
@@ -160,7 +157,7 @@ object Picard extends Logging {
 
       val header = lines(start).split("\t").toList
       val content = (for (i <- (start + 1) until end) yield {
-        lines(i).split("\t").map(v => tryToParseNumber(v, true).getOrElse(v)).toList
+        lines(i).split("\t").map(v => tryToParseNumber(v, fallBack = true).getOrElse(v)).toList
       }).toList
 
       Some(header, content)
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala
index 60c83a5a6..2acc114d0 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala
@@ -40,8 +40,8 @@ class ReorderSam(val root: Configurable) extends Picard with Reference {
   @Argument(doc = "Allow contig length discordance", required = false)
   var allowContigLengthDiscordance: Boolean = config("allow_contig_length_discordance", default = false)
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     if (reference == null) reference = referenceFasta()
   }
 
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala
index defef17b6..918ad6561 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala
@@ -36,8 +36,8 @@ class SortSam(val root: Configurable) extends Picard {
   @Output(doc = "Bam Index", required = true)
   private var outputIndex: File = _
 
-  override def beforeGraph {
-    super.beforeGraph
+  override def beforeGraph() {
+    super.beforeGraph()
     if (createIndex) outputIndex = new File(output.getAbsolutePath.stripSuffix(".bam") + ".bai")
   }
 
@@ -56,6 +56,6 @@ object SortSam {
     sortSam.output = output
     if (sortOrder == null) sortSam.sortOrder = "coordinate"
     else sortSam.sortOrder = sortOrder
-    return sortSam
+    sortSam
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/Pindel.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/Pindel.scala
index ec5bc003c..193944576 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/Pindel.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/Pindel.scala
@@ -79,8 +79,8 @@ object Pindel extends PipelineCommand {
     pindel.reference = reference
     pindel.workdir = runDir
     // run the following for activating the pipeline steps
-    pindel.init
-    pindel.biopetScript
-    return pindel
+    pindel.init()
+    pindel.biopetScript()
+    pindel
   }
 }
\ No newline at end of file
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
index c1be1512b..588f5aeb5 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
@@ -51,7 +51,7 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction {
 
   var window_size: Option[Int] = config("window_size", default = 5)
 
-  override def beforeCmd {
+  override def beforeCmd() {
   }
 
   def cmdLine = required(executable) +
@@ -67,6 +67,6 @@ object PindelCaller {
     val caller = new PindelCaller(root)
     caller.input = input
     caller.output = output
-    return caller
+    caller
   }
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala
index ad6ce31f5..4ca3f9e2c 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala
@@ -43,17 +43,17 @@ object PindelConfig extends ToolCommand {
     val conf = new PindelConfig(root)
     conf.input = input
     conf.output = output
-    return conf
+    conf
   }
 
   def apply(root: Configurable, input: File, outputDir: String): PindelConfig = {
     val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
     val outputFile = new File(dir + swapExtension(input.getName))
-    return apply(root, input, outputFile)
+    apply(root, input, outputFile)
   }
 
   def apply(root: Configurable, input: File): PindelConfig = {
-    return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
+    apply(root, input, new File(swapExtension(input.getAbsolutePath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.substring(0, inputFile.lastIndexOf(".bam")) + ".pindel.cfg"
@@ -61,15 +61,15 @@ object PindelConfig extends ToolCommand {
   case class Args(inputbam: File = null, samplelabel: Option[String] = None, insertsize: Option[Int] = None) extends AbstractArgs
 
   class OptParser extends AbstractOptParser {
-    opt[File]('i', "inputbam") required () valueName ("<bamfile/path>") action { (x, c) =>
+    opt[File]('i', "inputbam") required () valueName "<bamfile/path>" action { (x, c) =>
       c.copy(inputbam = x)
-    } text ("Please specify the input bam file")
-    opt[String]('l', "samplelabel") valueName ("<sample label>") action { (x, c) =>
+    } text "Please specify the input bam file"
+    opt[String]('l', "samplelabel") valueName "<sample label>" action { (x, c) =>
       c.copy(samplelabel = Some(x))
-    } text ("Sample label is missing")
-    opt[Int]('s', "insertsize") valueName ("<insertsize>") action { (x, c) =>
+    } text "Sample label is missing"
+    opt[Int]('s', "insertsize") valueName "<insertsize>" action { (x, c) =>
       c.copy(insertsize = Some(x))
-    } text ("Insertsize is missing")
+    } text "Insertsize is missing"
   }
 
   /**
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/XYPlot.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/LinePlot.scala
similarity index 90%
rename from public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/XYPlot.scala
rename to public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/LinePlot.scala
index bfaea7240..7aac8a25c 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/XYPlot.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/LinePlot.scala
@@ -7,9 +7,11 @@ import nl.lumc.sasc.biopet.extensions.RscriptCommandLineFunction
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
 /**
+ * Extension for en general line plot with R
+ *
  * Created by pjvan_thof on 4/29/15.
  */
-class XYPlot(val root: Configurable) extends RscriptCommandLineFunction {
+class LinePlot(val root: Configurable) extends RscriptCommandLineFunction {
   protected var script: File = config("script", default = "plotXY.R")
 
   @Input
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
index fb18463d5..e1da630b1 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/rscript/StackedBarPlot.scala
@@ -7,6 +7,8 @@ import nl.lumc.sasc.biopet.extensions.RscriptCommandLineFunction
 import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 
 /**
+ * Extension for en general stackedbar plot with R
+ *
  * Created by pjvan_thof on 4/29/15.
  */
 class StackedBarPlot(val root: Configurable) extends RscriptCommandLineFunction {
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala
index a508c9716..7eeb94ae9 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala
@@ -43,17 +43,17 @@ object SambambaIndex {
     val indexer = new SambambaIndex(root)
     indexer.input = input
     indexer.output = output
-    return indexer
+    indexer
   }
 
   def apply(root: Configurable, input: File, outputDir: String): SambambaIndex = {
     val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
     val outputFile = new File(dir + swapExtension(input.getName))
-    return apply(root, input, outputFile)
+    apply(root, input, outputFile)
   }
 
   def apply(root: Configurable, input: File): SambambaIndex = {
-    return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
+    apply(root, input, new File(swapExtension(input.getAbsolutePath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.stripSuffix(".bam") + ".bam.bai"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala
index 81d87dc3a..f41cc8862 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala
@@ -56,11 +56,11 @@ object SambambaMarkdup {
     val markdup = new SambambaMarkdup(root)
     markdup.input = input
     markdup.output = output
-    return markdup
+    markdup
   }
 
   def apply(root: Configurable, input: File): SambambaMarkdup = {
-    return apply(root, input, new File(swapExtension(input.getCanonicalPath)))
+    apply(root, input, new File(swapExtension(input.getCanonicalPath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.stripSuffix(".bam") + ".dedup.bam"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala
index bf3c73492..efb851cca 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala
@@ -42,8 +42,8 @@ class SamtoolsMpileup(val root: Configurable) extends Samtools with Reference {
   var depth: Option[Int] = config("depth")
   var outputMappingQuality: Boolean = config("output_mapping_quality", default = false)
 
-  override def beforeGraph: Unit = {
-    super.beforeGraph
+  override def beforeGraph(): Unit = {
+    super.beforeGraph()
     reference = referenceFasta()
   }
 
@@ -69,17 +69,17 @@ object SamtoolsMpileup {
     val mpileup = new SamtoolsMpileup(root)
     mpileup.input = List(input)
     mpileup.output = output
-    return mpileup
+    mpileup
   }
 
   def apply(root: Configurable, input: File, outputDir: String): SamtoolsMpileup = {
     val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
     val outputFile = new File(dir + swapExtension(input.getName))
-    return apply(root, input, outputFile)
+    apply(root, input, outputFile)
   }
 
   def apply(root: Configurable, input: File): SamtoolsMpileup = {
-    return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
+    apply(root, input, new File(swapExtension(input.getAbsolutePath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.stripSuffix(".bam") + ".mpileup"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala
index 26cbc7c28..f340dec71 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala
@@ -53,17 +53,17 @@ object SamtoolsView {
     val view = new SamtoolsView(root)
     view.input = input
     view.output = output
-    return view
+    view
   }
 
   def apply(root: Configurable, input: File, outputDir: String): SamtoolsView = {
     val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
     val outputFile = new File(dir + swapExtension(input.getName))
-    return apply(root, input, outputFile)
+    apply(root, input, outputFile)
   }
 
   def apply(root: Configurable, input: File): SamtoolsView = {
-    return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
+    apply(root, input, new File(swapExtension(input.getAbsolutePath)))
   }
 
   private def swapExtension(inputFile: String) = inputFile.stripSuffix(".bam") + ".mpileup"
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala
index 55b4e4bcd..04dfce893 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala
@@ -41,7 +41,7 @@ class SeqtkSeq(val root: Configurable) extends Seqtk with Summarizable {
   /** masked bases converted to CHAR; 0 for lowercase [0] */
   var n: Option[String] = config("n")
 
-  /** number of residues per line; 0 for 2^32-1 [0] */
+  /** number of residues per line; 0 for 2&#94;32-1 [0] */
   var l: Option[Int] = config("l")
 
   /** quality shift: ASCII-INT gives base quality [33] */
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala
index 7aaab9bf6..0bfd114d9 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala
@@ -39,7 +39,7 @@ class Mpileup2cns(val root: Configurable) extends Varscan {
   var vcfSampleList: Option[File] = config("vcf_sample_list")
   var variants: Option[Int] = config("variants")
 
-  override def beforeGraph: Unit = {
+  override def beforeGraph(): Unit = {
     val validValues: Set[Int] = Set(0, 1)
     // check for boolean vars that are passed as ints
     strandFilter.foreach { case v => require(validValues.contains(v), "strand_filter value must be either 0 or 1") }
-- 
GitLab