Problem with <change_format> and conditional inputs?
Hi all, An eagle eyed user has just spotted a bug in our BLAST wrappers and/or the Galaxy framework itself. 1. Run BLASTN (wrapper version v0.1.00 which is currently on the Test Tool Shed) 2. Select BLASTXML output, execute 3. While running click the "i" icon, which wrongly reports: Format:tabular 4. Check the "repeat", which correctly has XML output 5. Once finished, notice the output is XML, but Galaxy labelled it "tabular" 6. Workaround via the "pencil" icon, correct the datatype to "blastxml". This happens both on our production server: $ hg summary parent: 11218:26f58e05aa10 release_2013.11.04 Galaxy stable release for 2013.11.04. branch: stable And also on my development server with galaxy-central: $ hg summary parent: 13675:bc1173309bd5 tip Variable name fix for the tool shed's install and test framework. branch: default This used to work perfectly. We've not changed this area of the code in the BLAST wrappers directly - it uses a default output type of "tabular" and the <change_format> tag - expanding the macro we have: <outputs> <data name="output1" format="tabular" label="${blast_type.value} $query.name vs @ON_DB_SUBJECT@"> <!-- <expand macro="output_change_format" /> --> <change_format> <when input="out_format" value="0" format="txt"/> <when input="out_format" value="0 -html" format="html"/> <when input="out_format" value="2" format="txt"/> <when input="out_format" value="2 -html" format="html"/> <when input="out_format" value="4" format="txt"/> <when input="out_format" value="4 -html" format="html"/> <when input="out_format" value="5" format="blastxml"/> </change_format> </data> </outputs> What has changed recently in the NCBI BLAST wrappers is that input parameter "out_format" is now nested within a conditional block. Other tools using <change_format> seem to still work fine: https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id Can anyone testing the BLAST+ update on the Test Tool Shed reproduce this? Any thoughts on the cause and fix? I have to attend a meeting now, so I've not dug any deeper yet... Regards, Peter
Hi Peter, I think you need to have: <change_format> <when input="output.out_format" value="0" format="txt"/> <when input="output.out_format" value="0 -html" format="html"/> <when input="output.out_format" value="2" format="txt"/> <when input="output.out_format" value="2 -html" format="html"/> <when input="output.out_format" value="4" format="txt"/> <when input="output.out_format" value="4 -html" format="html"/> <when input="output.out_format" value="5" format="blastxml"/> </change_format> Sorry, can't test it right now. Best, Bjoern Am 10.03.2014 16:28, schrieb Peter Cock:
Hi all,
An eagle eyed user has just spotted a bug in our BLAST wrappers and/or the Galaxy framework itself.
1. Run BLASTN (wrapper version v0.1.00 which is currently on the Test Tool Shed) 2. Select BLASTXML output, execute 3. While running click the "i" icon, which wrongly reports:
Format:tabular
4. Check the "repeat", which correctly has XML output 5. Once finished, notice the output is XML, but Galaxy labelled it "tabular" 6. Workaround via the "pencil" icon, correct the datatype to "blastxml".
This happens both on our production server:
$ hg summary parent: 11218:26f58e05aa10 release_2013.11.04 Galaxy stable release for 2013.11.04. branch: stable
And also on my development server with galaxy-central:
$ hg summary parent: 13675:bc1173309bd5 tip Variable name fix for the tool shed's install and test framework. branch: default
This used to work perfectly. We've not changed this area of the code in the BLAST wrappers directly - it uses a default output type of "tabular" and the <change_format> tag - expanding the macro we have:
<outputs> <data name="output1" format="tabular" label="${blast_type.value} $query.name vs @ON_DB_SUBJECT@"> <!-- <expand macro="output_change_format" /> --> <change_format> <when input="out_format" value="0" format="txt"/> <when input="out_format" value="0 -html" format="html"/> <when input="out_format" value="2" format="txt"/> <when input="out_format" value="2 -html" format="html"/> <when input="out_format" value="4" format="txt"/> <when input="out_format" value="4 -html" format="html"/> <when input="out_format" value="5" format="blastxml"/> </change_format> </data> </outputs>
What has changed recently in the NCBI BLAST wrappers is that input parameter "out_format" is now nested within a conditional block.
Other tools using <change_format> seem to still work fine: https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id
Can anyone testing the BLAST+ update on the Test Tool Shed reproduce this? Any thoughts on the cause and fix? I have to attend a meeting now, so I've not dug any deeper yet...
Regards,
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/
On Tue, Mar 11, 2014 at 2:58 PM, Björn Grüning <bjoern.gruening@gmail.com> wrote:
Hi Peter,
I think you need to have:
<change_format> <when input="output.out_format" value="0" format="txt"/> <when input="output.out_format" value="0 -html" format="html"/> <when input="output.out_format" value="2" format="txt"/> <when input="output.out_format" value="2 -html" format="html"/> <when input="output.out_format" value="4" format="txt"/> <when input="output.out_format" value="4 -html" format="html"/> <when input="output.out_format" value="5" format="blastxml"/> </change_format>
Sorry, can't test it right now.
That seems to work - thanks Björn :) This seems to have exposed a bug in the <test> framework, e.g. <test> <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" /> <param name="db_opts_selector" value="file" /> <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" /> <param name="database" value="" /> <param name="evalue_cutoff" value="1e-40" /> <param name="out_format" value="5" /> <param name="adv_opts_selector" value="basic" /> <output name="output1" file="blastn_rhodopsin_vs_three_human.xml" ftype="blastxml" /> </test> This was saying the output should have been "blastxml", but until I just fixed it the output was being tagged as "tabular" (although run_functional_tests.sh did check the content it didn't check the datatype matched). Dave - do think this is a reasonable enhancement? Peter
Grepping around the code I think this is the only way a ftype attribute on an output affects the evaluation of test data. if attributes.get( 'ftype', None ) == 'bam': local_fh, temp_name = self._bam_to_sam( local_name, temp_name ) local_name = local_fh.name I am not sure it was ever meant as a strict test. I worry about breaking backward compatibility but it is easy enough to implement this as an actual check when using newer API driven tests. I have opened a pull request for this functionality here: https://bitbucket.org/galaxy/galaxy-central/pull-request/347/check-ftype-att... Thoughts? -John On Tue, Mar 11, 2014 at 10:30 AM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
On Tue, Mar 11, 2014 at 2:58 PM, Björn Grüning <bjoern.gruening@gmail.com> wrote:
Hi Peter,
I think you need to have:
<change_format> <when input="output.out_format" value="0" format="txt"/> <when input="output.out_format" value="0 -html" format="html"/> <when input="output.out_format" value="2" format="txt"/> <when input="output.out_format" value="2 -html" format="html"/> <when input="output.out_format" value="4" format="txt"/> <when input="output.out_format" value="4 -html" format="html"/> <when input="output.out_format" value="5" format="blastxml"/> </change_format>
Sorry, can't test it right now.
That seems to work - thanks Björn :)
This seems to have exposed a bug in the <test> framework, e.g.
<test> <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" /> <param name="db_opts_selector" value="file" /> <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" /> <param name="database" value="" /> <param name="evalue_cutoff" value="1e-40" /> <param name="out_format" value="5" /> <param name="adv_opts_selector" value="basic" /> <output name="output1" file="blastn_rhodopsin_vs_three_human.xml" ftype="blastxml" /> </test>
This was saying the output should have been "blastxml", but until I just fixed it the output was being tagged as "tabular" (although run_functional_tests.sh did check the content it didn't check the datatype matched).
Dave - do think this is a reasonable enhancement?
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/
participants (3)
-
Björn Grüning
-
John Chilton
-
Peter Cock