This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Parametrise argument values for inputs in the CWL

Hi there,

Is it possible to parametrised the allowed values for an input argument in CWL?

For example, input type A is a string with only these allowed values 'x' or 'y'. Or input B is a number with these allowed value 0 or 1.

Thanks!

cwl

1 answer

Hello eduardo and thank you for your question,

For strings you can set the list of allowed values using Enums. See http://www.commonwl.org/user_guide/19-custom-types/ for how to use http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputEnumSchema

More complex specification of allowed values is not yet a feature in CWL v1.0.x. A complex workaround is to evaluate the suitability of the inputs using an ExpressionTool (JavaScript) or an additional CommandLineTool(script language of your choice).

In the mean time, you can join the discussion at CWL: Allowed values for parameters about new syntax for a future version of the CWL standards.

Cheers,

Log in to answer this question.