Setting min/max limit on <repeat> tag in tool XML file
Hi all, I'm working on a tool where the <repeat> tag looks like an elegant solution - however I want to limit the number of repeats to be 1, 2 or 3. i.e. I want to set min="1" and max="3" attributes for the <repeat>, based on analogy to the <param> tag. Is this possible, but not documented here? https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax In terms of the GUI, I'd like the page to preload with as many entries as the min setting (zero by default), and disable the add button once the max setting is reach (default no limit). (Alternatively you could validate the max/min when the form is submitted by clicking the execute button, but that seems less user friendly.) If this isn't already possible, would it be generally useful to add this? Thanks, Peter
Hi Peter, Yes, setting min and max values in the repeat tag should work as you need. As you point out, it is probably not well documented, so please let us know if it isn't working as you imagine it should. Thanks for using Galaxy, Dan On Apr 19, 2011, at 6:47 AM, Peter Cock wrote:
Hi all,
I'm working on a tool where the <repeat> tag looks like an elegant solution - however I want to limit the number of repeats to be 1, 2 or 3. i.e. I want to set min="1" and max="3" attributes for the <repeat>, based on analogy to the <param> tag.
Is this possible, but not documented here? https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax
In terms of the GUI, I'd like the page to preload with as many entries as the min setting (zero by default), and disable the add button once the max setting is reach (default no limit).
(Alternatively you could validate the max/min when the form is submitted by clicking the execute button, but that seems less user friendly.)
If this isn't already possible, would it be generally useful to add this?
Thanks,
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Tue, Apr 19, 2011 at 1:46 PM, Daniel Blankenberg <dan@bx.psu.edu> wrote:
Hi Peter,
Yes, setting min and max values in the repeat tag should work as you need. As you point out, it is probably not well documented, so please let us know if it isn't working as you imagine it should.
Thanks for using Galaxy,
Dan
Hi Dan, Excellent - that does pretty much what I was expecting. Thanks for updating the wiki page. It would be a nice refinement to hide the "Remove" buttons when at the minimum, and hide the "Add" button when at the maximum - but not essential. What I need to work out now is how to use repeat parameters in the unit tests. There seems to be examples in tools/mutation/visualize.xml and tools/plotting/xy_plot.xml which only use the first repeat... Also, can I access the repeat number for default values - e.g. I'd like to have a caption parameter defaulting to "Set 1", "Set 2" etc. Thanks, Peter
On Tue, Apr 19, 2011 at 2:23 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
What I need to work out now is how to use repeat parameters in the unit tests. There seems to be examples in tools/mutation/visualize.xml and tools/plotting/xy_plot.xml which only use the first repeat...
I've tried to skim all the provided tool XML files using <repeat> and looked at their <test> entries. It looks like only a single repeat parameter is being used in the tests currently. The commented out <repeat> tags in tools/sr_assembly/velveth.xml suggest repeat parameters don't work properly in <test> yet. The comments in samtools/sam_merge.xml also suggest that (when written), the test framework didn't handle <repeat> tags properly. See also: https://bitbucket.org/galaxy/galaxy-central/issue/175/ Peter
Hi Peter, The test framework could use a bit of work, and better handling of grouping-style parameters (such as repeats) is one significant area needing improvement. The refinements you suggest, hiding add/remove buttons when not applicable, would be good improvements, but I don't know that anyone has plans to address these in the near future. Unfortunately, there is not a way to get the repeat number and dynamically substitute in as a portion of a text parameter's value, but this would be a nice feature to have available. Thanks for using Galaxy, Dan On Apr 19, 2011, at 9:59 AM, Peter Cock wrote:
On Tue, Apr 19, 2011 at 2:23 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
What I need to work out now is how to use repeat parameters in the unit tests. There seems to be examples in tools/mutation/visualize.xml and tools/plotting/xy_plot.xml which only use the first repeat...
I've tried to skim all the provided tool XML files using <repeat> and looked at their <test> entries. It looks like only a single repeat parameter is being used in the tests currently.
The commented out <repeat> tags in tools/sr_assembly/velveth.xml suggest repeat parameters don't work properly in <test> yet.
The comments in samtools/sam_merge.xml also suggest that (when written), the test framework didn't handle <repeat> tags properly.
See also: https://bitbucket.org/galaxy/galaxy-central/issue/175/
Peter
On Tue, Apr 19, 2011 at 3:38 PM, Daniel Blankenberg <dan@bx.psu.edu> wrote:
Hi Peter,
The test framework could use a bit of work, and better handling of grouping-style parameters (such as repeats) is one significant area needing improvement.
Noted. Is there an issue open on this already?
The refinements you suggest, hiding add/remove buttons when not applicable, would be good improvements, but I don't know that anyone has plans to address these in the near future.
Filed: https://bitbucket.org/galaxy/galaxy-central/issue/519/
Unfortunately, there is not a way to get the repeat number and dynamically substitute in as a portion of a text parameter's value, but this would be a nice feature to have available.
I'm not so bothered about this one, but agree, nice to have. Thanks, Peter
participants (2)
-
Daniel Blankenberg
-
Peter Cock