Commit f5409cd1 authored by Sander Bollen's avatar Sander Bollen

fix non-required arguments for manwe

parent a06766d9
......@@ -19,7 +19,7 @@ class ManweAnnotateBed(val root: Configurable) extends Manwe {
@Argument(doc = "Flag whether to wait for annotation to complete on the server")
var waitToComplete: Boolean = false
@Argument(doc = "annotation queries")
@Argument(doc = "annotation queries", required = false)
var queries: List[String] = Nil
def subCommand = {
......
......@@ -19,7 +19,7 @@ class ManweAnnotateVcf(val root: Configurable) extends Manwe {
@Argument(doc = "flag whether to wait for annotation to complete")
var waitToComplete: Boolean = false
@Argument(doc = "annotation queries")
@Argument(doc = "annotation queries", required = false)
var queries: List[String] = Nil
def subCommand = {
......
......@@ -11,7 +11,7 @@ class ManweDataSourcesAnnotate(val root: Configurable) extends Manwe {
@Argument(doc = "uri to data source to annotate")
var uri: Option[String] = _
@Argument(doc = "list of queries")
@Argument(doc = "list of queries", required = false)
var queries: List[String] = Nil
@Argument(doc = "Flag whether to wait for annotation to complete on server")
......
......@@ -13,7 +13,7 @@ class ManweSamplesAdd(val root: Configurable) extends Manwe {
@Argument(doc = "the sample name")
var name: Option[String] = _
@Argument(doc = "the sample groups [uris]")
@Argument(doc = "the sample groups [uris]", required = false)
var group: List[String] = Nil
@Argument(doc = "pool size")
......
......@@ -13,7 +13,7 @@ class ManweSamplesAnnotateVariations(val root: Configurable) extends Manwe {
@Argument(doc = "uri to sample to annotate")
var uri: Option[String] = _
@Argument(doc = "Annotation queries")
@Argument(doc = "Annotation queries", required = false)
var queries: List[String] = Nil
def subCommand = {
......
......@@ -10,10 +10,10 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Output }
*/
class ManweSamplesList(val root: Configurable) extends Manwe {
@Argument(doc = "filter by user URI")
@Argument(doc = "filter by user URI", required = false)
var user: Option[String] = None
@Argument(doc = "filter by group URI")
@Argument(doc = "filter by group URI", required = false)
var group: List[String] = Nil
var onlyPublic: Boolean = false
......
......@@ -30,6 +30,8 @@ class ManweTest extends TestNGSuite with Matchers {
manwe.output = out
manwe.bed = bed
manwe.alreadyUploaded = false
manwe.cmd should equal(s"manwe annotate-bed ${bed.getAbsolutePath} -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
manwe.queries = List("/uri/1&&/uri/2")
manwe.cmd should equal(s"manwe annotate-bed ${bed.getAbsolutePath} -q /uri/1&&/uri/2 -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
......@@ -55,6 +57,8 @@ class ManweTest extends TestNGSuite with Matchers {
manwe.output = out
manwe.vcf = vcf
manwe.alreadyUploaded = false
manwe.cmd should equal(s"manwe annotate-vcf ${vcf.getAbsolutePath} -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
manwe.queries = List("/uri/1&&/uri/2")
manwe.cmd should equal(s"manwe annotate-vcf ${vcf.getAbsolutePath} -q /uri/1&&/uri/2 -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
......@@ -77,6 +81,8 @@ class ManweTest extends TestNGSuite with Matchers {
manwe.manweConfig = new File("/usr/local/nonexistent.conf")
manwe.output = out
manwe.uri = Some("/uri/1")
manwe.cmd should equal(s"manwe data-sources annotate /uri/1 -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
manwe.queries = List("/uri/1&&/uri/2")
manwe.cmd should equal(s"manwe data-sources annotate /uri/1 -q /uri/1&&/uri/2 -c /usr/local/nonexistent.conf > ${out.getAbsolutePath}")
......
......@@ -109,7 +109,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
val splits = sampleIds.map(x => {
val view = new BcftoolsView(this)
view.input = vcf
view.output = swapExt(vcf, ".vcf.gz", s"$x.vcf.gz")
view.output = swapExt(outputDir, vcf, ".vcf.gz", s"$x.vcf.gz")
view.samples = List(x)
view.minAC = Some(1)
add(view)
......@@ -147,7 +147,9 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
val annotate = new ManweAnnotateVcf(this)
annotate.vcf = vcf
annotate.queries = annotationQueries
if (annotationQueries.nonEmpty) {
annotate.queries = annotationQueries
}
annotate.waitToComplete = true
annotate.output = swapExt(outputDir, vcf, ".vcf.gz", ".tmp.annot")
add(annotate)
......
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