comparison idr_download_by_ids.xml @ 13:f92941d1a85e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit a9a143bae95eb6c553fd3d5955c2adb34352480f
author iuc
date Thu, 26 Sep 2024 12:32:17 +0000
parents 4b794652dcdc
children
comparison
equal deleted inserted replaced
12:4b794652dcdc 13:f92941d1a85e
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="idr_download_by_ids" name="Download IDR/OMERO" version="0.44.1" profile="18.09"> 2 <tool id="idr_download_by_ids" name="Download IDR/OMERO" version="0.45" profile="18.09">
3 <description></description> 3 <description></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@" />
17 </macros> 17 </macros>
18 <edam_operations> 18 <edam_operations>
19 <edam_operation>operation_3443</edam_operation> 19 <edam_operation>operation_3443</edam_operation>
20 </edam_operations> 20 </edam_operations>
21 <requirements> 21 <requirements>
22 <requirement type="package" version="5.10.1">omero-py</requirement> 22 <requirement type="package" version="5.19.4">omero-py</requirement>
23 <requirement type="package" version="0.4.2">pylibtiff</requirement> 23 <requirement type="package" version="2024.9.20">tifffile</requirement>
24 </requirements> 24 </requirements>
25 <command detect_errors="exit_code"><![CDATA[ 25 <command detect_errors="exit_code"><![CDATA[
26 26
27 #if $omero_instance_type.omero_instance == "priv": 27 #if $omero_instance_type.omero_instance == "priv":
28 ## the user wants to use a non-public OMERO instance 28 ## the user wants to use a non-public OMERO instance
49 #if str($image_ids.source) == 'omeroDatasetID': 49 #if str($image_ids.source) == 'omeroDatasetID':
50 --dataset 50 --dataset
51 #end if 51 #end if
52 #if $image_region.original == "original": 52 #if $image_region.original == "original":
53 --download-original 53 --download-original
54 #elif $image_region.original == "full":
55 --download-full
54 #else: 56 #else:
55 #set $channel = str($image_region.channel).strip() 57 #set $channel = str($image_region.channel).strip()
56 #if $channel: 58 #if $channel:
57 -c '$channel' 59 -c '$channel'
58 #end if 60 #end if
85 "username": "$username", 87 "username": "$username",
86 "password": "$password" 88 "password": "$password"
87 } 89 }
88 ]]></configfile> 90 ]]></configfile>
89 </configfiles> 91 </configfiles>
90 <inputs> 92 <inputs>
91 <conditional name="omero_instance_type"> 93 <conditional name="omero_instance_type">
92 <param name="omero_instance" type="select" label="Which OMERO instance to connect?" 94 <param name="omero_instance" type="select" label="Which OMERO instance to connect?"
93 help="By default, the tool will download a tarball containing individual images from IDR into your Galaxy history. If you 95 help="By default, the tool will download a tarball containing individual images from IDR into your Galaxy history. If you
94 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" > 96 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" >
95 <option value="idr">IDR</option> 97 <option value="idr">IDR</option>
133 </conditional> 135 </conditional>
134 136
135 <conditional name="image_region"> 137 <conditional name="image_region">
136 <param name="original" type="select" label="Which images do you want to download?"> 138 <param name="original" type="select" label="Which images do you want to download?">
137 <option value="TIFF" selected="true">Exported TIFF (single channel, single stack)</option> 139 <option value="TIFF" selected="true">Exported TIFF (single channel, single stack)</option>
140 <option value="full">Whole TIFF (all channels, all frames, all stacks)</option>
138 <option value="original">Original file (file uploaded to omero, only available for private instances)</option> 141 <option value="original">Original file (file uploaded to omero, only available for private instances)</option>
139 </param> 142 </param>
140 <when value="original"/> 143 <when value="original"/>
144 <when value="full"/>
141 <when value="TIFF"> 145 <when value="TIFF">
142 <param name="channel" type="text" 146 <param name="channel" type="text"
143 label="Name of the channel to download" 147 label="Name of the channel to download"
144 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." /> 148 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." />
145 <param name="z_section" type="integer" value="0" min="0" 149 <param name="z_section" type="integer" value="0" min="0"
180 <data name="output_tar" format="tar" from_work_dir="./downloads/images.tar" label ="Images tarball"> 184 <data name="output_tar" format="tar" from_work_dir="./downloads/images.tar" label ="Images tarball">
181 <filter>download_tar</filter> 185 <filter>download_tar</filter>
182 </data> 186 </data>
183 </outputs> 187 </outputs>
184 <tests> 188 <tests>
185 <test> 189 <test expect_num_outputs="2">
186 <conditional name="omero_instance_type"> 190 <conditional name="omero_instance_type">
187 <param name="omero_instance" value="idr" /> 191 <param name="omero_instance" value="idr" />
188 </conditional> 192 </conditional>
189 <param name="source" value="dataset" /> 193 <param name="source" value="dataset" />
190 <param name="id_spec" value="ids.txt" /> 194 <param name="id_spec" value="ids.txt" />
200 </conditional> 204 </conditional>
201 <param name="frame" value="0" /> 205 <param name="frame" value="0" />
202 </conditional> 206 </conditional>
203 <param name="download_tar" value="false" /> 207 <param name="download_tar" value="false" />
204 <output_collection name="output_file" type="list"> 208 <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="test0.tiff"/> 209 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test0.tiff" compare="image_diff" />
206 </output_collection> 210 </output_collection>
207 </test> 211 </test>
208 <test> 212 <test expect_num_outputs="2">
209 <conditional name="omero_instance_type"> 213 <conditional name="omero_instance_type">
210 <param name="omero_instance" value="idr" /> 214 <param name="omero_instance" value="idr" />
211 </conditional> 215 </conditional>
212 <param name="source" value="link" /> 216 <param name="source" value="link" />
213 <param name="id_spec" value="1884807" /> 217 <param name="id_spec" value="1884807" />
223 </conditional> 227 </conditional>
224 <param name="frame" value="2" /> 228 <param name="frame" value="2" />
225 </conditional> 229 </conditional>
226 <param name="download_tar" value="false" /> 230 <param name="download_tar" value="false" />
227 <output_collection name="output_file" type="list"> 231 <output_collection name="output_file" type="list">
228 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test1.tiff"/> 232 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test1.tiff" compare="image_diff"/>
229 </output_collection> 233 </output_collection>
230 </test> 234 </test>
231 <test> 235 <test expect_num_outputs="2">
232 <conditional name="omero_instance_type"> 236 <conditional name="omero_instance_type">
233 <param name="omero_instance" value="idr" /> 237 <param name="omero_instance" value="idr" />
234 </conditional> 238 </conditional>
235 <param name="source" value="link" /> 239 <param name="source" value="link" />
236 <param name="id_spec" value="1884807" /> 240 <param name="id_spec" value="1884807" />
246 </conditional> 250 </conditional>
247 <param name="frame" value="2" /> 251 <param name="frame" value="2" />
248 </conditional> 252 </conditional>
249 <param name="download_tar" value="false" /> 253 <param name="download_tar" value="false" />
250 <output_collection name="output_file" type="list"> 254 <output_collection name="output_file" type="list">
251 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test2.tiff"/> 255 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" ftype="tiff" file="test2.tiff" compare="image_diff"/>
252 </output_collection> 256 </output_collection>
253 </test> 257 </test>
254 <test> 258 <test expect_num_outputs="2">
255 <conditional name="omero_instance_type"> 259 <conditional name="omero_instance_type">
256 <param name="omero_instance" value="idr" /> 260 <param name="omero_instance" value="idr" />
257 </conditional> 261 </conditional>
258 <param name="source" value="link" /> 262 <param name="source" value="link" />
259 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" /> 263 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" />
268 </conditional> 272 </conditional>
269 <param name="download_tar" value="false" /> 273 <param name="download_tar" value="false" />
270 <output_collection name="output_file" type="list" count="3"> 274 <output_collection name="output_file" type="list" count="3">
271 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024"> 275 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
272 <assert_contents> 276 <assert_contents>
273 <has_size value="2097286" /> 277 <has_size size="2097286" />
278 <has_image_width width="1024" />
279 <has_image_height height="1024" />
280 <has_image_mean_intensity mean_intensity="320.868" />
281 <has_image_center_of_mass center_of_mass="541.664, 456.743" />
274 </assert_contents> 282 </assert_contents>
275 </element> 283 </element>
276 </output_collection> 284 </output_collection>
277 <output name="out_log"> 285 <output name="out_log">
278 <assert_contents> 286 <assert_contents>
297 </conditional> 305 </conditional>
298 <param name="frame" value="20" /> 306 <param name="frame" value="20" />
299 </conditional> 307 </conditional>
300 <param name="download_tar" value="false" /> 308 <param name="download_tar" value="false" />
301 </test> 309 </test>
302 <test> 310 <test expect_num_outputs="2">
303 <!-- Repeat test with non-existing image-ID 9036708999, 311 <!-- Repeat test with non-existing image-ID 9036708999,
304 but use skip-failed option --> 312 but use skip-failed option -->
305 <conditional name="omero_instance_type"> 313 <conditional name="omero_instance_type">
306 <param name="omero_instance" value="idr" /> 314 <param name="omero_instance" value="idr" />
307 </conditional> 315 </conditional>
319 <param name="skip_failed" value="true" /> 327 <param name="skip_failed" value="true" />
320 <param name="download_tar" value="false" /> 328 <param name="download_tar" value="false" />
321 <output_collection name="output_file" type="list" count="2"> 329 <output_collection name="output_file" type="list" count="2">
322 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024"> 330 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
323 <assert_contents> 331 <assert_contents>
324 <has_size value="2097286" /> 332 <has_size size="2097286" />
333 <has_image_width width="1024" />
334 <has_image_height height="1024" />
335 <has_image_mean_intensity mean_intensity="320.868" />
336 <has_image_center_of_mass center_of_mass="541.664, 456.743" />
325 </assert_contents> 337 </assert_contents>
326 </element> 338 </element>
327 </output_collection> 339 </output_collection>
328 <output name="out_log"> 340 <output name="out_log">
329 <assert_contents> 341 <assert_contents>
331 <has_text text="(ID: 9036710): Specified image plane (4) is out of bounds" /> 343 <has_text text="(ID: 9036710): Specified image plane (4) is out of bounds" />
332 <has_n_lines n="2"/> 344 <has_n_lines n="2"/>
333 </assert_contents> 345 </assert_contents>
334 </output> 346 </output>
335 </test> 347 </test>
336 <test> 348 <test expect_num_outputs="2">
337 <conditional name="omero_instance_type"> 349 <conditional name="omero_instance_type">
338 <param name="omero_instance" value="idr" /> 350 <param name="omero_instance" value="idr" />
339 </conditional> 351 </conditional>
340 <!-- Test for download images in a tarball --> 352 <!-- Test for download images in a tarball -->
341 <param name="source" value="dataset" /> 353 <param name="source" value="dataset" />
352 </conditional> 364 </conditional>
353 <param name="frame" value="0" /> 365 <param name="frame" value="0" />
354 </conditional> 366 </conditional>
355 <output name="output_tar"> 367 <output name="output_tar">
356 <assert_contents> 368 <assert_contents>
357 <has_size value="1382400" /> 369 <has_size size="1382400" />
358 <has_archive_member path=".*/*__1828167__0__0__671__511.tiff" > 370 <has_archive_member path=".*/*__1828167__0__0__671__511.tiff" >
359 <has_size value="685896" /> 371 <has_size size="685896" />
372 <has_image_width width="671" />
373 <has_image_height height="511" />
374 <has_image_mean_intensity mean_intensity="388.711" />
375 <has_image_center_of_mass center_of_mass="354.627, 267" />
360 </has_archive_member> 376 </has_archive_member>
361 <has_archive_member path=".*/*__1828658__0__0__671__511.tiff" > 377 <has_archive_member path=".*/*__1828658__0__0__671__511.tiff" >
362 <has_size value="685896" /> 378 <has_size size="685896" />
379 <has_image_width width="671" />
380 <has_image_height height="511" />
381 <has_image_mean_intensity mean_intensity="397.507" />
382 <has_image_center_of_mass center_of_mass="346.098, 250.652" />
363 </has_archive_member> 383 </has_archive_member>
364 </assert_contents> 384 </assert_contents>
365 </output> 385 </output>
366 </test> 386 </test>
367 <test> 387 <test expect_num_outputs="2">
368 <conditional name="omero_instance_type"> 388 <conditional name="omero_instance_type">
369 <param name="omero_instance" value="priv" /> 389 <param name="omero_instance" value="priv" />
370 <param name="omero_host" value="idr.openmicroscopy.org" /> 390 <param name="omero_host" value="idr.openmicroscopy.org" />
371 <param name="omero_secured" value="true" /> 391 <param name="omero_secured" value="true" />
372 <param name="galaxy_test_param" value="true" /> 392 <param name="galaxy_test_param" value="true" />
385 </conditional> 405 </conditional>
386 <param name="frame" value="0" /> 406 <param name="frame" value="0" />
387 </conditional> 407 </conditional>
388 <param name="download_tar" value="false" /> 408 <param name="download_tar" value="false" />
389 <output_collection name="output_file" type="list"> 409 <output_collection name="output_file" type="list">
390 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff"/> 410 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff" compare="image_diff"/>
391 </output_collection> 411 </output_collection>
392 </test> 412 </test>
393 <test expect_failure="true"> 413 <test expect_failure="true">
394 <conditional name="omero_instance_type"> 414 <conditional name="omero_instance_type">
395 <param name="omero_instance" value="priv" /> 415 <param name="omero_instance" value="priv" />
413 <param name="download_tar" value="false" /> 433 <param name="download_tar" value="false" />
414 <assert_stderr> 434 <assert_stderr>
415 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" /> 435 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" />
416 </assert_stderr > 436 </assert_stderr >
417 </test> 437 </test>
418 <test> 438 <test expect_num_outputs="2">
419 <conditional name="omero_instance_type"> 439 <conditional name="omero_instance_type">
420 <param name="omero_instance" value="idr" /> 440 <param name="omero_instance" value="idr" />
421 </conditional> 441 </conditional>
422 <!-- Test for download all images from a dataset --> 442 <!-- Test for download all images from a dataset -->
423 <param name="source" value="omeroDatasetID" /> 443 <param name="source" value="omeroDatasetID" />
424 <param name="id_dataset_omero" value="9059" /> 444 <param name="id_dataset_omero" value="9059" />
425 <param name="download_tar" value="false" /> 445 <param name="download_tar" value="false" />
426 <output_collection name="output_file" type="list" count="4"> 446 <output_collection name="output_file" type="list" count="4">
427 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024"> 447 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
428 <assert_contents> 448 <assert_contents>
429 <has_size value="2097286" /> 449 <has_size size="2097286" />
450 <has_image_width width="1024" />
451 <has_image_height height="1024" />
452 <has_image_mean_intensity mean_intensity="145.310" />
453 <has_image_center_of_mass center_of_mass="527.499, 480.704" />
430 </assert_contents> 454 </assert_contents>
431 </element> 455 </element>
432 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D__9036708__0__0__1024__1024"> 456 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D__9036708__0__0__1024__1024">
433 <assert_contents> 457 <assert_contents>
434 <has_size value="2097286" /> 458 <has_size size="2097286" />
459 <has_image_width width="1024" />
460 <has_image_height height="1024" />
461 <has_image_mean_intensity mean_intensity="147.025" />
462 <has_image_center_of_mass center_of_mass="528.977, 480.691" />
435 </assert_contents> 463 </assert_contents>
436 </element> 464 </element>
437 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D_zproj__9036710__0__0__1024__1024"> 465 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D_zproj__9036710__0__0__1024__1024">
438 <assert_contents> 466 <assert_contents>
439 <has_size value="2097286" /> 467 <has_size size="2097286" />
468 <has_image_width width="1024" />
469 <has_image_height height="1024" />
470 <has_image_mean_intensity mean_intensity="210.787" />
471 <has_image_center_of_mass center_of_mass="534.629, 473.267" />
440 </assert_contents> 472 </assert_contents>
441 </element> 473 </element>
442 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_REF__9036709__0__0__1024__1024"> 474 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_REF__9036709__0__0__1024__1024">
443 <assert_contents> 475 <assert_contents>
444 <has_size value="2097286" /> 476 <has_size size="2097286" />
445 </assert_contents> 477 <has_image_width width="1024" />
446 </element> 478 <has_image_height height="1024" />
447 </output_collection> 479 <has_image_mean_intensity mean_intensity="3816.051" />
448 </test> 480 <has_image_center_of_mass center_of_mass="512.274, 503.186" />
449 <test> 481 </assert_contents>
482 </element>
483 </output_collection>
484 </test>
485 <test expect_num_outputs="2">
450 <conditional name="omero_instance_type"> 486 <conditional name="omero_instance_type">
451 <param name="omero_instance" value="idr" /> 487 <param name="omero_instance" value="idr" />
452 </conditional> 488 </conditional>
453 <!-- Test for download all original files from a dataset --> 489 <!-- Test for download all original files from a dataset -->
454 <!-- Impossible in idr: --> 490 <!-- Impossible in idr: -->
458 <param name="download_tar" value="false" /> 494 <param name="download_tar" value="false" />
459 <conditional name="image_region"> 495 <conditional name="image_region">
460 <param name="original" value="original"/> 496 <param name="original" value="original"/>
461 </conditional> 497 </conditional>
462 <output_collection name="output_file" type="list" count="0"> 498 <output_collection name="output_file" type="list" count="0">
499 </output_collection>
500 </test>
501 <test expect_num_outputs="2">
502 <conditional name="omero_instance_type">
503 <param name="omero_instance" value="idr" />
504 </conditional>
505 <param name="source" value="link" />
506 <param name="id_spec" value="1229801" />
507 <param name="download_tar" value="false" />
508 <conditional name="image_region">
509 <param name="original" value="full"/>
510 </conditional>
511 <output_collection name="output_file" type="list" count="1">
512 <element name="JL_120731_S6A_[Well_A-1;_Field_#1]__1229801__full">
513 <assert_contents>
514 <has_size size="91592058" />
515 </assert_contents>
516 </element>
463 </output_collection> 517 </output_collection>
464 </test> 518 </test>
465 </tests> 519 </tests>
466 <help><![CDATA[ 520 <help><![CDATA[
467 Download image data from the IDR_ (Image Data Resource) - a public repository 521 Download image data from the IDR_ (Image Data Resource) - a public repository