28 May 2013

Input Validation in Galaxy

Input Validation in Galaxy

Just wanted to share, Galaxy has nice input validation features, i.e. the following code generates the following error:

And if more complicated validation is required, you can use validation hook :

And the code file should have the following function:

def validate_input( trans, error_map, param_values, page_param_map ):

To display an error message for particular parameter, set:

error_map['param_name'] = "Some message"

And if you print anything in validate_input(), you get the “Log messages” window in Galaxy UI:

No comments:

Post a comment