BwaAln.scala 2.26 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1
2
3
4
5
6
7
8
package nl.lumc.sasc.biopet.extensions.bwa

import java.io.File

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

/**
Peter van 't Hof's avatar
Peter van 't Hof committed
9
10
11
12
 * Extension for bwa aln
 *
 * Based on version 0.7.12-r1039
 *
Peter van 't Hof's avatar
Peter van 't Hof committed
13
14
15
16
17
18
19
 * Created by pjvan_thof on 1/16/15.
 */
class BwaAln(val root: Configurable) extends Bwa {
  @Input(doc = "Fastq file", required = true)
  var fastq: File = _

  @Input(doc = "The reference file for the bam files.", required = true)
20
  var reference: File = config("reference")
Peter van 't Hof's avatar
Peter van 't Hof committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

  @Output(doc = "Output file SAM", required = false)
  var output: File = _

  var n: Option[Int] = config("n")
  var o: Option[Int] = config("o")
  var e: Option[Int] = config("e")
  var i: Option[Int] = config("i")
  var d: Option[Int] = config("d")
  var l: Option[Int] = config("l")
  var k: Option[Int] = config("k")
  var m: Option[Int] = config("m")
  var M: Option[Int] = config("M")
  var O: Option[Int] = config("O")
  var E: Option[Int] = config("E")
  var R: Option[Int] = config("R")
  var q: Option[Int] = config("q")
  var B: Option[Int] = config("B")
  var L: Boolean = config("L", default = false)
  var N: Boolean = config("N", default = false)
  var I: Boolean = config("I", default = false)
  var b: Boolean = config("b", default = false)
  var n0: Boolean = config("0", default = false)
  var n1: Boolean = config("1", default = false)
  var n2: Boolean = config("2", default = false)
  var Y: Boolean = config("Y", default = false)

  override val defaultVmem = "5G"
  override val defaultThreads = 8

Peter van 't Hof's avatar
Peter van 't Hof committed
51
  /** Returns command to execute */
Peter van 't Hof's avatar
Peter van 't Hof committed
52
53
  def cmdLine = required(executable) +
    required("aln") +
54
    optional("-t", threads) +
Peter van 't Hof's avatar
Peter van 't Hof committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    optional("-n", n) +
    optional("-o", o) +
    optional("-e", e) +
    optional("-i", i) +
    optional("-d", d) +
    optional("-l", l) +
    optional("-k", k) +
    optional("-m", m) +
    optional("-M", M) +
    optional("-O", O) +
    optional("-E", E) +
    optional("-R", R) +
    optional("-q", q) +
    optional("-B", B) +
    conditional(L, "-L") +
    conditional(N, "-N") +
    conditional(I, "-I") +
    conditional(b, "-b") +
    conditional(n0, "-0") +
    conditional(n1, "-1") +
    conditional(n2, "-2") +
    conditional(Y, "-Y") +
Peter van 't Hof's avatar
Peter van 't Hof committed
77
    optional("-f", output) +
Peter van 't Hof's avatar
Peter van 't Hof committed
78
79
80
    required(reference) +
    required(fastq)
}