comparison idr_download_by_ids.xml @ 8:97f70f7ed077 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit e337464c8219abdb7e8664ba94cff46025070664"
author iuc
date Sun, 22 Nov 2020 13:55:01 +0000
parents f067504aa92a
children 80af973c5277
comparison
equal deleted inserted replaced
7:f067504aa92a 8:97f70f7ed077
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="idr_download_by_ids" name="IDR Download" version="0.43" profile="18.09"> 2 <tool id="idr_download_by_ids" name="IDR/OMERO Download" version="0.43" profile="18.09">
3 <description>- download images from the Image Data Resource 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@" />
8 <param name="y_coord" type="integer" value="0" min="0" 8 <param name="y_coord" type="integer" value="0" min="0"
20 <requirement type="package" version="0.4.2">pylibtiff</requirement> 20 <requirement type="package" version="0.4.2">pylibtiff</requirement>
21 </requirements> 21 </requirements>
22 <command detect_errors="exit_code"><![CDATA[ 22 <command detect_errors="exit_code"><![CDATA[
23 23
24 #if $omero_instance_type.omero_instance == "priv": 24 #if $omero_instance_type.omero_instance == "priv":
25 ## the user wants to use a non-public OMERO instance
26 ## check if credentials are set in the user-preferences, if not warn the user and exit
25 #set $username = $__user__.extra_preferences.get('omero_account|username', "") 27 #set $username = $__user__.extra_preferences.get('omero_account|username', "")
26 #set $password = $__user__.extra_preferences.get('omero_account|password', "") 28 #set $password = $__user__.extra_preferences.get('omero_account|password', "")
27 29
28 #if $username == "" or $password =="": 30 #if $omero_instance_type.galaxy_test_param != 'true' and ($username == "" or $password ==""):
29 echo "OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" && 31 echo "OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" 1>&2 &&
30 exit 1 32 exit 1 &&
31 #end if 33 #end if
32 #end if 34 #end if
33 35
34 mkdir downloads && cd downloads && 36 mkdir downloads && cd downloads &&
35 #if str($image_ids.source) == 'link': 37 #if str($image_ids.source) == 'link':
49 ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height} 51 ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height}
50 #end if 52 #end if
51 $skip_failed 53 $skip_failed
52 $download_tar 54 $download_tar
53 #if $omero_instance_type.omero_instance =='priv': 55 #if $omero_instance_type.omero_instance =='priv':
54 -h '$omero_host' 56 -oh '$omero_instance_type.omero_host'
55 $omero_secured 57 $omero_instance_type.omero_secured
56 -u '$username' 58 -cf '$credentials'
57 -p '$password'
58 #end if 59 #end if
59 2> >(tee -a $out_log >&2) 60 2> >(tee -a $out_log >&2)
60 ]]></command> 61 ]]></command>
62 <configfiles>
63 <configfile name="credentials"><![CDATA[
64 #if $omero_instance_type.omero_instance =='priv' and $omero_instance_type.galaxy_test_param == 'true':
65 ## as a test for a private instance we actually use a public instance, but with credentials
66 #set $username = 'public'
67 #set $password = 'public'
68 #else:
69 #set $username = $__user__.extra_preferences.get('omero_account|username', "")
70 #set $password = $__user__.extra_preferences.get('omero_account|password', "")
71 #end if
72 {
73 "username": "$username",
74 "password": "$password"
75 }
76 ]]></configfile>
77 </configfiles>
61 <inputs> 78 <inputs>
62 <conditional name="omero_instance_type"> 79 <conditional name="omero_instance_type">
63 <param name="omero_instance" type="select" label="Which OMERO instance to connect?" 80 <param name="omero_instance" type="select" label="Which OMERO instance to connect?"
64 help="By default, the tool will download a tarball containing individual images from IDR into your Galaxy history. If you 81 help="By default, the tool will download a tarball containing individual images from IDR into your Galaxy history. If you
65 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" > 82 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" >
66 <option value="idr">IDR</option> 83 <option value="idr">IDR</option>
67 <option value="priv">other OMERO instance</option> 84 <option value="priv">other OMERO instance</option>
68 </param> 85 </param>
69 <when value="priv"> 86 <when value="priv">
70 <param name="omero_host" type="text" label="OMERO host URL"> 87 <param name="omero_host" type="text" label="OMERO host URL">
71 <validator type="regex" message="Enter a valid host location, for example, your.omero.server"> 88 <validator type="regex" message="Enter a valid host location, for example, your.omero.server">^[a-zA-Z0-9._-]*$</validator>
72 [.A-Za-z0-9_-] 89 <validator type="expression" message="No two dots (..) allowed">'..' not in value</validator>
73 </validator>
74 </param> 90 </param>
75 <param name="omero_secured" type="boolean" label="Seured connection?" checked="true" truevalue="--omero-secured" falsevalue="" 91 <param name="omero_secured" type="boolean" label="Secured connection?" checked="true" truevalue="--omero-secured" falsevalue=""
76 help="Select Yes if your OMERO instance is running with SSL, otherwise select No"> 92 help="Select Yes if your OMERO instance is running with SSL, otherwise select No">
77 </param> 93 </param>
94 <param name="galaxy_test_param" type="hidden" value="false" />
78 </when> 95 </when>
79 <when value="idr" /> 96 <when value="idr" />
80 </conditional> 97 </conditional>
81 98
82 <conditional name="image_ids"> 99 <conditional name="image_ids">
298 <has_size value="685896" /> 315 <has_size value="685896" />
299 </has_archive_member> 316 </has_archive_member>
300 </assert_contents> 317 </assert_contents>
301 </output> 318 </output>
302 </test> 319 </test>
320 <test>
321 <conditional name="omero_instance_type">
322 <param name="omero_instance" value="priv" />
323 <param name="omero_host" value="idr.openmicroscopy.org" />
324 <param name="omero_secured" value="true" />
325 <param name="galaxy_test_param" value="true" />
326 </conditional>
327 <param name="source" value="dataset" />
328 <param name="id_spec" value="ids.txt" />
329 <param name="channel" value="PCNT" />
330 <conditional name="clip_image">
331 <param name="select" value="--rectangle" />
332 <param name="x_coord" value="3" />
333 <param name="y_coord" value="3" />
334 <param name="width" value="5" />
335 <param name="height" value="5" />
336 </conditional>
337 <param name="frame" value="0" />
338 <param name="download_tar" value="false" />
339 <output_collection name="output_file" type="list">
340 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff"/>
341 </output_collection>
342 </test>
343 <test expect_failure="true">
344 <conditional name="omero_instance_type">
345 <param name="omero_instance" value="priv" />
346 <param name="omero_host" value="idr.openmicroscopy.org" />
347 <param name="omero_secured" value="true" />
348 </conditional>
349 <param name="source" value="dataset" />
350 <param name="id_spec" value="ids.txt" />
351 <param name="channel" value="PCNT" />
352 <conditional name="clip_image">
353 <param name="select" value="--rectangle" />
354 <param name="x_coord" value="3" />
355 <param name="y_coord" value="3" />
356 <param name="width" value="5" />
357 <param name="height" value="5" />
358 </conditional>
359 <param name="frame" value="0" />
360 <param name="download_tar" value="false" />
361 <assert_stderr>
362 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" />
363 </assert_stderr >
364 </test>
303 </tests> 365 </tests>
304 <help><![CDATA[ 366 <help><![CDATA[
305 Download image data from the IDR_ (Image Data Resource) - a public repository 367 Download image data from the IDR_ (Image Data Resource) - a public repository
306 of reference image datasets from published scientific studies. 368 of reference image datasets from published scientific studies.
307 369