comparison idr_download_by_ids.xml @ 11:cbd605a24336 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit b68715960d1107593db13dd9e1dbd8d4b905cc6f"
author iuc
date Sat, 15 Jan 2022 12:25:29 +0000
parents 4aed70472589
children 4b794652dcdc
comparison
equal deleted inserted replaced
10:4aed70472589 11:cbd605a24336
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="idr_download_by_ids" name="IDR/OMERO Download" version="0.43" profile="18.09"> 2 <tool id="idr_download_by_ids" name="IDR/OMERO Download" version="0.44" profile="18.09">
3 <description>- download images from any OMERO instance using image IDs</description> 3 <description>- download images from any OMERO instance using image IDs</description>
4 <macros> 4 <macros>
5 <xml name="region_spec" token_pos="upper-left corner"> 5 <xml name="region_spec" token_pos="upper-left corner">
6 <param name="x_coord" type="integer" value="0" min="0" 6 <param name="x_coord" type="integer" value="0" min="0"
7 label="x-coordinate of region @POS@" /> 7 label="x-coordinate of region @POS@" />
44 #end if 44 #end if
45 | python '$__tool_directory__/idr_download_by_ids.py' 45 | python '$__tool_directory__/idr_download_by_ids.py'
46 #if str($image_ids.source) == 'omeroDatasetID': 46 #if str($image_ids.source) == 'omeroDatasetID':
47 --dataset 47 --dataset
48 #end if 48 #end if
49 #set $channel = str($channel).strip() 49 #if $image_region.original == "original":
50 #if $channel: 50 --download-original
51 -c '$channel' 51 #else:
52 #end if 52 #set $channel = str($image_region.channel).strip()
53 -f $frame 53 #if $channel:
54 -z $z_section 54 -c '$channel'
55 #if str($clip_image.select): 55 #end if
56 ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height} 56 -f $image_region.frame
57 -z $image_region.z_section
58 #if str($image_region.clip_image.select):
59 ${image_region.clip_image.select} ${image_region.clip_image.x_coord} ${image_region.clip_image.y_coord} ${image_region.clip_image.width} ${image_region.clip_image.height}
60 #end if
57 #end if 61 #end if
58 $skip_failed 62 $skip_failed
59 $download_tar 63 $download_tar
60 #if $omero_instance_type.omero_instance =='priv': 64 #if $omero_instance_type.omero_instance =='priv':
61 -oh '$omero_instance_type.omero_host' 65 -oh '$omero_instance_type.omero_host'
122 </when> 126 </when>
123 <when value="omeroDatasetID"> 127 <when value="omeroDatasetID">
124 <param name="id_dataset_omero" type="integer" min = "0" value = "9059" label="Dataset ID"/> 128 <param name="id_dataset_omero" type="integer" min = "0" value = "9059" label="Dataset ID"/>
125 </when> 129 </when>
126 </conditional> 130 </conditional>
127 <param name="channel" type="text" 131
128 label="Name of the channel to download" 132 <conditional name="image_region">
129 help="For all image IDs only the specified channel will be downloaded. If left empty, the first channel (whatever this is) will be downloaded by default." /> 133 <param name="original" type="select" label="Which images do you want to download?">
130 <param name="z_section" type="integer" value="0" min="0" 134 <option value="TIFF" selected="true">Exported TIFF (single channel, single stack)</option>
131 label="z-plane of images to download" /> 135 <option value="original">Original file (file uploaded to omero, only available for private instances)</option>
132 <param name="frame" type="integer" value="0" min="0"
133 label="Image frame to download" />
134 <conditional name="clip_image">
135 <param name="select" type="select"
136 label="Limit the download to a selected region of the image?">
137 <option value="">No, download the entire image plane</option>
138 <option value="--rectangle">Specify a region using its upper-left corner</option>
139 <option value="--center">Specify a width x height region around a central point</option>
140 </param> 136 </param>
141 <when value="" /> 137 <when value="original"/>
142 <when value="--rectangle"> 138 <when value="TIFF">
143 <expand macro="region_spec" /> 139 <param name="channel" type="text"
144 </when> 140 label="Name of the channel to download"
145 <when value="--center"> 141 help="For all image IDs only the specified channel will be downloaded. If left empty, the first channel (whatever this is) will be downloaded by default." />
146 <expand macro="region_spec" pos="center" /> 142 <param name="z_section" type="integer" value="0" min="0"
143 label="z-plane of images to download" />
144 <param name="frame" type="integer" value="0" min="0"
145 label="Image frame to download" />
146 <conditional name="clip_image">
147 <param name="select" type="select"
148 label="Limit the download to a selected region of the image?">
149 <option value="">No, download the entire image plane</option>
150 <option value="--rectangle">Specify a region using its upper-left corner</option>
151 <option value="--center">Specify a width x height region around a central point</option>
152 </param>
153 <when value="" />
154 <when value="--rectangle">
155 <expand macro="region_spec" />
156 </when>
157 <when value="--center">
158 <expand macro="region_spec" pos="center" />
159 </when>
160 </conditional>
147 </when> 161 </when>
148 </conditional> 162 </conditional>
149 <param name="skip_failed" type="boolean" checked="false" truevalue="--skip-failed" falsevalue="" 163 <param name="skip_failed" type="boolean" checked="false" truevalue="--skip-failed" falsevalue=""
150 label="Skip failed retrievals?" 164 label="Skip failed retrievals?"
151 help="By default the tool will fail with an error on the first non-retrievable image ID. Here, you can choose to skip non-retrievable image IDs and continue downloading the available ones instead. The error log will contain warnings about failed IDs in this case." /> 165 help="By default the tool will fail with an error on the first non-retrievable image ID. Here, you can choose to skip non-retrievable image IDs and continue downloading the available ones instead. The error log will contain warnings about failed IDs in this case." />
169 <conditional name="omero_instance_type"> 183 <conditional name="omero_instance_type">
170 <param name="omero_instance" value="idr" /> 184 <param name="omero_instance" value="idr" />
171 </conditional> 185 </conditional>
172 <param name="source" value="dataset" /> 186 <param name="source" value="dataset" />
173 <param name="id_spec" value="ids.txt" /> 187 <param name="id_spec" value="ids.txt" />
174 <param name="channel" value="PCNT" /> 188 <conditional name="image_region">
175 <conditional name="clip_image"> 189 <param name="original" value="TIFF"/>
176 <param name="select" value="--rectangle" /> 190 <param name="channel" value="PCNT" />
177 <param name="x_coord" value="3" /> 191 <conditional name="clip_image">
178 <param name="y_coord" value="3" /> 192 <param name="select" value="--rectangle" />
179 <param name="width" value="5" /> 193 <param name="x_coord" value="3" />
180 <param name="height" value="5" /> 194 <param name="y_coord" value="3" />
181 </conditional> 195 <param name="width" value="5" />
182 <param name="frame" value="0" /> 196 <param name="height" value="5" />
197 </conditional>
198 <param name="frame" value="0" />
199 </conditional>
183 <param name="download_tar" value="false" /> 200 <param name="download_tar" value="false" />
184 <output_collection name="output_file" type="list"> 201 <output_collection name="output_file" type="list">
185 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test0.tiff"/> 202 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test0.tiff"/>
186 </output_collection> 203 </output_collection>
187 </test> 204 </test>
189 <conditional name="omero_instance_type"> 206 <conditional name="omero_instance_type">
190 <param name="omero_instance" value="idr" /> 207 <param name="omero_instance" value="idr" />
191 </conditional> 208 </conditional>
192 <param name="source" value="link" /> 209 <param name="source" value="link" />
193 <param name="id_spec" value="1884807" /> 210 <param name="id_spec" value="1884807" />
194 <param name="channel" value="PCNT" /> 211 <conditional name="image_region">
195 <conditional name="clip_image"> 212 <param name="original" value="TIFF"/>
196 <param name="select" value="--rectangle" /> 213 <param name="channel" value="PCNT" />
197 <param name="x_coord" value="3" /> 214 <conditional name="clip_image">
198 <param name="y_coord" value="3" /> 215 <param name="select" value="--rectangle" />
199 <param name="width" value="5" /> 216 <param name="x_coord" value="3" />
200 <param name="height" value="5" /> 217 <param name="y_coord" value="3" />
201 </conditional> 218 <param name="width" value="5" />
202 <param name="frame" value="2" /> 219 <param name="height" value="5" />
220 </conditional>
221 <param name="frame" value="2" />
222 </conditional>
203 <param name="download_tar" value="false" /> 223 <param name="download_tar" value="false" />
204 <output_collection name="output_file" type="list"> 224 <output_collection name="output_file" type="list">
205 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test1.tiff"/> 225 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test1.tiff"/>
206 </output_collection> 226 </output_collection>
207 </test> 227 </test>
209 <conditional name="omero_instance_type"> 229 <conditional name="omero_instance_type">
210 <param name="omero_instance" value="idr" /> 230 <param name="omero_instance" value="idr" />
211 </conditional> 231 </conditional>
212 <param name="source" value="link" /> 232 <param name="source" value="link" />
213 <param name="id_spec" value="1884807" /> 233 <param name="id_spec" value="1884807" />
214 <param name="channel" value="PCNT" /> 234 <conditional name="image_region">
215 <conditional name="clip_image"> 235 <param name="original" value="TIFF"/>
216 <param name="select" value="--center" /> 236 <param name="channel" value="PCNT" />
217 <param name="x_coord" value="5" /> 237 <conditional name="clip_image">
218 <param name="y_coord" value="5" /> 238 <param name="select" value="--center" />
219 <param name="width" value="5" /> 239 <param name="x_coord" value="5" />
220 <param name="height" value="5" /> 240 <param name="y_coord" value="5" />
221 </conditional> 241 <param name="width" value="5" />
222 <param name="frame" value="2" /> 242 <param name="height" value="5" />
243 </conditional>
244 <param name="frame" value="2" />
245 </conditional>
223 <param name="download_tar" value="false" /> 246 <param name="download_tar" value="false" />
224 <output_collection name="output_file" type="list"> 247 <output_collection name="output_file" type="list">
225 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test2.tiff"/> 248 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test2.tiff"/>
226 </output_collection> 249 </output_collection>
227 </test> 250 </test>
229 <conditional name="omero_instance_type"> 252 <conditional name="omero_instance_type">
230 <param name="omero_instance" value="idr" /> 253 <param name="omero_instance" value="idr" />
231 </conditional> 254 </conditional>
232 <param name="source" value="link" /> 255 <param name="source" value="link" />
233 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" /> 256 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" />
234 <param name="channel" value="Spo20(51-91)" /> 257 <conditional name="image_region">
235 <param name="z_section" value="4" /> 258 <param name="original" value="TIFF"/>
236 <conditional name="clip_image"> 259 <param name="channel" value="Spo20(51-91)" />
237 <param name="select" value="" /> 260 <param name="z_section" value="4" />
238 </conditional> 261 <conditional name="clip_image">
239 <param name="frame" value="20" /> 262 <param name="select" value="" />
263 </conditional>
264 <param name="frame" value="20" />
265 </conditional>
240 <param name="download_tar" value="false" /> 266 <param name="download_tar" value="false" />
241 <output_collection name="output_file" type="list" count="3"> 267 <output_collection name="output_file" type="list" count="3">
242 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024"> 268 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
243 <assert_contents> 269 <assert_contents>
244 <has_size value="2097286" /> 270 <has_size value="2097286" />
257 <param name="omero_instance" value="idr" /> 283 <param name="omero_instance" value="idr" />
258 </conditional> 284 </conditional>
259 <!-- Test behavior with non-existing image-ID 9036708999 --> 285 <!-- Test behavior with non-existing image-ID 9036708999 -->
260 <param name="source" value="link" /> 286 <param name="source" value="link" />
261 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" /> 287 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" />
262 <param name="channel" value="Spo20(51-91)" /> 288 <conditional name="image_region">
263 <param name="z_section" value="4" /> 289 <param name="original" value="TIFF"/>
264 <conditional name="clip_image"> 290 <param name="channel" value="Spo20(51-91)" />
265 <param name="select" value="" /> 291 <param name="z_section" value="4" />
266 </conditional> 292 <conditional name="clip_image">
267 <param name="frame" value="20" /> 293 <param name="select" value="" />
294 </conditional>
295 <param name="frame" value="20" />
296 </conditional>
268 <param name="download_tar" value="false" /> 297 <param name="download_tar" value="false" />
269 </test> 298 </test>
270 <test> 299 <test>
271 <!-- Repeat test with non-existing image-ID 9036708999, 300 <!-- Repeat test with non-existing image-ID 9036708999,
272 but use skip-failed option --> 301 but use skip-failed option -->
273 <conditional name="omero_instance_type"> 302 <conditional name="omero_instance_type">
274 <param name="omero_instance" value="idr" /> 303 <param name="omero_instance" value="idr" />
275 </conditional> 304 </conditional>
276 <param name="source" value="link" /> 305 <param name="source" value="link" />
277 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" /> 306 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" />
278 <param name="channel" value="Spo20(51-91)" /> 307 <conditional name="image_region">
279 <param name="z_section" value="4" /> 308 <param name="original" value="TIFF"/>
280 <conditional name="clip_image"> 309 <param name="channel" value="Spo20(51-91)" />
281 <param name="select" value="" /> 310 <param name="z_section" value="4" />
282 </conditional> 311 <conditional name="clip_image">
283 <param name="frame" value="20" /> 312 <param name="select" value="" />
313 </conditional>
314 <param name="frame" value="20" />
315 </conditional>
284 <param name="skip_failed" value="true" /> 316 <param name="skip_failed" value="true" />
285 <param name="download_tar" value="false" /> 317 <param name="download_tar" value="false" />
286 <output_collection name="output_file" type="list" count="2"> 318 <output_collection name="output_file" type="list" count="2">
287 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024"> 319 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
288 <assert_contents> 320 <assert_contents>
303 <param name="omero_instance" value="idr" /> 335 <param name="omero_instance" value="idr" />
304 </conditional> 336 </conditional>
305 <!-- Test for download images in a tarball --> 337 <!-- Test for download images in a tarball -->
306 <param name="source" value="dataset" /> 338 <param name="source" value="dataset" />
307 <param name="id_spec" value="ids_tar.txt" /> 339 <param name="id_spec" value="ids_tar.txt" />
308 <param name="channel" value="Hoechst" /> 340 <conditional name="image_region">
309 <conditional name="clip_image"> 341 <param name="original" value="TIFF"/>
310 <param name="select" value="--rectangle" /> 342 <param name="channel" value="Hoechst" />
311 <param name="x_coord" value="0" /> 343 <conditional name="clip_image">
312 <param name="y_coord" value="0" /> 344 <param name="select" value="--rectangle" />
313 <param name="width" value="671" /> 345 <param name="x_coord" value="0" />
314 <param name="height" value="511" /> 346 <param name="y_coord" value="0" />
315 </conditional> 347 <param name="width" value="671" />
316 <param name="frame" value="0" /> 348 <param name="height" value="511" />
349 </conditional>
350 <param name="frame" value="0" />
351 </conditional>
317 <output name="output_tar"> 352 <output name="output_tar">
318 <assert_contents> 353 <assert_contents>
319 <has_size value="1382400" /> 354 <has_size value="1382400" />
320 <has_archive_member path=".*/*__1828167__0__0__671__511.tiff" > 355 <has_archive_member path=".*/*__1828167__0__0__671__511.tiff" >
321 <has_size value="685896" /> 356 <has_size value="685896" />
333 <param name="omero_secured" value="true" /> 368 <param name="omero_secured" value="true" />
334 <param name="galaxy_test_param" value="true" /> 369 <param name="galaxy_test_param" value="true" />
335 </conditional> 370 </conditional>
336 <param name="source" value="dataset" /> 371 <param name="source" value="dataset" />
337 <param name="id_spec" value="ids.txt" /> 372 <param name="id_spec" value="ids.txt" />
338 <param name="channel" value="PCNT" /> 373 <conditional name="image_region">
339 <conditional name="clip_image"> 374 <param name="original" value="TIFF"/>
340 <param name="select" value="--rectangle" /> 375 <param name="channel" value="PCNT" />
341 <param name="x_coord" value="3" /> 376 <conditional name="clip_image">
342 <param name="y_coord" value="3" /> 377 <param name="select" value="--rectangle" />
343 <param name="width" value="5" /> 378 <param name="x_coord" value="3" />
344 <param name="height" value="5" /> 379 <param name="y_coord" value="3" />
345 </conditional> 380 <param name="width" value="5" />
346 <param name="frame" value="0" /> 381 <param name="height" value="5" />
382 </conditional>
383 <param name="frame" value="0" />
384 </conditional>
347 <param name="download_tar" value="false" /> 385 <param name="download_tar" value="false" />
348 <output_collection name="output_file" type="list"> 386 <output_collection name="output_file" type="list">
349 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff"/> 387 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff"/>
350 </output_collection> 388 </output_collection>
351 </test> 389 </test>
355 <param name="omero_host" value="idr.openmicroscopy.org" /> 393 <param name="omero_host" value="idr.openmicroscopy.org" />
356 <param name="omero_secured" value="true" /> 394 <param name="omero_secured" value="true" />
357 </conditional> 395 </conditional>
358 <param name="source" value="dataset" /> 396 <param name="source" value="dataset" />
359 <param name="id_spec" value="ids.txt" /> 397 <param name="id_spec" value="ids.txt" />
360 <param name="channel" value="PCNT" /> 398 <conditional name="image_region">
361 <conditional name="clip_image"> 399 <param name="original" value="TIFF"/>
362 <param name="select" value="--rectangle" /> 400 <param name="channel" value="PCNT" />
363 <param name="x_coord" value="3" /> 401 <conditional name="clip_image">
364 <param name="y_coord" value="3" /> 402 <param name="select" value="--rectangle" />
365 <param name="width" value="5" /> 403 <param name="x_coord" value="3" />
366 <param name="height" value="5" /> 404 <param name="y_coord" value="3" />
367 </conditional> 405 <param name="width" value="5" />
368 <param name="frame" value="0" /> 406 <param name="height" value="5" />
407 </conditional>
408 <param name="frame" value="0" />
409 </conditional>
369 <param name="download_tar" value="false" /> 410 <param name="download_tar" value="false" />
370 <assert_stderr> 411 <assert_stderr>
371 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" /> 412 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" />
372 </assert_stderr > 413 </assert_stderr >
373 </test> 414 </test>
398 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_REF__9036709__0__0__1024__1024"> 439 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_REF__9036709__0__0__1024__1024">
399 <assert_contents> 440 <assert_contents>
400 <has_size value="2097286" /> 441 <has_size value="2097286" />
401 </assert_contents> 442 </assert_contents>
402 </element> 443 </element>
444 </output_collection>
445 </test>
446 <test>
447 <conditional name="omero_instance_type">
448 <param name="omero_instance" value="idr" />
449 </conditional>
450 <!-- Test for download all original files from a dataset -->
451 <!-- Impossible in idr: -->
452 <param name="source" value="omeroDatasetID" />
453 <param name="id_dataset_omero" value="9059" />
454 <param name="skip_failed" value="true" />
455 <param name="download_tar" value="false" />
456 <conditional name="image_region">
457 <param name="original" value="original"/>
458 </conditional>
459 <output_collection name="output_file" type="list" count="0">
403 </output_collection> 460 </output_collection>
404 </test> 461 </test>
405 </tests> 462 </tests>
406 <help><![CDATA[ 463 <help><![CDATA[
407 Download image data from the IDR_ (Image Data Resource) - a public repository 464 Download image data from the IDR_ (Image Data Resource) - a public repository