Peter, Thank you for reporting this issue, I've committed a fix in 9508:4126ec15fd61. --Dave B. On 4/24/13 05:10:55.000, Peter Cock wrote:
On Tue, Nov 23, 2010 at 2:06 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
Hi all,
I'm working on a FASTA filter script, as per this email: http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003819.html
Current code here: http://bitbucket.org/peterjc/galaxy-central/src/c3ac6d7a02f7/
I've added a basic test, but it won't run (see output below). I think the interesting bit of the error output is this exception: cannot find value/label "blastp_four_human_vs_rhodopsin.tabular" in list control, coming from function set_form_control_value in the twill.utils module.
This is something to do with the columns parameter, a multiselect option referencing the columns in this tabular file. Removing the validator makes no difference. However, if I change the columns parameter to a plain text parameter, the test passes:
$ hg diff diff -r c3ac6d7a02f7 tools/fasta_tools/fasta_filter_by_id.xml --- a/tools/fasta_tools/fasta_filter_by_id.xml Tue Nov 23 11:37:35 2010 +0000 +++ b/tools/fasta_tools/fasta_filter_by_id.xml Tue Nov 23 14:03:31 2010 +0000 @@ -4,9 +4,7 @@ <inputs> <param name="input_fasta" type="data" format="fasta" label="FASTA file to filter on the identifiers"/> <param name="input_tabular" type="data" format="tabular" label="Tabular file containing FASTA identifiers"/> - <param name="columns" type="data_column" data_ref="input_tabular" multiple="True" numerical="False" label="Column(s) containing FASTA 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> + <param name="columns" type="text" label="Column(s) containing FASTA identifiers" /> </inputs> <outputs> <data name="output_pos" format="fasta" label="With matched ID" />
I've tried searching the provided wrappers for similar examples (column multi-select from a tabular file). I found filters/uniq.xml (works but uses a bed file rather than a simple tabular file) and stats/cor.xml (needs R and rpy which I don't have installed yet) which have tests, and finally plotting/bar_chart.xml which has no unit tests.
Would someone familiar with the internals of the Galaxy tests and how they set tool parameters be able to try reproducing this for me? The branch has all the unit test files required, and there are no new dependencies needed.
Thank you,
Peter
--
Here is the output (on Linux - other tests tried pass):
$ ./run_functional_tests.sh -id fasta_filter_by_id ... base.twilltestcase DEBUG 2010-11-23 13:59:53,747 In submit_form, continuing, but caught exception: cannot find value/label "blastp_four_human_vs_rhodopsin.tabular" in list control ...
Hello again,
See http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003867.html for the original email and full log. The most interesting part of the logging was the caught exception (and the tool being tested was never run):
cannot find value/label "blastp_four_human_vs_rhodopsin.tabular" in list control
I don't recall if/how this was resolved, I've since deprecated this tool itself - replacing it with a more general version: http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_id
However, I've just hit what seems to be a very similar issue while trying to add what should be a simple unit test to my sequence renaming script, seq_rename.py / seq_rename.py which is in the main Tool Shed here: http://toolshed.g2.bx.psu.edu/view/peterjc/seq_rename
Here's the current latest code (not yet pushed to the public Tool Shed), which is now on the test Tool Shed and on my bitbucket branch: http://testtoolshed.g2.bx.psu.edu/view/peterjc/seq_rename https://bitbucket.org/peterjc/galaxy-central/src/7750adf18b1fab953d7cccd0216...
Here's the test itself,
<tests> <test> <param name="input_file" value="four_human_proteins.fasta" ftype="fasta" /> <param name="input_tabular" value="four_human_proteins.rename.tabular" ftype="tabular" /> <param name="old_column" value="1" /> <param name="new_column" value="2" /> <output name="output_file" file="four_human_proteins.rename.fasta" ftype="fasta" /> </test> </tests>
Now I am quite puzzled by what happens running the test, the full output is at the end of this email. Strangely the tool itself is never actually run, and instead Galaxy compares one of the input files to the expected output file and they don't match.
As in my email from 2010, this is most interesting line in the output, just after the two input files are 'uploaded' to the current history:
base.twilltestcase DEBUG 2013-04-22 18:20:18,061 In submit_form, continuing, but caught exception: cannot find value/label "four_human_proteins.rename.tabular" in list control
It would appear that the tabular file has not been added to the potential valid datasets available to the $input_tabular parameter?
This test should have been attempted on the Test Tool Shed last night, but there is nothing to show for it - something that has happened in other corner cases - I'll flag this on the other thread. Likely this is due to the exception within the test framework itself.
Regards,
Peter