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 https://software.broadinstitute.org/firecloud/documentation/freecredits

Can you _really_ leave out the true or false value in command options?

gauthiergauthier Member, Broadie, Moderator, Dev
edited January 24 in Ask the WDL team

The WDL spec claims that when specifying command options based on a boolean variable, the parameter will evaluate to the empty string if the false or true is omitted:
https://github.com/broadinstitute/wdl/blob/develop/SPEC.md#true-and-false

I can't get that to validate with wdltool-0.14 or womtool-30.1. womtool has the following to say about it:

ERROR: Both 'true' and 'false' attributes must be specified if either is specified:
 ${true='-ERC GVCF -variant_index_parameter 128000 -variant_index_type LINEAR' add_gvcf_args}

Is that little piggy saying this feature is Cromwell-supported telling the truth?

Answers

  • ChrisLChrisL Cambridge, MAMember, Broadie, Dev
    edited January 26

    Right, there's definitely a mismatch here. I'll aim to make this a spec change in draft-3.

    As a side note, in general I'd advise using the expression style ${if b then true_value else false_value} to the interpolation option style ${true=true_option false=false_option b} but only because it's clearer in my opinion what's going on.

  • gauthiergauthier Member, Broadie, Moderator, Dev

    The expression style is much nicer, thanks for the tip!

  • ChrisLChrisL Cambridge, MAMember, Broadie, Dev

    I realised as I was writing up the spec change that the expression style also allows arbitrary expressions in the true and false cases, whereas true= and false= only allow String literals.

    Here's the spec change PR: https://github.com/openwdl/wdl/pull/186 which is hopefully truthier

Sign In or Register to comment.