Hi Jennifer, sorry this doesn't work for me. If I use just the ${input} I get a reference to some memory location instead of the actual value. Therefore I was using the ${input.value_label} thing (on suggestion of the galaxy dev team :) ). But as mentioned this doesn't work for a conditional. Below I have a sample tool_xml just to illustrate the current tool_config and what I want to do. Using it like this give me a history box with something like: "Tool output <galaxy.tools.Tool instance at 0x6c186c8>". Obvious this is not what I want. Also using ${cmd} or ${tol.cmd} or ${tool.value_label} don't work. Any help or direction appreciated. Alex <tool id="testtool" name="test" version="0.1.alx" force_history_refresh="True"> <description>: Var test</description> <command> /opt/someTooldir/$tool.cmd $input1 #if $tool.cmd=="opt_2": -idr $tool.extra1 -idq $tool.extra2 #end if > $out_tool </command> <inputs> <conditional name="tool"> <param name="cmd" type="select" label="Tool to run" help="blablabla" > <option value="opt_1">option1</option> <option value="opt_2">option2</option> <option value="opt_3">option3</option> </param> <when value="opt_2"> <param name="extra1" type="text" value="0.05" label="IdR" /> <param name="extra2" type="text" value="50" label="IdQ" /> </when> <when value="opt_1" /> <when value="opt_3" /> </conditional> <param name="input1" type="data" format="tabular" label="MUMmer delta file" /> </inputs> <outputs> <data name="out_tool" format="text" label="Tool output ${tool}" /> </outputs> <requirements> </requirements> <tests> <test> </test> </tests> <help> </help> </help> </tool> ________________________________________ Van: Jennifer Jackson [jen@bx.psu.edu] Verzonden: vrijdag 22 oktober 2010 21:50 Aan: Bossers, Alex CC: galaxy-dev@lists.bx.psu.edu Onderwerp: Re: [galaxy-dev] Variabels in label elements Hi Alex, Conditional usage/data return is possible, but not for the exact syntax that you are using. Modifying the query by removing the ".value_label" from the key should help: change: ${input1.value_label} to be: ${input1} Please let us know if this works or not and we can help more from there, Best, Jen Galaxy team On 10/14/10 4:13 AM, Bossers, Alex wrote:
Hi All, Does someone know how to get the value of a type="select" param_name displayed in the output file label?
I know how to do it if its just a non-nested param setup-up using ${input1.value_label} where the input1 is the select_name. But this fails if the select is inside a conditional..... From cheetah script I can call these values like IF $tool.cmd=="something":..... But whatever I try in the<outputs><data> fails (I though it to be ${tool.cmd.value_label} but that complains on cmd not defined.... All possible iteration tried :( Snippet of a generalised tool.xml below. Any suggestions or hints where to get documentation on this syntax is welcomed! Alex
<command> /opt/tools/$tool.cmd $cmd_extra $input_delta #if $tool.cmd=="show-aligns": $tool.extra1 $tool.extra2 #end if > $out_tool </command> <inputs> <conditional name="tool"> <param name="cmd" type="select" value="show-snps" label="Select tool"> <option value="show-snps">show snps</option> <option value="show-aligns">show aligns</option> </param> <when value="show-aligns"> <param name="extra1" type="text" size="40" value="" label="IdR" help="FastA header ref sequence" /> <param name="extra2" type="text" size="40" value="" label="IdQ" help="FastA header query sequence" /> </when> <when value="show-snps" /> </conditional> <param name="input_delta" type="data" format="tabular" label="MUMmer delta file" /> <param name="cmd_extra" type="text" size="40" value="" label="Extra cmd line options" help="see specific cmd line options below for each tool" /> </inputs> <outputs> <data name="out_tool" format="text" label="tool ${tool.cmd.value_label}" /> </outputs>
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
-- Jennifer Jackson http://usegalaxy.org