-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make conditional input parameters editable at runtime? #4528
Comments
OK, that's not entirely correct, you can set non-conditional select boxes at runtime, see for example the genome selection in bowtie2. It's just the conditional itself that can't be set at runtime (For a good reason -- if you switch to a user-provided reference genome, you'll need another input file). |
I've tested things now and apparently bamCoverage work differently than bowtie2. In bowtie2 I can change the reference genome in bamCoverage I cannot. So I guess the issue conditional is implemented inappropriately for that particular tool. So the issue is less severe than it first appeared but I still think the overall judgement is a bit odd. If you alter a workflow to use a user-provided reference genome it is self-evident that you cannot run the workflow if you cannot provide one. On the other hand if the workflow is developed for a user-provided genome and I wish to switch to a default one, then it would be good if I can do so. |
@TKlingstrom If you are referring to the Maybe this limitation can be restricted to conditionals that may contain a param of type |
@nsoranzo same thought here. I agree. |
@nsoranzo, I got a slightly tangential question regarding how it works right now. When coding the wrapper you can decide on either making it a decision tree with several levels or provide all choices at a single level. Bowtie2 use alternative 1 described below and bamCoverage uses alternative 2 described below. Alternative 1, conditional parameter followed by a second level dependent on level 1. Level 1 Level 2 --> This mean that the user get either a list that can be selected from or the option to make user based input in whatever format the tool supports. Alternative 2: You write the options in a single level where the worfklows become pre-defined with a select option or accepts a user input in the form of a text from a text field (or a file I guess if you have that option for the tool). Level 1: --> This mean that the user cannot switch between predefined inputs at run time, but user defined input can still be an option. As a novice to Galaxy I lack the overview of the impact of many design decisions. But from my position it looks like alternative 1 is preferable when configuring tools? Regarding the issue here I think that instead of restricting conditional parameters if they accept data or dataset collections there could simply be a small warning stating that the workflow will fail if users change the parameter and does not provide the appropriate data themselves. |
@TKlingstrom Your analysis seems correct to me and I can say that the vast majority of tools use your "alternative 1" for genome selection.
I think that's a bit more complicated than that, unfortunately. |
xref #979 which I'm closing since it's a dupe (well, it was the original issue) but has less useful discussion. |
xref #1132 which was mentioned on that issue as well. |
Is there a workaround for this? I really need to let users choose a locally Blast database, a Blast database from their history etc. |
You can select parameters (like indexed blast databases) in the workflow run page, what you can't do is switch between pre-indexed databases and creating databases from an input file. For that you'll have to create a separate workflow. If you want to share the common parts you can put the common parts in one workflow and then include that workflow in another workflow. |
ok, I've just created a tool in order to let the user choose between:
it works well as a tool, with a conditional. But I can't use it in a workflow... |
#8218 could help to solve this. I can put several inputs, optional, make a concatenate and work with the result! |
What I have done so far:
It works. |
might be solved by this #8599 ...? |
Forget about my previous comment .. I guess the PR is unrelated. Anyway I think it would be a great to allow to change conditionals in the workflow run form: Just two tools that use conditionals to present only relevant parameter choices: https://github.com/galaxyproject/tools-iuc/blob/d6e367b8f4cdf7b74654e7bae9dd206a85a52665/tools/stacks2/stacks_procrad.xml#L50 But I understand the problems with mandatory (data/workflow) inputs in the conditionals and outputs that might be filtered by options in the conditionals. |
Since it came up again today, yes that is probably a good idea, however we may also have output filters that work on values within the conditional when, so that's always going to be risky and not straightforward to check. Although outputs can also be filtered based on parameters outside of conditionals ... |
I think we should consider if conditional input parameters should be configurable at runtime. Its not really a right or wrong question but about prioritising how actively workflow users should be guided. In the docs conditional parameters are recommended for things such as creating a tool for selecting reference data (https://docs.galaxyproject.org/en/master/dev/schema.html#tool-inputs-conditional).
In practice this mean that every tool which relies on reference data and is made according to the instructions will lock all workflows using it to a specific genome build. For researchers working in an environment with several animal models or microbiology this create a major usability issue.
When deciding on the issue there are two ways to prioritise when deciding if they should be editable or not.
If we prioritise option workflow being flexible (ie conditional parameters being editable) there are two issues:
A) Users may at runtime select to remove an output that is used later in the workflow. Yielding a message stating along the lines of "missing dataset in step X". The history will be color coded to show which step fails and error testing is identical to if a tool have failed to produce output.
B) Users may be confused if they are allowed to change input in a tool like BWA from provided reference genomes.
If we instead prioritise to lower the risk of user caused errors then we have one issue:
Personally I work at an agricultural university with many small groups doing similar things but on different animals/microbes so for me flexibility is very important. Given the user friendly way workflows seem to fail when lacking data I do however think that the risk of issues caused by workflow failures are rather small.
The text was updated successfully, but these errors were encountered: