Column argument validation breaks on empty tabular files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Column argument validation breaks on empty tabular files

Peter Cock
Hello all,

I'm testing a workflow which uses my filter tool where one of the parameters
is a tabular file, and a related parameter is a multi-column selector:

Tool:
http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_id

Snippet from tool XML,

<param name="input_tabular" type="data" format="tabular"
label="Tabular file containing sequence identifiers"/>
<param name="columns" type="data_column" data_ref="input_tabular"
multiple="True" numerical="False" label="Column(s) containing sequence
identifiers" help="Multi-select list - hold the appropriate key while
clicking to select multiple columns">
<validator type="no_options" message="Pick at least one column"/>
</param>

In most cases, the preceding tool will generate a tabular file with
two columns - and the workflow has column 1 as the saved value.

However, it is quite valid for the tabular file to actually be empty - in
which case the number of columns is unknown and so the arguments
can't be checked. Despite this, Galaxy attempts to check the column
argument from the workflow and fails:

Traceback (most recent call last):
  File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/__init__.py",
line 119, in prepare_job
    job_wrapper.prepare()
  File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line
656, in prepare
    self.tool.handle_unvalidated_param_values( incoming, self.app )
  File "/mnt/galaxy/galaxy-central/lib/galaxy/tools/__init__.py", line
2330, in handle_unvalidated_param_values
    self.handle_unvalidated_param_values_helper( self.inputs,
input_values, app )
  File "/mnt/galaxy/galaxy-central/lib/galaxy/tools/__init__.py", line
2369, in handle_unvalidated_param_values_helper
    raise LateValidationError( message )
LateValidationError

Tool execution generated the following error message:

Failed runtime validation of Column(s) containing sequence identifiers
(An invalid option was selected, please verify)

It seems to me this is a bug, and the late validation is being too
strict where as in this case the number of columns is undefined.

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:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/