I added an example taken from trim.seqs.xml in the Mothur metagenomics 
tool_suite to:

The following will create datasets in the history panel, setting the output data type to 
be the same as that of an input dataset named by the "format_source" attribute. 
Note that a conditional name is not included, so 2 separate conditional blocks should not 
contain parameters with the same name.

<!-- fasta may be an aligned fasta that subclasses Fasta -->
<param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
<conditional name="qual">
<param name="add" type="select" label="Trim based on a quality file?" help="">
<option value="no">no</option>
<option value="yes">yes</option>
<when value="no"/>
<when value="yes">
<!-- qual454, qualsolid, qualillumina -->
<param name="qfile" type="data" format="qual" label="qfile - a quality file"/>
<data format_source="fasta" name="trim_fasta" label="${tool.name} on ${on_string}: 
<data format_source="qfile" name="trim_qual" label="${tool.name} on ${on_string}: 
<filter>(qual['add'] == 'yes')</filter>

On 6/9/11 2:39 AM, Peter Cock wrote:
On Wed, Jun 8, 2011 at 9:59 PM, Jim Johnson<johns...@umn.edu>  wrote:
It went into galaxy-central:

$ hg log -pr 5082
changeset:   5082:a86e1fa82a89
user:        Kanwei Li<kan...@gmail.com>
date:        Thu Feb 17 15:35:07 2011 -0500
summary:     Add a "format_source" attribute to the ToolConfig output data
element [JJ Johnson]. Closes #470


And I should have put an example in:
Oh right - better late than never ;)

On the bright side because this commit was a while ago, it has
already been included in the stable Galaxy releases.

Thanks for this, I can think of several of my own tools where this
will work much more cleanly than the current solution using
<change_format>  and<when>.



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:


Reply via email to