Am Montag, den 21.10.2013, 12:33 +0100 schrieb Peter Cock:
On Mon, Oct 21, 2013 at 12:22 PM, Bjoern Gruening <bjoern.gruening@gmail.com> wrote:
Hi Peter,
Hello all,
I'm currently trying to define a pair of integer parameters for min/max values:
<param name="min_size" type="integer" optional="true" min="0" value="" label="Minimum" help="Optional, but if used you must also supply a maximum value." /> <param name="max_size" type="integer" optional="true" min="0" value="" label="Maximum" help="Optional, but if used you must also supply a minimum value." />
As far as I can tell from the documentation, there is no way to write a validator which links the two parameters, for example in order to insist that min_size <= max_size?
I think you are right, there is no such easy mechanism. I would vote for a more powerful validator set.
In the meantime you can use a code file to check your variables. Please have a look at our wip DeSeq2 warpper:
https://github.com/bgruening/galaxytools/tree/master/deseq2
or the excellent blog post from Ross:
http://cloudimaging.blogspot.com.au/2013/05/input-validation-in-galaxy.html
Hope that helps, Bjoern
Yes, a helper Python script linked via the <code> tag containing a validate_input function may work here - thanks Bjoern :)
However, according to the wiki the <code> tag is deprecated :(
Yes :( But I don't think it will go away really soon. To much tools using it and no alternative is available. Cheers, Bjoern
Peter