Question: Tool test error with "data_column" input paramters greater than 1
2
gravatar for joanna
2.6 years ago by
joanna70
United Kingdom
joanna70 wrote:

I am writing tool tests within my xml wrappers for a tool that takes input from a history dataset. I ran into a problem when I am using the “data_column” type input parameter. The tool test will run correctly when I use an example with the input in the first column “1”, but if I need to specify the column as “2” I get a long error message with the following header message:

"problem_log": " File \"/usr/lib64/python2.6/unittest.py\", line 278, in run\n testMethod()\n File \"/mnt/data/galaxy/gb-dev-02/test/functional/test_toolbox.py\", line 289, in test_tool\n self.do_it( td )\n File \"/mnt/data/galaxy/gb-dev-02/test/functional/test_toolbox.py\", line 58, in do_it\n raise e\n'Error creating a job for these tool inputs - Unknown error occurred while processing request.\n-------------------- >>

I can work around this by changing my test-data input files, but can you explain why I might be getting this result and if I can correct it another way?

Kind regards Joanna

tool tests galaxy • 880 views
ADD COMMENTlink modified 2.6 years ago by plasmid8720 • written 2.6 years ago by joanna70
2
gravatar for plasmid87
2.6 years ago by
plasmid8720
plasmid8720 wrote:

If you are running functional tests using planemo test all input data files are sent to the Galaxy upload tool before the tests are run. The upload tool detects (or "sniffs") the file type by default, which unfortunately won't always be able to correctly identify the file. e.g., a tabular / tsv file might get detected as text / GFF and therefore won't have the correct number of columns during the tests. I think this is the problem you're experiencing because column 1 is detected, but additional columns are not, suggesting it is being detected as a non-tabular format.

The detection behaviour for test input files can be overridden with an explicit file format in the tool config by adding the ftype attribute to the test input. This is briefly referenced in the tool config overview for param (functional tests) but it is easy to miss as you might logically assume that test input files will be detected using the format defined for the input parameter in <inputs>.

Example of defining the file type for a test input as tabular:

<test>
  ...
  <param name="someInput" value="some-file.ext" ftype="tabular"/>
  ...
</test>

The above guarantees that the test file (some-file.ext) used for testing the input parameter (someInput) will be detected as tabular.

ADD COMMENTlink written 2.6 years ago by plasmid8720

Thank you, this worked!

ADD REPLYlink written 2.6 years ago by joanna70
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: 173 users visited in the last hour