Picard.scala 2.63 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Biopet is built on top of GATK Queue for building bioinformatic
 * pipelines. It is mainly intended to support LUMC SHARK cluster which is running
 * SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
 * should also be able to execute Biopet tools and pipelines.
 *
 * Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
 *
 * Contact us at: sasc@lumc.nl
 *
 * A dual licensing mode is applied. The source code within this project that are
 * not part of GATK Queue is freely available for non-commercial use under an AGPL
 * license; For commercial users or users who do not want to follow the AGPL
 * license, please contact us to obtain a separate license.
 */
16
package nl.lumc.sasc.biopet.extensions.picard
17
18

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

Peter van 't Hof's avatar
Peter van 't Hof committed
21
trait Picard extends BiopetJavaCommandLineFunction {
bow's avatar
bow committed
22
23
24
25
26
27
28
29
30
31
  @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)
Peter van 't Hof's avatar
Peter van 't Hof committed
32
  var compression: Option[Int] = config("compressionlevel", submodule = "picard")
bow's avatar
bow committed
33
34

  @Argument(doc = "MAX_RECORDS_IN_RAM", required = false)
Peter van 't Hof's avatar
Peter van 't Hof committed
35
  var maxRecordsInRam: Option[Int] = config("maxrecordsinram", submodule = "picard")
bow's avatar
bow committed
36
37
38
39
40
41
42

  @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
43
44
45
  //  override def versionCommand = executable + " " + javaOpts + " " + javaExecutable + " -h"
  //  override val versionRegex = """Version: (.*)""".r
  //  override val versionExitcode = List(0, 1)
bow's avatar
bow committed
46

47
  override val defaultVmem = "8G"
Peter van 't Hof's avatar
Peter van 't Hof committed
48
  memoryLimit = Option(3.0)
bow's avatar
bow committed
49

50
51
  override def commandLine = super.commandLine +
    required("TMP_DIR=" + jobTempDir) +
bow's avatar
bow committed
52
    optional("VERBOSITY=", verbosity, spaceSeparated = false) +
53
    conditional(quiet, "QUIET=TRUE") +
bow's avatar
bow committed
54
55
56
    optional("VALIDATION_STRINGENCY=", stringency, spaceSeparated = false) +
    optional("COMPRESSION_LEVEL=", compression, spaceSeparated = false) +
    optional("MAX_RECORDS_IN_RAM=", maxRecordsInRam, spaceSeparated = false) +
57
58
59
    conditional(createIndex, "CREATE_INDEX=TRUE") +
    conditional(createMd5, "CREATE_MD5_FILE=TRUE")
}