Mercurial > repos > iuc > compose_text_param
comparison compose_text_param.xml @ 0:feb3acba1e0a draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/compose_text_param commit 8aabc55146cdeb7ca2f0ab9d55d2f044ab59e569
author | iuc |
---|---|
date | Fri, 07 Jun 2019 09:22:41 -0400 |
parents | |
children | e188c9826e0f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:feb3acba1e0a |
---|---|
1 <tool name="Compose text parameter value" id="compose_text_param" version="0.1.0" profile="19.05" tool_type="expression"> | |
2 <description>from parameters</description> | |
3 <expression type="ecma5.1"> | |
4 { | |
5 let s = ""; | |
6 for (const repeat of $job.components) { | |
7 s += repeat.param_type.component_value | |
8 }; | |
9 return {'output': s}; | |
10 } | |
11 </expression> | |
12 <inputs> | |
13 <repeat name="components" min="1"> | |
14 <conditional name="param_type"> | |
15 <param name="select_param_type" type="select" label="Choose the type of parameter for this field"> | |
16 <option value="text">Text Parameter</option> | |
17 <option value="integer">Integer Parameter</option> | |
18 <option value="float">Float Parameter</option> | |
19 </param> | |
20 <when value="text"> | |
21 <param name="component_value" type="text" label="Enter text that should be part of the computed value"/> | |
22 </when> | |
23 <when value="integer"> | |
24 <param name="component_value" value="" type="integer" label="Enter integer that should be part of the computed value"/> | |
25 </when> | |
26 <when value="float"> | |
27 <param name="component_value" value="" type="float" label="Enter float that should be part of the computed value"/> | |
28 </when> | |
29 </conditional> | |
30 </repeat> | |
31 </inputs> | |
32 <outputs> | |
33 <output type="text" name="out1" from="output" /> | |
34 </outputs> | |
35 <tests> | |
36 <test> | |
37 <repeat name="components"> | |
38 <conditional name="param_type"> | |
39 <param name="select_param_type" value="text"/> | |
40 <param name="component_value" value="Text: "/> | |
41 </conditional> | |
42 </repeat> | |
43 <repeat name="components"> | |
44 <conditional name="param_type"> | |
45 <param name="select_param_type" value="text"/> | |
46 <param name="component_value" value="value,"/> | |
47 </conditional> | |
48 </repeat> | |
49 <repeat name="components"> | |
50 <conditional name="param_type"> | |
51 <param name="select_param_type" value="text"/> | |
52 <param name="component_value" value=" Integer: "/> | |
53 </conditional> | |
54 </repeat> | |
55 <repeat name="components"> | |
56 <conditional name="param_type"> | |
57 <param name="select_param_type" value="integer"/> | |
58 <param name="component_value" value="1"/> | |
59 </conditional> | |
60 </repeat> | |
61 <repeat name="components"> | |
62 <conditional name="param_type"> | |
63 <param name="select_param_type" value="text"/> | |
64 <param name="component_value" value=", Float: "/> | |
65 </conditional> | |
66 </repeat> | |
67 <repeat name="components"> | |
68 <conditional name="param_type"> | |
69 <param name="select_param_type" value="float"/> | |
70 <param name="component_value" value="1.5"/> | |
71 </conditional> | |
72 </repeat> | |
73 <output name="output"> | |
74 <assert_contents> | |
75 <!-- <has_line line="'"Text: value, Integer: 1, Float: 1.5"'"/> --> | |
76 <has_line line=""Text: value, Integer: 1, Float: 1.5""/> | |
77 </assert_contents> | |
78 </output> | |
79 </test> | |
80 </tests> | |
81 <help><![CDATA[ | |
82 This tool concatenates each parameter value to a string. | |
83 If used in a workflow you can connect the output to any | |
84 text parameter value. | |
85 ]]></help> | |
86 </tool> |