Shiva.scala 1.25 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1
2
package nl.lumc.sasc.biopet.pipelines.shiva.template

3
4
import java.io.File

5
6
import nl.lumc.sasc.biopet.core.TemplateTool
import nl.lumc.sasc.biopet.pipelines.mapping.template.MultiSampleMapping
7
import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling
8
import nl.lumc.sasc.biopet.utils.Question
Peter van 't Hof's avatar
Peter van 't Hof committed
9
10

/**
Peter van 't Hof's avatar
Peter van 't Hof committed
11
12
 * Created by pjvanthof on 17/12/2016.
 */
Peter van 't Hof's avatar
Peter van 't Hof committed
13
object Shiva extends TemplateTool {
14

Peter van 't Hof's avatar
Peter van 't Hof committed
15
16
17
  def pipelineName = "Shiva"

  override def sampleConfigs: List[File] = TemplateTool.askSampleConfigs()
18

19
20
21
22
  def possibleVariantcallers: List[String] = {
    ShivaVariantcalling.callersList(null).map(_.name)
  }

Peter van 't Hof's avatar
Peter van 't Hof committed
23
  def pipelineMap(map: Map[String, Any], expert: Boolean): Map[String, Any] = {
24
25
26
27
28
29
30
31
32
33
34
    val mappingConfig = MultiSampleMapping.pipelineMap(map, expert)

    val variantCallers = Question.list("Variantcallers", posibleValues = possibleVariantcallers,
      default = Some(List("haplotypecaller_gvcf", "haplotypecaller")))
    val useIndelRealigner = Question.boolean("Use indel realigner", default = Some(true))
    val useBaseRecalibration = Question.boolean("Use base recalibration", default = Some(true))

    mappingConfig ++ Map(
      "variantcallers" -> variantCallers,
      "use_indel_realigner" -> useIndelRealigner,
      "use_base_recalibration" -> useBaseRecalibration
Peter van 't Hof's avatar
Peter van 't Hof committed
35
    )
Peter van 't Hof's avatar
Peter van 't Hof committed
36
37
  }
}