Question: using code for validators in galaxy
1
gravatar for ali
4.2 years ago by
ali20
Canada
ali20 wrote:

I have a form whose inputs that are dynamically parsed when the user clicks "execute"

this is because of the nature of the program, that it needs to be done so

 

Is it possible to to use code for a validator?

so a code will be used to validate the inputs?

 

galaxy xml validator code • 886 views
ADD COMMENTlink modified 4.2 years ago by Bjoern Gruening5.1k • written 4.2 years ago by ali20
2
gravatar for Bjoern Gruening
4.2 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.1k wrote:

Hi Ali!

Can you use the following?

<validator type="expression" message="An integer is required.">int( float( value ) ) == float( value )</validator>

Such expression can be really sophisticated.

Let me know if this is working for you!

Cheers,

Bjoern

ADD COMMENTlink written 4.2 years ago by Bjoern Gruening5.1k

how would i be able to import a required package in the validator?

import os; os.path.exists("/home/el/myfile.txt")

this will lead to a parse error when i reload the tool config

ADD REPLYlink written 4.2 years ago by ali20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 174 users visited in the last hour