To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at

Optional Flags With No Parameters

Suppose I have the following task:

task dog {

String dogName
Boolean ? doesBark
command { -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: -name fido -doesBark

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

How would you accomplish this in a WDL?



Best Answer


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

Sign In or Register to comment.