Hi, In addition to Alex's point, see the wiki page http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput for information about setting conditional output types when they aren't directly dependent on another file input type. With this approach, you need to set the condition per output file (name and type). It is basically a filter, so that you say, "Only generate this output under this condition". So you would need something as follows: For a parameter like this: <param name="condparam" type="select" label="Choose one"> <option value="one">One=FASTA</option> <option value="two">Two=Tabular</option> <option value="three">Three=Text</option> <option value="four">Four=Text</option> <option value="five">Five=Text</option> </param> This output definition: <data name="output1" format="fasta"> <filter>condparam == 'one'</filter> </data> <data name="output2" format="tabular"> <filter>condparam == 'two'</filter> </data> <data name="output3" format="txt"> <filter>condparam != 'one' and condparam != 'two'</filter> <!-- You could also do it this way: <filter>condparam == 'three' or condparam == 'four' or condparam == 'five'</filter> --> </data> <data name="output4" format="sam" /> would always generate output4 but would generate exactly one of the other outputs, depending on the selection the user makes. Let us know if you have any further questions. Regards, Kelly On Oct 19, 2010, at 2:20 AM, Bossers, Alex wrote:
Yes, A simple example is in the filter/sorter.xml and pasteWrapper tool_config. Basically by the metadata_source in sorter:
<outputs> <data format="input" name="out_file1" metadata_source="input"/> </outputs>
A format example in the tools/filter/pasteWrapper.xml where you use conditionals:
<outputs> <data format="input" name="out_file1" metadata_source="input1"> <change_format> <when input_dataset="input1" attribute="ext" value="bed" format="interval"/> </change_format> </data> </outputs>
Hope this helped,
Alex
-----Oorspronkelijk bericht----- Van: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu ] Namens Zhe Chen Verzonden: dinsdag 19 oktober 2010 0:48 Aan: galaxy-dev@bx.psu.edu Onderwerp: [galaxy-dev] Dynamic output format
Hi,
Can the format of a tool's "output" be dynamic according to the user's input?
See example below, when user chose fasta, let the output format be fasta, when user choose table, let the output format be tabular.
<input> <param name="outputFormat" type="select" label="Select output format"> <option value="fasta" selected="true">Fasta</option> <option value="table">Table</option> <option value="mase">Mase/IG</option> <option value="pretty">Pretty print</option> <option value="outali">Output aligned</option> <option value="clustal">Clustal</option> <option value="phylipi">Phylip interleaved</option> <option value="phylips">Phylip sequential</option> <option value="msf">MSF</option> <option value="rsf">RSF</option> <option value="megai">MEGA interleaved</option> <option value="megas">MEGA sequential</option> <option value="slx">SLX</option> <option value="gde">GDE</option> <option value="GDEFlat">GDEflat</option> <option value="stockholm">Stockholm</option> <option value="nexusi">Nexus interleaved</option> <option value="nexuss">Nexus sequential</option> <option value="pir">PIR/NBRF</option> <option value="gcg">GCG</option> <option value="raw">Raw</option> </param> </input>
<outputs> <data name="output" format="tabular"/> </outputs>
Thanks _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev