comparison erecord_file.xml @ 0:27e7e4d38e44 draft

planemo upload for repository https://forgemia.inra.fr/nathalie.rousse/erecord-deploy/-/tree/main/galaxy-tools/erecord_file commit 88beb443a737b4c4d42bb0011a26a0acf535c366
author siwaa
date Tue, 12 Dec 2023 17:33:05 +0000
parents
children 9f7e56f56079
comparison
equal deleted inserted replaced
-1:000000000000 0:27e7e4d38e44
1 <tool id="erecord_file" name="erecord_file" version="1.0.0">
2
3 <description>erecord returning .json + maybe .zip or .xls</description>
4
5 <requirements>
6
7 <!-- singularity -->
8 <container type="singularity">oras://registry.forgemia.inra.fr/nathalie.rousse/erecord-deploy/erecord_rep0_vle2:82d8fea607be20851e194828125785fb0f7e96d0</container>
9
10 </requirements>
11
12 <command detect_errors="aggressive">
13 <![CDATA[
14
15 echo "action_name VAUT $request_condition.action_name";
16 #if $request_condition.action_name == 'post_vpz_experiment':
17 /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder} -experimentfile ${experimentfile}";
18 #elif $request_condition.action_name == 'post_vpz_report':
19 /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
20 #elif $request_condition.action_name == 'post_vpz_output':
21 /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
22 #elif $request_condition.action_name == 'post_vpz_inout':
23 /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
24 #else:
25 /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json}";
26 #end if
27
28 cp WS/OUT/output.json ${output_json};
29
30 #if $request_condition.action_name == 'get_vpz_experiment':
31 cp WS/OUT/experiment.xls ${experiment};
32 #elif $request_condition.action_name == 'post_vpz_experiment':
33 cp WS/OUT/experiment.xls ${experiment};
34 #elif $request_condition.action_name == 'get_vpz_report_conditions':
35 cp WS/OUT/conditions.xls ${conditions};
36 #elif $request_condition.action_name == 'post_vpz_report_conditions':
37 cp WS/OUT/conditions.xls ${conditions};
38 #elif $request_condition.action_name == 'get_vpz_report':
39 cp WS/OUT/report.zip ${report};
40 #elif $request_condition.action_name == 'post_vpz_report':
41 cp WS/OUT/report.zip ${report};
42 #end if
43
44 ]]>
45 </command>
46
47 <inputs>
48
49 <param name="input_json" optional="true" type="data" format="json"
50 label="Input json file"/>
51
52 <conditional name="request_condition">
53
54 <param name="action_name" type="select" label="Select action">
55 <option value="help" selected="true">help</option>
56 <option value="get_pkg_list">get_pkg_list</option>
57 <option value="get_pkg_vpz_list">get_pkg_vpz_list</option>
58 <option value="get_pkg_data_list">get_pkg_data_list</option>
59 <option value="get_vpz_input">get_vpz_input</option>
60 <option value="post_vpz_input">post_vpz_input</option>
61 <option value="get_vpz_output">get_vpz_output</option>
62 <option value="post_vpz_output">post_vpz_output</option>
63 <option value="get_vpz_inout">get_vpz_inout</option>
64 <option value="post_vpz_inout">post_vpz_inout</option>
65 <option value="get_vpz_experiment">get_vpz_experiment</option>
66 <option value="post_vpz_experiment">post_vpz_experiment</option>
67 <option value="get_vpz_report">get_vpz_report</option>
68 <option value="post_vpz_report">post_vpz_report</option>
69 <option value="get_vpz_report_conditions">get_vpz_report_conditions</option>
70 <option value="post_vpz_report_conditions">post_vpz_report_conditions</option>
71 </param>
72
73 <when value="post_vpz_experiment">
74
75 <param name="experimentfile" type="data" format="csv,xls"
76 label="Add a experiment xls (csv) file"
77 help="experimentfile from gest_vpz_experiment + modifications"/>
78 <param name="datafolder" optional="true" type="data" format="zip"
79 label="Add a datafolder zip file"
80 help="Precisions sur forme du dossier..."/>
81 </when>
82
83 <when value="post_vpz_report">
84 <param name="datafolder" optional="true" type="data" format="zip"
85 label="Add a datafolder zip file"
86 help="Precisions sur forme du dossier..."/>
87 </when>
88 <when value="post_vpz_output">
89 <param name="datafolder" optional="true" type="data" format="zip"
90 label="Add a datafolder zip file"
91 help="Precisions sur forme du dossier..."/>
92 </when>
93 <when value="post_vpz_inout">
94 <param name="datafolder" optional="true" type="data" format="zip"
95 label="Add a datafolder zip file"
96 help="Precisions sur forme du dossier..."/>
97 </when>
98
99 <when value="get_vpz_experiment" />
100 <when value="get_vpz_report_conditions" />
101 <when value="post_vpz_report_conditions"/>
102 <when value="get_vpz_report" />
103 <when value="get_vpz_input" />
104 <when value="post_vpz_input" />
105 <when value="get_vpz_output" />
106 <when value="get_vpz_inout" />
107 <when value="get_pkg_list" />
108 <when value="get_pkg_vpz_list" />
109 <when value="get_pkg_data_list" />
110 <when value="help" />
111
112 </conditional>
113
114 </inputs>
115
116 <outputs>
117
118 <data name="output_json" format="json" label="output_json"/>
119
120 <data name="experiment" format="xls" label="experiment">
121 <filter>request_condition['action_name'] == 'get_vpz_experiment' or request_condition['action_name'] == 'post_vpz_experiment'</filter>
122 </data>
123
124 <data name="conditions" format="xls" label="conditions.xls file">
125 <filter>request_condition['action_name'] == 'get_vpz_report_conditions' or request_condition['action_name'] == 'post_vpz_report_conditions'</filter>
126 </data>
127
128 <data name="report" format="zip" label="report">
129 <filter>request_condition['action_name'] == 'get_vpz_report' or request_condition['action_name'] == 'post_vpz_report'</filter>
130 </data>
131
132 </outputs>
133
134 <tests>
135 </tests>
136
137 <help><![CDATA[
138
139 erecord_file.xml
140
141 ================
142
143 Actions:
144
145 -------
146
147 - 'help'
148 - 'get_pkg_list' 'get_pkg_vpz_list' 'get_pkg_data_list'
149 - 'get_vpz_input' 'post_vpz_input'
150 - 'get_vpz_output' 'post_vpz_output'
151 - 'get_vpz_inout' 'post_vpz_inout'
152 - 'get_vpz_experiment' 'post_vpz_experiment'
153 - 'get_vpz_report_conditions' 'post_vpz_report_conditions'
154 - 'get_vpz_report' 'post_vpz_report'
155
156 Code:
157
158 ----
159
160 - main_file.py
161
162 Inputs:
163
164 -------
165
166 - action value (mandatory)
167
168 - data json file (optional) (json file, param type="data")
169 An action value that would be into data would be ignored
170
171 - experiment.xls (only in 'post_vpz_experiment' case)
172
173 - datafolder (optional) (only in cases :
174 'post_vpz_experiment', 'post_vpz_report', 'post_vpz_output', 'post_vpz_inout')
175
176 Outputs:
177
178 --------
179
180 - data json file
181
182 - 1 other file (xls or zip) :
183 - if 'action' == get_vpz_experiment, post_vpz_experiment :
184 experiment.xls file
185 - if 'action' == get_vpz_report_conditions, post_vpz_report_conditions :
186 conditions.xls file
187 - if 'action' == get_vpz_report, post_vpz_report :
188 report.zip file
189
190 Credits:
191
192 --------
193
194 - Author: Nathalie Rousse nathalie.rousse@inrae.fr
195 - Copyright: INRAE
196
197 ]]>
198 </help>
199
200 </tool>
201