On Mon, Oct 21, 2013 at 1:55 PM, Bjoern Gruening wrote: > On 21.10.2013, Peter Cock wrote: >> On Mon, Oct 21, 2013 at 12:22 PM, Bjoern Gruening wrote: >> > >> > 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.
Thank you for those example links Bjoern. Ross mentioned on the blog post that we should see a "Log messages" popup from printing with the validate_input() function - I didn't, should that still work? I also found if I returned a non-empty dictionary in error_map (even with no error messages) then this was treated as a failure. Even with some working code to refer to this wasn't very straightforward, but I managed to get this to work: https://github.com/peterjc/pico_galaxy/commit/fee450c0bcee6935cc3e65da3e3281e96800f1b7 (I would love to write some unit tests for error conditions, something we talked about at GCC2013, but sadly that is still not possible yet.) Regards, Peter P.S. I wonder if the <code> validate_input function is still used when running a tool via the API... ___________________________________________________________ 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: http://lists.bx.psu.edu/ To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/