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

WDL workflow with optional input

orodehorodeh Mountain View, CAMember

The script below is failing, and I am not sure what is going on.

workflow X {
    Boolean? flag

    String a = if select_first([flag,false]) then "OKAY" else "FAIL"
    output {
        a
    }
}

When I run java -jar ../../cromwell-29.jar run X.wdl, I get the following error:

Workflow input processing failed:
Unable to load namespace from workflow: key not found: <string:1:1 identifier "WA==">

Even if I add an inputs file with a value for flag, it still fails in the same way. Shouldn't this work? Am I missing something obvious?

Tagged:

Best Answer

Answers

  • workflow X {
        Boolean? flag
        output {
            String s = if select_first([flag,false]) then "OKAY" else "FAIL"
        }
    }
    

    This works.

  • orodehorodeh Mountain View, CAMember

    That's very curious, because these two versions should be entirely equivalent.

  • orodehorodeh Mountain View, CAMember

    Thanks, that is very helpful. I knew that wildcards were deprecated, but I didn't know that the a syntax is deprecated as well.

  • ChrisLChrisL Cambridge, MAMember, Broadie, Dev

    Technically the a syntax was never supported! The task output syntax is deprecated (and maybe even removed in draft 3):

    output {
      task_foo.output
    }
    

    Is removed in favor of:

    output {
      Int x = task_foo.output
    }
    
Sign In or Register to comment.