PlotHeatmap.scala 963 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
 * Copyright (c) 2014 Leiden University Medical Center
 *
 * @author  Wibowo Arindrarto
 */

package nl.lumc.sasc.biopet.pipelines.gentrap.scripts

import java.io.File

import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.RScriptCommandLineFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }

/**
 * Wrapper for the plot_heatmap.R script, used internally in Gentrap
 */
class PlotHeatmap(val root: Configurable) extends RScriptCommandLineFunction {

  setRScript("plot_heatmap.R", "/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/")

  @Input(doc = "Input table", required = true)
  var input: File = null

  @Output(doc = "Output plot", required = false)
  var output: File = null

  var tmmNormalize: Boolean = config("tmm_normalize", default = false)

  def cmdLine = {
    RScriptCommand +
      conditional(tmmNormalize, "-T") +
      required("-I", input) +
      required("-O", output)
  }
}