MultiSampleMapping.scala 1.01 KB
Newer Older
1
2
3
4
package nl.lumc.sasc.biopet.pipelines.mapping.template

import java.io.File

Peter van 't Hof's avatar
Peter van 't Hof committed
5
import nl.lumc.sasc.biopet.core.{ Reference, TemplateTool }
6
7
8
import nl.lumc.sasc.biopet.utils.Question

/**
Peter van 't Hof's avatar
Peter van 't Hof committed
9
10
 * Created by pjvanthof on 17/12/2016.
 */
11
12
13
14
15
16
17
18
19
20
21
object MultiSampleMapping extends TemplateTool {

  override lazy val sampleConfigs: List[File] = TemplateTool.askSampleConfigs()

  def possibleAligners = List("bwa-mem", "bwa-aln", "bowtie", "bowtie2", "gsnap", "hisat2",
    "tophat", "stampy", "star", "star-2pass")

  def pipelineMap(map: Map[String, Any], expert: Boolean): Map[String, Any] = {
    val referenceConfig = map ++ Reference.askReference

    val aligner = if (map.contains("aligner")) map("aligner").toString
Peter van 't Hof's avatar
Peter van 't Hof committed
22
    else Question.string("Aligner", posibleValues = possibleAligners, default = Some("bwa-mem"))
Peter van 't Hof's avatar
Peter van 't Hof committed
23
    val mappingToGears = Question.string("Aligner", posibleValues = List("none", "all", "unmapped"), default = Some("none"))
24
25

    referenceConfig ++ Map(
Peter van 't Hof's avatar
Peter van 't Hof committed
26
27
      "aligner" -> aligner,
      "mapping_to_gears" -> mappingToGears
Peter van 't Hof's avatar
Peter van 't Hof committed
28
    )
29
30
  }
}