Picard.scala 1.89 KB
Newer Older
1
2
3
package nl.lumc.sasc.biopet.function.picard

import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
bow's avatar
bow committed
4
import org.broadinstitute.gatk.utils.commandline.{ Argument }
5

Peter van 't Hof's avatar
Peter van 't Hof committed
6
trait Picard extends BiopetJavaCommandLineFunction {
bow's avatar
bow committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  @Argument(doc = "VERBOSITY", required = false)
  var verbosity: String = config("verbosity", submodule = "picard")

  @Argument(doc = "QUIET", required = false)
  var quiet: Boolean = config("quiet", default = false, submodule = "picard")

  @Argument(doc = "VALIDATION_STRINGENCY", required = false)
  var stringency: String = config("validationstringency", submodule = "picard")

  @Argument(doc = "COMPRESSION_LEVEL", required = false)
  var compression: Int = config("compressionlevel", submodule = "picard")

  @Argument(doc = "MAX_RECORDS_IN_RAM", required = false)
  var maxRecordsInRam: Int = config("maxrecordsinram", submodule = "picard")

  @Argument(doc = "CREATE_INDEX", required = false)
  var createIndex: Boolean = config("createindex", default = true, submodule = "picard")

  @Argument(doc = "CREATE_MD5_FILE", required = false)
  var createMd5: Boolean = config("createmd5", default = false, submodule = "picard")

Peter van 't Hof's avatar
Peter van 't Hof committed
28
  override def versionCommand = executable + " " + javaOpts + " " + javaExecutable + " -h"
29
  override val versionRegex = """Version: (.*)""".r
bow's avatar
bow committed
30
31
  override val versionExitcode = List(0, 1)

32
33
  override val defaultVmem = "8G"
  memoryLimit = Option(5.0)
bow's avatar
bow committed
34

35
36
  override def commandLine = super.commandLine +
    required("TMP_DIR=" + jobTempDir) +
bow's avatar
bow committed
37
    optional("VERBOSITY=", verbosity, spaceSeparated = false) +
38
    conditional(quiet, "QUIET=TRUE") +
bow's avatar
bow committed
39
40
41
    optional("VALIDATION_STRINGENCY=", stringency, spaceSeparated = false) +
    optional("COMPRESSION_LEVEL=", compression, spaceSeparated = false) +
    optional("MAX_RECORDS_IN_RAM=", maxRecordsInRam, spaceSeparated = false) +
42
43
44
    conditional(createIndex, "CREATE_INDEX=TRUE") +
    conditional(createMd5, "CREATE_MD5_FILE=TRUE")
}