comparison omero_get_children_ids.xml @ 0:b0876c73076b draft

planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/omero_get_children_ids commit 8ac44b0341c70ce330fc0f24712b6f9b59b14731
author lldelisle
date Fri, 22 Dec 2023 12:55:40 +0000
parents
children 82f2efb46200
comparison
equal deleted inserted replaced
-1:000000000000 0:b0876c73076b
1 <tool id="omero_get_children_ids" name="Omero" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>Get children ids</description>
3 <macros>
4 <token name="@TOOL_VERSION@">0.1.0</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <requirements>
8 <requirement type="package" version="5.17.0">omero-py</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 #if $omero_instance_type.omero_instance == "priv":
12 ## the user wants to use a non-public OMERO instance
13 ## check if credentials are set in the user-preferences, if not warn the user and exit
14 #set $username = $__user__.extra_preferences.get('omero_account|username', "")
15 #set $password = $__user__.extra_preferences.get('omero_account|password', "")
16
17 #if $omero_instance_type.galaxy_test_param != 'true' and ($username == "" or $password ==""):
18 echo "OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" 1>&2 &&
19 exit 1 &&
20 #end if
21 #end if
22 python '$__tool_directory__/omero_get_children_ids.py'
23 #if $omero_instance_type.omero_instance =='priv':
24 -oh '$omero_instance_type.omero_host'
25 $omero_instance_type.omero_secured
26 -cf '$credentials'
27 #end if
28 --parent-object-type '$omero_object.parent_object_type'
29 --omero-id '$omero_object.omero_id'
30 --final-object-type '$omero_object.final_object_type'
31 --output '$output'
32 ]]></command>
33 <configfiles>
34 <configfile name="credentials"><![CDATA[
35 #if $omero_instance_type.omero_instance =='priv' and $omero_instance_type.galaxy_test_param == 'true':
36 ## as a test for a private instance we actually use a public instance, but with credentials
37 #set $username = 'public'
38 #set $password = 'public'
39 #else:
40 #set $username = $__user__.extra_preferences.get('omero_account|username', "")
41 #set $password = $__user__.extra_preferences.get('omero_account|password', "")
42 #end if
43 {
44 "username": "$username",
45 "password": "$password"
46 }
47 ]]></configfile>
48 </configfiles>
49 <inputs>
50 <conditional name="omero_instance_type">
51 <param name="omero_instance" type="select" label="Which OMERO instance to connect?"
52 help="By default, the tool will request children ID from IDR. If you
53 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" >
54 <option value="idr">IDR</option>
55 <option value="priv">other OMERO instance</option>
56 </param>
57 <when value="priv">
58 <param name="omero_host" type="text" label="OMERO host URL">
59 <validator type="regex" message="Enter a valid host location, for example, your.omero.server">^[a-zA-Z0-9._-]*$</validator>
60 <validator type="expression" message="No two dots (..) allowed">'..' not in value</validator>
61 </param>
62 <param name="omero_secured" type="boolean" label="Secured connection?" checked="true" truevalue="--omero-secured" falsevalue=""
63 help="Select Yes if your OMERO instance is running with SSL, otherwise select No">
64 </param>
65 <param name="galaxy_test_param" type="hidden" value="false" />
66 </when>
67 <when value="idr" />
68 </conditional>
69 <conditional name="omero_object">
70 <param name="parent_object_type" type="select" label="Type of parent object">
71 <option value="well">Well</option>
72 <option value="plate">Plate</option>
73 <option value="screen">Screen</option>
74 <option value="dataset">Dataset</option>
75 <option value="project">Project</option>
76 </param>
77 <when value="well">
78 <param name="omero_id" type="integer" value="" label="Well ID on omero" />
79 <param name="final_object_type" type="hidden" value="image"/>
80 </when>
81 <when value="plate">
82 <param name="omero_id" type="integer" value="" label="Plate ID on omero" />
83 <param name="final_object_type" type="select" label="Type of children object for which you want the id">
84 <option value="image">All Omero Image Ids</option>
85 <option value="well">All Omero Well Ids</option>
86 </param>
87 </when>
88 <when value="screen">
89 <param name="omero_id" type="integer" value="" label="Screen ID on omero" />
90 <param name="final_object_type" type="select" label="Type of children object for which you want the id">
91 <option value="image">All Omero Image Ids</option>
92 <option value="well">All Omero Well Ids</option>
93 <option value="plate">All Omero Plate Ids</option>
94 </param>
95 </when>
96 <when value="dataset">
97 <param name="omero_id" type="integer" value="" label="Dataset ID on omero" />
98 <param name="final_object_type" type="hidden" value="image"/>
99 </when>
100 <when value="project">
101 <param name="omero_id" type="integer" value="" label="Project ID on omero" />
102 <param name="final_object_type" type="select" label="Type of children object for which you want the id">
103 <option value="image">All Omero Image Ids</option>
104 <option value="dataset">All Omero Dataset Ids</option>
105 </param>
106 </when>
107 </conditional>
108 </inputs>
109 <outputs>
110 <data name="output" format="tabular" label="All ${omero_object.final_object_type} from ${omero_object.parent_object_type} ID ${omero_object.omero_id}" />
111 </outputs>
112 <tests>
113 <test expect_num_outputs="1">
114 <conditional name="omero_instance_type">
115 <param name="omero_instance" value="idr"/>
116 </conditional>
117 <conditional name="omero_object">
118 <param name="parent_object_type" value="well"/>
119 <param name="omero_id" value="2184933"/>
120 <param name="final_object_type" value="image"/>
121 </conditional>
122 <output name="output">
123 <assert_contents>
124 <has_line line="14263182"/>
125 <has_n_lines n="4"/>
126 </assert_contents>
127 </output>
128 </test>
129 <test expect_num_outputs="1">
130 <conditional name="omero_instance_type">
131 <param name="omero_instance" value="idr"/>
132 </conditional>
133 <conditional name="omero_object">
134 <param name="parent_object_type" value="plate"/>
135 <param name="omero_id" value="10055"/>
136 <param name="final_object_type" value="image"/>
137 </conditional>
138 <output name="output">
139 <assert_contents>
140 <has_line line="14263182"/>
141 <has_n_lines n="1300"/>
142 </assert_contents>
143 </output>
144 </test>
145 <test expect_num_outputs="1">
146 <conditional name="omero_instance_type">
147 <param name="omero_instance" value="idr"/>
148 </conditional>
149 <conditional name="omero_object">
150 <param name="parent_object_type" value="plate"/>
151 <param name="omero_id" value="10055"/>
152 <param name="final_object_type" value="well"/>
153 </conditional>
154 <output name="output">
155 <assert_contents>
156 <has_line line="2184933"/>
157 <has_n_lines n="325"/>
158 </assert_contents>
159 </output>
160 </test>
161 <test expect_num_outputs="1">
162 <conditional name="omero_instance_type">
163 <param name="omero_instance" value="idr"/>
164 </conditional>
165 <conditional name="omero_object">
166 <param name="parent_object_type" value="screen"/>
167 <param name="omero_id" value="3302"/>
168 <param name="final_object_type" value="image"/>
169 </conditional>
170 <output name="output">
171 <assert_contents>
172 <has_line line="14263182"/>
173 <has_n_lines n="9100"/>
174 </assert_contents>
175 </output>
176 </test>
177 <test expect_num_outputs="1">
178 <conditional name="omero_instance_type">
179 <param name="omero_instance" value="idr"/>
180 </conditional>
181 <conditional name="omero_object">
182 <param name="parent_object_type" value="screen"/>
183 <param name="omero_id" value="3302"/>
184 <param name="final_object_type" value="plate"/>
185 </conditional>
186 <output name="output">
187 <assert_contents>
188 <has_line line="10055"/>
189 <has_n_lines n="7"/>
190 </assert_contents>
191 </output>
192 </test>
193 <test expect_num_outputs="1">
194 <conditional name="omero_instance_type">
195 <param name="omero_instance" value="idr"/>
196 </conditional>
197 <conditional name="omero_object">
198 <param name="parent_object_type" value="screen"/>
199 <param name="omero_id" value="3302"/>
200 <param name="final_object_type" value="well"/>
201 </conditional>
202 <output name="output">
203 <assert_contents>
204 <has_line line="2184933"/>
205 <has_n_lines n="2275"/>
206 </assert_contents>
207 </output>
208 </test>
209 <test expect_num_outputs="1">
210 <conditional name="omero_instance_type">
211 <param name="omero_instance" value="idr"/>
212 </conditional>
213 <conditional name="omero_object">
214 <param name="parent_object_type" value="dataset"/>
215 <param name="omero_id" value="18101"/>
216 <param name="final_object_type" value="image"/>
217 </conditional>
218 <output name="output">
219 <assert_contents>
220 <has_line line="15148237"/>
221 <has_n_lines n="199"/>
222 </assert_contents>
223 </output>
224 </test>
225 <test expect_num_outputs="1">
226 <conditional name="omero_instance_type">
227 <param name="omero_instance" value="idr"/>
228 </conditional>
229 <conditional name="omero_object">
230 <param name="parent_object_type" value="project"/>
231 <param name="omero_id" value="2801"/>
232 <param name="final_object_type" value="image"/>
233 </conditional>
234 <output name="output">
235 <assert_contents>
236 <has_line line="15148237"/>
237 <has_n_lines n="494"/>
238 </assert_contents>
239 </output>
240 </test>
241 <test expect_num_outputs="1">
242 <conditional name="omero_instance_type">
243 <param name="omero_instance" value="idr"/>
244 </conditional>
245 <conditional name="omero_object">
246 <param name="parent_object_type" value="project"/>
247 <param name="omero_id" value="2801"/>
248 <param name="final_object_type" value="dataset"/>
249 </conditional>
250 <output name="output">
251 <assert_contents>
252 <has_line line="18101"/>
253 <has_n_lines n="2"/>
254 </assert_contents>
255 </output>
256 </test>
257 </tests>
258 <help><![CDATA[
259
260 .. class:: infomark
261
262 **What it does**
263
264 This tool will create a file with the list of all children ids of a given omero object.
265
266 ]]></help>
267 </tool>