comparison idr_download_by_ids.xml @ 7:f067504aa92a draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit 6b9df5f3cf2518e48eced93a2904a89776bde02d"
author iuc
date Thu, 05 Nov 2020 23:29:40 +0000
parents 5c743356df83
children 97f70f7ed077
comparison
equal deleted inserted replaced
6:5c743356df83 7:f067504aa92a
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="idr_download_by_ids" name="IDR Download" version="0.42" profile="18.09"> 2 <tool id="idr_download_by_ids" name="IDR 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 the Image Data Resource 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@" />
14 label="Region height" 14 label="Region height"
15 help="Set to zero to extend the rectangle maximally along the y-axis of the image" /> 15 help="Set to zero to extend the rectangle maximally along the y-axis of the image" />
16 </xml> 16 </xml>
17 </macros> 17 </macros>
18 <requirements> 18 <requirements>
19 <requirement type="package" version="5.6.0">python-omero</requirement> 19 <requirement type="package" version="5.7.1">python-omero</requirement>
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
24 #if $omero_instance_type.omero_instance == "priv":
25 #set $username = $__user__.extra_preferences.get('omero_account|username', "")
26 #set $password = $__user__.extra_preferences.get('omero_account|password', "")
27
28 #if $username == "" or $password =="":
29 echo "OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" &&
30 exit 1
31 #end if
32 #end if
33
23 mkdir downloads && cd downloads && 34 mkdir downloads && cd downloads &&
24 #if str($image_ids.source) == 'link': 35 #if str($image_ids.source) == 'link':
25 python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))' 36 python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))'
26 ## https://idr.openmicroscopy.org/webclient/?show=image-3426274|image-3426275|image-3426276|image-3426277 37 ## https://idr.openmicroscopy.org/webclient/?show=image-3426274|image-3426275|image-3426276|image-3426277
27 #else: 38 #else:
37 #if str($clip_image.select): 48 #if str($clip_image.select):
38 ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height} 49 ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height}
39 #end if 50 #end if
40 $skip_failed 51 $skip_failed
41 $download_tar 52 $download_tar
42 53 #if $omero_instance_type.omero_instance =='priv':
54 -h '$omero_host'
55 $omero_secured
56 -u '$username'
57 -p '$password'
58 #end if
43 2> >(tee -a $out_log >&2) 59 2> >(tee -a $out_log >&2)
44 ]]></command> 60 ]]></command>
45 <inputs> 61 <inputs>
62 <conditional name="omero_instance_type">
63 <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
65 need to connect to your own instance, set your connection username and password from User->Preference->Manage Information" >
66 <option value="idr">IDR</option>
67 <option value="priv">other OMERO instance</option>
68 </param>
69 <when value="priv">
70 <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">
72 [.A-Za-z0-9_-]
73 </validator>
74 </param>
75 <param name="omero_secured" type="boolean" label="Seured connection?" checked="true" truevalue="--omero-secured" falsevalue=""
76 help="Select Yes if your OMERO instance is running with SSL, otherwise select No">
77 </param>
78 </when>
79 <when value="idr" />
80 </conditional>
81
46 <conditional name="image_ids"> 82 <conditional name="image_ids">
47 <param name="source" type="select" label="How would you like to specify the IDs of images to download?"> 83 <param name="source" type="select" label="How would you like to specify the IDs of images to download?">
48 <option value="link">As text (comma-separated list of IDs or a valid IDR link)</option> 84 <option value="link">As text (comma-separated list of IDs or a valid IDR link)</option>
49 <option value="dataset">As a dataset (one image ID per line)</option> 85 <option value="dataset">As a dataset (one image ID per line)</option>
50 </param> 86 </param>
102 <filter>download_tar</filter> 138 <filter>download_tar</filter>
103 </data> 139 </data>
104 </outputs> 140 </outputs>
105 <tests> 141 <tests>
106 <test> 142 <test>
143 <conditional name="omero_instance_type">
144 <param name="omero_instance" value="idr" />
145 </conditional>
107 <param name="source" value="dataset" /> 146 <param name="source" value="dataset" />
108 <param name="id_spec" value="ids.txt" /> 147 <param name="id_spec" value="ids.txt" />
109 <param name="channel" value="615.0" /> 148 <param name="channel" value="PCNT" />
110 <conditional name="clip_image"> 149 <conditional name="clip_image">
111 <param name="select" value="--rectangle" /> 150 <param name="select" value="--rectangle" />
112 <param name="x_coord" value="3" /> 151 <param name="x_coord" value="3" />
113 <param name="y_coord" value="3" /> 152 <param name="y_coord" value="3" />
114 <param name="width" value="5" /> 153 <param name="width" value="5" />
115 <param name="height" value="5" /> 154 <param name="height" value="5" />
116 </conditional> 155 </conditional>
117 <param name="frame" value="2" /> 156 <param name="frame" value="0" />
118 <param name="download_tar" value="false" /> 157 <param name="download_tar" value="false" />
119 <output_collection name="output_file" type="list"> 158 <output_collection name="output_file" type="list">
120 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/> 159 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test0.tiff"/>
121 </output_collection> 160 </output_collection>
122 </test> 161 </test>
123 <test> 162 <test>
163 <conditional name="omero_instance_type">
164 <param name="omero_instance" value="idr" />
165 </conditional>
124 <param name="source" value="link" /> 166 <param name="source" value="link" />
125 <param name="id_spec" value="1884807" /> 167 <param name="id_spec" value="1884807" />
126 <param name="channel" value="615.0" /> 168 <param name="channel" value="PCNT" />
127 <conditional name="clip_image"> 169 <conditional name="clip_image">
128 <param name="select" value="--rectangle" /> 170 <param name="select" value="--rectangle" />
129 <param name="x_coord" value="3" /> 171 <param name="x_coord" value="3" />
130 <param name="y_coord" value="3" /> 172 <param name="y_coord" value="3" />
131 <param name="width" value="5" /> 173 <param name="width" value="5" />
136 <output_collection name="output_file" type="list"> 178 <output_collection name="output_file" type="list">
137 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/> 179 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/>
138 </output_collection> 180 </output_collection>
139 </test> 181 </test>
140 <test> 182 <test>
183 <conditional name="omero_instance_type">
184 <param name="omero_instance" value="idr" />
185 </conditional>
141 <param name="source" value="link" /> 186 <param name="source" value="link" />
142 <param name="id_spec" value="1884807" /> 187 <param name="id_spec" value="1884807" />
143 <param name="channel" value="615.0" /> 188 <param name="channel" value="PCNT" />
144 <conditional name="clip_image"> 189 <conditional name="clip_image">
145 <param name="select" value="--center" /> 190 <param name="select" value="--center" />
146 <param name="x_coord" value="5" /> 191 <param name="x_coord" value="5" />
147 <param name="y_coord" value="5" /> 192 <param name="y_coord" value="5" />
148 <param name="width" value="5" /> 193 <param name="width" value="5" />
153 <output_collection name="output_file" type="list"> 198 <output_collection name="output_file" type="list">
154 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/> 199 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/>
155 </output_collection> 200 </output_collection>
156 </test> 201 </test>
157 <test> 202 <test>
203 <conditional name="omero_instance_type">
204 <param name="omero_instance" value="idr" />
205 </conditional>
158 <param name="source" value="link" /> 206 <param name="source" value="link" />
159 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" /> 207 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708|image-9036710|image-9036711" />
160 <param name="channel" value="Spo20(51-91)" /> 208 <param name="channel" value="Spo20(51-91)" />
161 <param name="z_section" value="4" /> 209 <param name="z_section" value="4" />
162 <conditional name="clip_image"> 210 <conditional name="clip_image">
177 <has_n_lines n="1"/> 225 <has_n_lines n="1"/>
178 </assert_contents> 226 </assert_contents>
179 </output> 227 </output>
180 </test> 228 </test>
181 <test expect_failure="true"> 229 <test expect_failure="true">
230 <conditional name="omero_instance_type">
231 <param name="omero_instance" value="idr" />
232 </conditional>
182 <!-- Test behavior with non-existing image-ID 9036708999 --> 233 <!-- Test behavior with non-existing image-ID 9036708999 -->
183 <param name="source" value="link" /> 234 <param name="source" value="link" />
184 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" /> 235 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" />
185 <param name="channel" value="Spo20(51-91)" /> 236 <param name="channel" value="Spo20(51-91)" />
186 <param name="z_section" value="4" /> 237 <param name="z_section" value="4" />
191 <param name="download_tar" value="false" /> 242 <param name="download_tar" value="false" />
192 </test> 243 </test>
193 <test> 244 <test>
194 <!-- Repeat test with non-existing image-ID 9036708999, 245 <!-- Repeat test with non-existing image-ID 9036708999,
195 but use skip-failed option --> 246 but use skip-failed option -->
247 <conditional name="omero_instance_type">
248 <param name="omero_instance" value="idr" />
249 </conditional>
196 <param name="source" value="link" /> 250 <param name="source" value="link" />
197 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" /> 251 <param name="id_spec" value="https://idr.openmicroscopy.org/webclient/?show=image-9036708999|image-9036710|image-9036711" />
198 <param name="channel" value="Spo20(51-91)" /> 252 <param name="channel" value="Spo20(51-91)" />
199 <param name="z_section" value="4" /> 253 <param name="z_section" value="4" />
200 <conditional name="clip_image"> 254 <conditional name="clip_image">
217 <has_n_lines n="2"/> 271 <has_n_lines n="2"/>
218 </assert_contents> 272 </assert_contents>
219 </output> 273 </output>
220 </test> 274 </test>
221 <test> 275 <test>
276 <conditional name="omero_instance_type">
277 <param name="omero_instance" value="idr" />
278 </conditional>
222 <!-- Test for download images in a tarball --> 279 <!-- Test for download images in a tarball -->
223 <param name="source" value="dataset" /> 280 <param name="source" value="dataset" />
224 <param name="id_spec" value="ids_tar.txt" /> 281 <param name="id_spec" value="ids_tar.txt" />
225 <param name="channel" value="Hoechst" /> 282 <param name="channel" value="Hoechst" />
226 <conditional name="clip_image"> 283 <conditional name="clip_image">