Job continues to run even if input array is empty

bshifawbshifaw Member, Broadie, Moderator admin

If the input for a workflow is an array of samples and a sample_set is provided (e.g. this. samples.bam) to the workflow but the sample data model table does not contain the mentioned sample attribute (this.samples.bam); the launched job will be initiated though it should fail because it doesn't have the required inputs.

This can be replicated on the CNV featured workspace with the PON workflow by running the workflow using an arbitrary attribute name (this.samples.bamhdlfkjhls)

Best Answer

  • bshifawbshifaw admin
    Accepted Answer

    "Optional Parameters & Type Constraints
    Types can be optionally suffixed with a ? or + in certain cases.

    ? means that the parameter is optional. A user does not need to specify a value for the parameter in order to satisfy all the inputs to the workflow.
    + applies only to Array types and it represents a constraint that the Array value must contain one-or-more elements."

    task test {
      input {
        Array[File]  a
        Array[File]+ b
        Array[File]? c
        #File+ d <-- can't do this, + only applies to Arrays
      }
    

    WDL spec draft3

Answers

  • bshifawbshifaw Member, Broadie, Moderator admin
    Accepted Answer

    "Optional Parameters & Type Constraints
    Types can be optionally suffixed with a ? or + in certain cases.

    ? means that the parameter is optional. A user does not need to specify a value for the parameter in order to satisfy all the inputs to the workflow.
    + applies only to Array types and it represents a constraint that the Array value must contain one-or-more elements."

    task test {
      input {
        Array[File]  a
        Array[File]+ b
        Array[File]? c
        #File+ d <-- can't do this, + only applies to Arrays
      }
    

    WDL spec draft3

Sign In or Register to comment.