galaxy
galaxy copied to clipboard
More expressive conditionals
Few ideas to make conditionals more expressive:
-
allow for
when
tags match multiple options:- comma separated list
<when value="option1,option2"/>
or - even more powerful regexes
<when value="option1|option2"/>
(with<when value="option*"/>
it might even be useful for dynamic options) which would solve https://github.com/galaxyproject/galaxy/issues/3428
- comma separated list
-
add something like an else branch for conditionals (e.g.
<else>
)- in particular useful if conditionals with dynamic options would be supported
-
allow when tags appear multiple times. which might allow for a more logical structuring of the tool form
<conditional...>
<param type="select"...>
<when value="A"/>
<when value="B"/>
<when value="A"/>
</conditional>
-
allow
multiple="true"
for the select https://github.com/galaxyproject/galaxy/issues/7173- This could be useful for instance if a program has several actions that can be applied and each action has its own set of parameters. This way the user gets only those options that are relevant for her choice. For instance show multiple levels / types of advanced options.
- Might be as well solved by macros, but still this makes the final tool xml larger
-
allow
optional="true"
- could allow for none of these, without adding another artificial option with a empty
when
tag
- could allow for none of these, without adding another artificial option with a empty
Potential problem:
- even more complicated workflow logic: eg https://github.com/galaxyproject/galaxy/issues/4528
Personal communication with @nsoranzo
We should use a different attribute than value
if we use regular expressions.
If we do this it should be something that we can evaluate on the client as well, otherwise we'll be dealing with loads of invalid workflow connections that we can't validate in the editor.
If we do this
You mean regular expressions? Maybe this can be a 2nd step...
Any new way to specify and evaluate conditionals, these are probably the biggest hurdle in creating workflows .