BiopetPipeline.scala 1.36 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1
package org.example.group.pipelines
2
3
4
5

import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.pipelines.shiva.Shiva
Peter van 't Hof's avatar
Peter van 't Hof committed
6
import nl.lumc.sasc.biopet.utils.config.Configurable
7
8
9
10
11
import org.broadinstitute.gatk.queue.QScript

/**
 * Created by pjvan_thof on 8/28/15.
 */
12
13
//TODO: Replace class Name
class BiopetPipeline(val root: Configurable) extends QScript with SummaryQScript {
14
15
  def this() = this(null)

16
  /** Only required when using [[SummaryQScript]] */
17
18
  def summaryFile = new File(outputDir, "magpie.summary.json")

19
  /** Only required when using [[SummaryQScript]] */
20
21
  def summaryFiles: Map[String, File] = Map()

22
  /** Only required when using [[SummaryQScript]] */
23
24
  def summarySettings = Map()

25
  // This method can be used to initialize some classes where needed
26
27
28
  def init(): Unit = {
  }

29
  // This method is the actual pipeline
30
  def biopetScript: Unit = {
31
32

    // Executing a biopet pipeline inside
33
    val shiva = new Shiva(this)
34
35
    add(shiva)

36
37
38
39
    shiva.init()
    shiva.biopetScript()
    addAll(shiva.functions)

40
    /* Only required when using [[SummaryQScript]] */
41
    addSummaryQScript(shiva)
Peter van 't Hof's avatar
Peter van 't Hof committed
42
43

    // From here you can use the output files of shiva as input file of other jobs
44
45
46
  }
}

47
48
//TODO: Replace object Name, must be the same as the class of the pipeline
object BiopetPipeline extends PipelineCommand