Commit 7f15bd0b authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

fix args

parent 4cde9723
......@@ -11,16 +11,16 @@ import org.broadinstitute.gatk.utils.commandline.{Output, Input}
class CombineVariants(val root: Configurable) extends Gatk {
val analysisType = "CombineVariants"
@Input(required = true)
@Input(doc = "", required = true)
var inputFiles: List[File] = Nil
@Output(required = true)
@Output(doc = "", required = true)
var outputFile: File = null
var setKey: String = null
var rodPriorityList: List[String] = Nil
var minimumN: Int = config("minimumN", default = 1)
var genotypeMergeOptions: String = config("genotypeMergeOptions")
var genotypeMergeOptions: Option[String] = config("genotypeMergeOptions")
var inputMap: Map[File, String] = Map()
......@@ -31,7 +31,7 @@ class CombineVariants(val root: Configurable) extends Gatk {
override def beforeGraph: Unit = {
genotypeMergeOptions match {
case null | "UNIQUIFY" | "PRIORITIZE" | "UNSORTED" | "REQUIRE_UNIQUE" =>
case Some("UNIQUIFY") | Some("PRIORITIZE") | Some("UNSORTED") | Some("REQUIRE_UNIQUE") | None =>
case _ => throw new IllegalArgumentException("Wrong option for genotypeMergeOptions")
}
}
......@@ -42,7 +42,7 @@ class CombineVariants(val root: Configurable) extends Gatk {
case Some(name) => required("--variant:" + name, file)
case _ => required("--variant", file)
}}).mkString +
required(outputFile) +
required("-o", outputFile) +
optional("--setKey", setKey) +
(if (rodPriorityList.isEmpty) "" else optional("--rod_priority_list", rodPriorityList.mkString(","))) +
optional("-genotypeMergeOptions", genotypeMergeOptions)
......
......@@ -22,16 +22,16 @@ abstract class Gatk extends BiopetJavaCommandLineFunction {
var reference: File = config("reference")
@Input(required = false)
var gatkKey: File = config("gatk_key")
var gatkKey: Option[File] = config("gatk_key")
@Input(required = false)
var intervals: List[File] = config("intervals")
var intervals: List[File] = config("intervals", default = Nil)
@Input(required = false)
var excludeIntervals: List[File] = config("exclude_intervals")
var excludeIntervals: List[File] = config("exclude_intervals", default = Nil)
@Input(required = false)
var pedigree: List[File] = config("pedigree")
var pedigree: List[File] = config("pedigree", default = Nil)
override def commandLine = super.commandLine +
required("-T", analysisType) +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment