Forum Login Issue:
Currently the "Log in with Google" button redirects you to a "Page not found." This is an issue that our forum vendors are working on fixing. In the meantime, while on the "Page not found" you can edit the URL to delete the second gatk, firecloud, or wdl (depending on what subforum you are acessing).

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:

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?


  • ChrisLChrisL Cambridge, MAMember, Broadie, Moderator, 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, Moderator, 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: which is hopefully truthier

Sign In or Register to comment.