CWL: Allowed values for parameters
2
5
Entering edit mode
7.6 years ago
unique_g ▴ 90

We are interested in developing a web service that automatically renders CWL workflows and interfaces selected parameters for the user to set via the web service's UI (e.g. by rendering parameter-specific Angular components). In the interest of user experience and security, the values set by the user for a given parameter must be valid (i.e. not causing the Workflow or at the very least the corresponding CommandLineTool to fail).

In order to achieve this, I am currently seeing some potential problems (see related questions), and I am wondering if there are CWL-compliant solutions existing or under discussion for these:

Is there a consensus on how to specify the set of allowed values for a given parameter? Examples for allowed values would be sets of strings, number/integer intervals, regular expressions, globs or mathematical series.

I think that defining a corresponding parameter field and syntax in the CWL specification has a lot going for it, as it would help to enforce the correct usage of CommandLineTools and allow specification-conforming validation routines to be developed, both at the level of frontends and at execution level.

While I am aware that we can come up with our own custom solution, I would feel more comfortable following a consensus on this, so if there isn't already a discussion going on for this, please let me know your opinion and where would be the right place to discuss/develop such a feature.

cwl • 2.4k views
ADD COMMENT
0
Entering edit mode

I have identical needs.

ADD REPLY
1
Entering edit mode
7.1 years ago
j.pfeuffer ▴ 10

Just wanted to bump this question. We are in the process of evaluating a migration from our Common Tool Description format to CWL and parameter restrictions seem to be the only part that is missing for a full support. Have you gotten any replies on other platforms (e.g. Github)?

ADD COMMENT
0
Entering edit mode

Following Michael's suggestion to work something out here, I would definitely be interested to tackle this together. Do you have any experience or suggestions on how to work on this? Would anything on schema.org be of any use? And anyway, how did you solve this in your Common Tool Description? Could we just use and possibly extend that?

ADD REPLY
0
Entering edit mode

Hey! Great to hear from you. In our own Common Tool Description, the support is also not complete since we only have a comma separated list of restrictions on string parameters and a colon separated range (min/max) for numeric (int or double/float) parameters. In the beginning I think we should evaluate what needs or can be supported without making the schemas too complex. You had some good suggestions on more general concepts like regular expressions, globs or mathematical series. I have never worked on a JSON based schema but schema.org seems to go in the right direction. I will have a look, too.

ADD REPLY
1
Entering edit mode
7.1 years ago

Hello unique_g,

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

We've had some discussion about this before, but no syntax was suggested nor implemented as a test. Seems j.pfeuffer has a similar need, perhaps you two could collaborate and test out some new syntax for potential inclusion?

ADD COMMENT

Login before adding your answer.

Traffic: 1649 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6