Update: July 26, 2019
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.

Optional Flags With No Parameters

Suppose I have the following task:

task dog {

String dogName
Boolean ? doesBark
command {
dogs.py -name ${dogName}

What I want to do is if the user sets doesBark to true, than a flag, -doesBark should be added so the command looks like this:

dogs.py -name fido -doesBark

but if doesBark is false, you'd just get:

dogs.py -name fido

How would you accomplish this in a WDL?



Best Answer


  • amr@broadinstitute.orge[email protected] Member, Broadie

    Thank you. I didn't realize you could if-then-else inside a task block.

Sign In or Register to comment.