Galaxy: Wrapping up tools: XML, disable some input form(make it grey)

Created on 13 Mar 2017  路  10Comments  路  Source: galaxyproject/galaxy

I would like to show one input option but disable it so users cannot manually type, but they can see this input option and the default values.

Like the code below, I want users to know that 1 CPU will be used, but they cannot adjust it themselves, due to the deficiency of our cloud environment (we cannot afford to give more CPUs to use)
Is there such a keyword or grammar to realize it in the XML file?
<param type="integer" name="input1" value='1' label="The number of CPU cores to use" />

Thank you in advance.

All 10 comments

I don't think there is anything like that available, can you just put this information in the tool <help> section?

Hi, @nsoranzo , thank you for the confirmation.

I will add something in the help section to let students know the possible repercussion.
In addition, I will use validator in_range in the xml to put a cap on the input values.

It is easier to add the min and max attributes to integer and float params: https://docs.galaxyproject.org/en/latest/dev/schema.html#id18

Actually, I have tried it. I find that for floats, it works; but for integers, it doesn't. Maybe I have some mistakes in grammar.

Also value seems to be required when min and max is set, which is different from the documentation. I think I might misunderstand the documentation. these three params are bound together.

@CicoZhang regarding your concrete CPU example. Normally the amount of CPUs that will be used it not known at tool-display time. It will be know during execution time. So this number in a normal setting can be problematic. However, @natefoo is working on a new feature that gives a user more information about the current running job - queue status, runtime ... etc ... So this might fix your problem.

Hey, @bgruening , there is a parameter for the algorithm which entails the designation of the number of cores. Does this conflict with Galaxy's?

This is being filled in when the job is evaluated. You can do some fancy things in galaxy, like determining the number of CPUs to use based on the size of an input. This only happens when you actually run the tool. What you can actually see (at least as an admin) is how many cores haven been used after you run the job, by clicking on the info button on the output History item.

Also value seems to be required when min and max is set, which is different from the documentation. I think I might misunderstand the documentation. these three params are bound together.

value is needed unless you set optional="true": https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tools/parameters/basic.py#L309
Maybe that can be relaxed, ping @guerler

Looks like this is resolved with the comments, there is no way to do this because it really is determined at runtime. The user can see the result in the job info page.

Was this page helpful?
0 / 5 - 0 ratings