Mercurial > repos > bgruening > cp_common
comparison common.xml @ 0:9c8ee01c0b22 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 6d73056a625002d0275b5a9a90a9fae329ce47f1"
author | bgruening |
---|---|
date | Thu, 26 Mar 2020 16:23:56 -0400 |
parents | |
children | 0b7db679fff8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9c8ee01c0b22 |
---|---|
1 <tool id="cp_common" name="cellProfiler common start modules" version="@CP_VERSION@"> | |
2 <description>load images and metadata into cellProfiler</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 <xml name="image_type_condition"> | |
6 <conditional name="con_set_intensity"> | |
7 <param name="set_intensity_range_from" type="select" label="Set intensity range from"> | |
8 <option value="Image metadata">Image metadata</option> | |
9 <option value="Image bit-depth">Image bit-depth</option> | |
10 <option value="Manual">Manual</option> | |
11 </param> | |
12 <when value="Manual"> | |
13 <param name="maximum_intensity" type="float" value="255.0" label="Maximum intensity"/> | |
14 </when> | |
15 <when value="Image metadata" /> | |
16 <when value="Image bit-depth" /> | |
17 </conditional> | |
18 </xml> | |
19 <xml name="name_type_rule_matching_file"> | |
20 <param name="operator" type="select"> | |
21 <option value="does">Does</option> | |
22 <option value="doesnot">Does not</option> | |
23 </param> | |
24 <param name="contain" type="select"> | |
25 <option value="contain">Contain</option> | |
26 <option value="Contain regular expression">Contain regular expression</option> | |
27 <option value="startwith">Start with</option> | |
28 <option value="endwith">End with</option> | |
29 <option value="Exactly match">Exactly match</option> | |
30 </param> | |
31 <param name="match_value" type="text"/> | |
32 </xml> | |
33 <xml name="image_matching_rules"> | |
34 <repeat name="r_match_rule" title="Rules"> | |
35 <param name="match_all_any" type="select" display="radio" label="Match the following rules"> | |
36 <option value="and">All</option> | |
37 <option value="or">Any</option> | |
38 </param> | |
39 <conditional name="con_match"> | |
40 <param name="rule_type" type="select" label="Select rule criteria"> | |
41 <option value="file">File</option> | |
42 <option value="directory">Directory</option> | |
43 <option value="extension">Extension</option> | |
44 <option value="image">Image</option> | |
45 <option value="metadata">Metadata</option> | |
46 </param> | |
47 <when value="file"> | |
48 <expand macro="name_type_rule_matching_file"/> | |
49 </when> | |
50 <when value="directory"> | |
51 <expand macro="name_type_rule_matching_file"/> | |
52 </when> | |
53 <when value="extension" /> | |
54 <when value="image"/> | |
55 <when value="metadata"/> | |
56 </conditional> | |
57 <param name="name_to_assign" label="Name to assign these images" type="text" /> | |
58 <conditional name="con_select_image_type"> | |
59 <param name="select_image_type" type="select" label="Select the image type"> | |
60 <option value="Grayscale image">Grayscale image</option> | |
61 <option value="Color image">Color image</option> | |
62 <option value="Binary mask">Binary mask</option> | |
63 </param> | |
64 <when value ="Grayscale image"> | |
65 <expand macro="image_type_condition" /> | |
66 </when> | |
67 <when value="Color image"> | |
68 <expand macro="image_type_condition" /> | |
69 </when> | |
70 <when value="Binary mask"> | |
71 </when> | |
72 </conditional> | |
73 </repeat> | |
74 </xml> | |
75 </macros> | |
76 <expand macro="py_requirements"/> | |
77 | |
78 <command detect_errors="aggressive"><![CDATA[ | |
79 python '$script_file' '$inputs' | |
80 ]]></command> | |
81 | |
82 <configfiles> | |
83 <inputs name="inputs"/> | |
84 <configfile name="script_file"> | |
85 import json | |
86 import sys | |
87 import os | |
88 | |
89 FOURSPACES = @SPACES@ | |
90 | |
91 input_json_path = sys.argv[1] | |
92 | |
93 params = json.load(open(input_json_path, "r")) | |
94 | |
95 | |
96 def write_images(): | |
97 filter_images = params['images']['filter_images'] | |
98 | |
99 _str = "\nImages:[module_num:1|svn_version:\\'Unknown\\'|variable_revision_number:2|show_window:False|notes:\\x5B\\'To begin creating your project, use the Images module to compile a list of files and/or folders that you want to analyze. You can also specify a set of rules to include only the desired files in your selected folders.\\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]\n" | |
100 _str += FOURSPACES+":\n" | |
101 _str += FOURSPACES + "Filter images?:%s\n" % filter_images | |
102 _str += FOURSPACES + "Select the rule criteria:and (extension does isimage) (directory doesnot startwith \".\")\n" | |
103 | |
104 return _str | |
105 | |
106 | |
107 def write_metadata(): | |
108 metadata_extraction = params['metadata']['con_metadata_extraction'] | |
109 extract = metadata_extraction['extract'] | |
110 | |
111 if 'extraction_method' in metadata_extraction: | |
112 method_count = len(metadata_extraction['extraction_method']) | |
113 else: | |
114 method_count = 1 | |
115 | |
116 _str = "\nMetadata:[module_num:2|svn_version:\\'Unknown\\'|variable_revision_number:4|show_window:False|notes:\\x5B\\'The Metadata module optionally allows you to extract information describing your images (i.e, metadata) which will be stored along with your measurements. This information can be contained in the file name and/or location, or in an external file.\\'\x5D|batch_state:array(\x5B\x5D, dtype=uint8)|enabled:True|wants_pause:False]\n" | |
117 _str += FOURSPACES + "Extract metadata?:%s\n" % extract | |
118 | |
119 if extract == "No": | |
120 _str += FOURSPACES + "Metadata data type:Text\n" | |
121 _str += FOURSPACES + "Metadata types:{}\n" | |
122 _str += FOURSPACES + "Extraction method count:%d\n" % method_count | |
123 _str += FOURSPACES + "Metadata extraction method:Extract from file/folder names\n" | |
124 _str += FOURSPACES + "Regular expression to extract from file name:^(?P<Plate>.*)_(?P<Well>\x5BA-P\x5D\x5B0-9\x5D{2})_s(?P<Site>\x5B0-9\x5D)_w(?P<ChannelNumber>\x5B0-9\x5D)\n" | |
125 _str += FOURSPACES + "Regular expression to extract from folder name:(?P<Date>\x5B0-9\x5D{4}_\x5B0-9\x5D{2}_\x5B0-9\x5D{2})$\n" | |
126 _str += FOURSPACES + "Extract metadata from:All images\n" | |
127 _str += FOURSPACES + "Select the filtering criteria:and (file does contain \"\")\n" | |
128 _str += FOURSPACES + "Metadata file location:\n" | |
129 _str += FOURSPACES + "Match file and image metadata:\x5B\x5D\n" | |
130 _str += FOURSPACES + "Use case insensitive matching?:No\n" | |
131 else: | |
132 _str += FOURSPACES + "Metadata data type:%s\n" % metadata_extraction['metadata_type'] | |
133 _str += FOURSPACES + "Metadata types:{}\n" | |
134 _str += FOURSPACES + "Extraction method count:%d\n" % method_count | |
135 | |
136 for methods in metadata_extraction["extraction_method"]: | |
137 _str += FOURSPACES + "Metadata extraction method:%s\n" % methods["metadata_extraction_method"] | |
138 _str += FOURSPACES + "Metadata source:%s\n" % methods["metadata_source"] | |
139 _str += FOURSPACES + "Regular expression to extract from file name:%s\n" % methods["file_name_regex"] | |
140 _str += FOURSPACES + "Regular expression to extract from folder name:%s\n" % methods["folder_name_regex"] | |
141 _str += FOURSPACES + "Extract metadata from:%s\n" % methods["extract_metadata_from"] | |
142 _str += FOURSPACES + "Select the filtering criteria:and (file does contain \"\")\n" | |
143 _str += FOURSPACES + "Metadata file location:\n" | |
144 _str += FOURSPACES + "Match file and image metadata:\x5B\x5D\n" | |
145 _str += FOURSPACES + "Use case insensitive matching?:No\n" | |
146 | |
147 return _str | |
148 | |
149 | |
150 def write_nameandtypes(): | |
151 nameandtypes = params['nameandtypes'] | |
152 assign_a_name = nameandtypes['con_assign_a_name_to']['assign_a_name_to'] | |
153 | |
154 if "con_select_image_type" in nameandtypes['con_assign_a_name_to']: | |
155 con_set_intensity = nameandtypes['con_assign_a_name_to']['con_select_image_type']['con_set_intensity'] | |
156 max_intensity = con_set_intensity['maximum_intensity'] if "maximum_intensity" in con_set_intensity else 255.0 | |
157 else: | |
158 max_intensity = 255.0 | |
159 | |
160 pixel_space = nameandtypes['pixel_space'] | |
161 | |
162 rule_count = len(nameandtypes['r_match_rule']) if "r_match_rule" in nameandtypes else 1 | |
163 | |
164 process_3d = nameandtypes['pixel_space']['process_3d'] | |
165 x_spacing = 1.0 if "x_spacing" not in pixel_space else pixel_space["x_spacing"] | |
166 y_spacing = 1.0 if "y_spacing" not in pixel_space else pixel_space["y_spacing"] | |
167 z_spacing = 1.0 if "z_spacing" not in pixel_space else pixel_space["z_spacing"] | |
168 | |
169 _str = "\nNamesAndTypes:[module_num:3|svn_version:\\'Unknown\\'|variable_revision_number:8|show_window:False|notes:\\x5B\\'The NamesAndTypes module allows you to assign a meaningful name to each image by which other modules will refer to it.\\'\\x5D|batch_state:array(\\x5B\\x5D, dtype=uint8)|enabled:True|wants_pause:False]\n" | |
170 | |
171 _str += FOURSPACES + "Assign a name to:%s\n" % assign_a_name | |
172 | |
173 if assign_a_name == "All images": | |
174 _str += FOURSPACES + "Select the image type:%s\n" % nameandtypes['con_assign_a_name_to']['con_select_image_type']['select_image_type'] | |
175 _str += FOURSPACES + "Name to assign these images:%s\n" % nameandtypes['con_assign_a_name_to']['name_to_assign'] | |
176 _str += FOURSPACES + "Match metadata:[]\n" | |
177 | |
178 _str += FOURSPACES + "Image set matching method:Order\n" | |
179 _str += FOURSPACES + "Set intensity range from:%s\n" % con_set_intensity['set_intensity_range_from'] | |
180 _str += FOURSPACES + "Assignments count:%s\n" % rule_count | |
181 _str += FOURSPACES + "Single images count:0\n" | |
182 _str += FOURSPACES + "Maximum intensity:%.1f\n" % max_intensity | |
183 _str += FOURSPACES + "Process as 3D?:%s\n" % process_3d | |
184 | |
185 _str += FOURSPACES + "Relative pixel spacing in X:%.1f\n" + x_spacing | |
186 _str += FOURSPACES + "Relative pixel spacing in Y:%.1f\n" + y_spacing | |
187 _str += FOURSPACES + "Relative pixel spacing in Z:%.1f\n" + z_spacing | |
188 else: | |
189 _str += FOURSPACES + "Select the image type:Grayscale image\n" | |
190 _str += FOURSPACES + "Name to assign these images:DNA\n" | |
191 _str += FOURSPACES + "Match metadata:[]\n" | |
192 | |
193 _str += FOURSPACES + "Image set matching method:%s\n" % nameandtypes['con_assign_a_name_to']['matching_method'] | |
194 _str += FOURSPACES + "Set intensity range from:Image metadata\n" | |
195 _str += FOURSPACES + "Assignments count:%d\n" % rule_count | |
196 _str += FOURSPACES + "Single images count:0\n" | |
197 _str += FOURSPACES + "Maximum intensity:%.1f\n" % max_intensity | |
198 _str += FOURSPACES + "Process as 3D?:%s\n" % process_3d | |
199 | |
200 _str += FOURSPACES + "Relative pixel spacing in X:1.0\n" | |
201 _str += FOURSPACES + "Relative pixel spacing in Y:1.0\n" | |
202 _str += FOURSPACES + "Relative pixel spacing in Z:1.0\n" | |
203 | |
204 for rule in nameandtypes["con_assign_a_name_to"]["r_match_rule"]: | |
205 _str += FOURSPACES + "Select the rule criteria:%s%s%s%s%s%s%s%s%s%s\n" % (rule["match_all_any"], " (",rule["con_match"]["rule_type"], " ",rule["con_match"]["operator"]," ",rule["con_match"]["contain"]," \"",rule["con_match"]["match_value"],"\")") | |
206 _str += FOURSPACES + "Name to assign these images:%s\n" % rule["name_to_assign"] | |
207 _str += FOURSPACES + "Name to assign these objects:Cell\n" | |
208 _str += FOURSPACES + "Select the image type:%s\n" % rule["con_select_image_type"]["select_image_type"] | |
209 | |
210 intensity_range = rule["con_select_image_type"]["con_set_intensity"]["set_intensity_range_from"] | |
211 | |
212 _str += FOURSPACES + "Set intensity range from:%s\n" % intensity_range | |
213 _str += FOURSPACES + "Select the image type:%s\n" % rule["con_select_image_type"]["select_image_type"] | |
214 | |
215 if intensity_range == "Manual": | |
216 _str += FOURSPACES + "Maximum intensity:%s\n" % rule["con_select_image_type"]["con_set_intensity"]["maximum_intensity"] | |
217 else: | |
218 _str += FOURSPACES + "Maximum intensity:255.0\n" | |
219 | |
220 if process_3d == "Yes": | |
221 _str += FOURSPACES + "Relative pixel spacing in X:%.1f\n" + x_spacing | |
222 _str += FOURSPACES + "Relative pixel spacing in Y:%.1f\n" + y_spacing | |
223 _str += FOURSPACES + "Relative pixel spacing in Z:%.1f\n" + z_spacing | |
224 | |
225 return _str | |
226 | |
227 | |
228 def write_groups(): | |
229 groups = params['groups'] | |
230 | |
231 _str = "\nGroups:[module_num:4|svn_version:\\'Unknown\\'|variable_revision_number:2|show_window:False|notes:\\x5B\\\'The Groups module optionally allows you to split your list of images into image subsets (groups) which will be processed independently of each other. Examples of groupings include screening batches, microtiter plates, time-lapse movies, etc.\\'\\x5D|batch_state:array(\\x5B\\x5D, dtype=uint8)|enabled:True|wants_pause:False]\n" | |
232 | |
233 _str += FOURSPACES + "Do you want to group your images?:%s\n" % groups["con_groups"]["group_images"] | |
234 _str += FOURSPACES + "grouping metadata count:1\n" | |
235 _str += FOURSPACES + "Metadata category:%s\n" % groups["con_groups"]["group_category"] | |
236 | |
237 return _str | |
238 | |
239 | |
240 with open("output", "w") as f: | |
241 headers = ["CellProfiler Pipeline: http://www.cellprofiler.org\n", | |
242 "Version:3\n", | |
243 "DateRevision:319\n", | |
244 "GitHash:\n", | |
245 "ModuleCount:4\n", | |
246 "HasImagePlaneDetails:False", | |
247 "\n"] | |
248 | |
249 f.writelines(headers) | |
250 | |
251 img_str = write_images() | |
252 metadata_str = write_metadata() | |
253 nameandtypes_str = write_nameandtypes() | |
254 groups_str = write_groups() | |
255 | |
256 output_str = img_str + metadata_str + nameandtypes_str + groups_str | |
257 | |
258 f.write(output_str) | |
259 f.close() | |
260 | |
261 </configfile> | |
262 </configfiles> | |
263 <inputs> | |
264 <!-- Images module--> | |
265 <section name="images" title="Images" expanded="false"> | |
266 <param name="filter_images" type="select" label="Filer images?"> | |
267 <option value="Images only">Images only</option> | |
268 <option value="No filtering">No filtering</option> | |
269 </param> | |
270 </section> | |
271 <!-- Metadata module--> | |
272 <section name="metadata" title="Metadata" expanded="false"> | |
273 <conditional name="con_metadata_extraction"> | |
274 <param name="extract" type="select" display="radio" label="Extract metadata?"> | |
275 <option value="No">No</option> | |
276 <option value="Yes">Yes</option> | |
277 </param> | |
278 <when value="Yes"> | |
279 <repeat name="extraction_method" title="metadata"> | |
280 <param name="metadata_extraction_method" type="select" label="Metadata extraction method"> | |
281 <option value="Extract from file/folder names">Extract from file/folder names</option> | |
282 <option value="Import from file">Import from file</option> | |
283 <option value="Extract from image file headers">Extract from image file headers</option> | |
284 </param> | |
285 <param name="metadata_source" type="select" label="Metadata source"> | |
286 <option value="File name">File name</option> | |
287 <option value="Folder name">Folder name</option> | |
288 </param> | |
289 <param name="file_name_regex" type="select" label="Select file name pattern to extract from file name" help="Image file names must comply with one of the patterns.For example, AS_09125_050116030001_D03f00d0.tif matches the pattern field1_filed2_field3_field4. If none of the patterns are suitable, please use other Galaxy tools to rename your files first. "> | |
290 <sanitizer sanitize="false"/> | |
291 <option value="(?P<field1>.*)">field1</option> | |
292 <option value="(?P<field1>.*)-(?P<field2>[a-zA-Z0-9]+)">field1-field2</option> | |
293 <option value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)">field1_field2</option> | |
294 <option value="(?P<field1>.*)__(?P<field2>[a-zA-Z0-9]+)">field1__field2</option> | |
295 <option value="(?P<field1>.*)-(?P<field2>[a-zA-Z0-9]+)-(?P<field3>[a-zA-Z0-9]+)">field1-field2-field3</option> | |
296 <option value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)">field1_field2_field3</option> | |
297 <option value="(?P<field1>.*)__(?P<field2>[a-zA-Z0-9]+)__(?P<field3>[a-zA-Z0-9]+)">field1__field2__field3</option> | |
298 <option value="(?P<field1>.*)-(?P<field2>[a-zA-Z0-9]+)-(?P<field3>[a-zA-Z0-9]+)-(?P<field4>[a-zA-Z0-9]+)">field1-field2-field3-field4</option> | |
299 <option value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)_(?P<field4>[a-zA-Z0-9]+)">field1_field2_field3_field4</option> | |
300 <option value="(?P<field1>.*)__(?P<field2>[a-zA-Z0-9]+)__(?P<field3>[a-zA-Z0-9]+)__(?P<field4>[a-zA-Z0-9]+)">field1__field2__field3__field4</option> | |
301 <option value="(?P<field1>.*)-(?P<field2>[a-zA-Z0-9]+)-(?P<field3>[a-zA-Z0-9]+)-(?P<field4>[a-zA-Z0-9]+)-(?P<field5>[a-zA-Z0-9]+)">field1-field2-field3-field4-field5</option> | |
302 <option value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)_(?P<field4>[a-zA-Z0-9]+)_(?P<field5>[a-zA-Z0-9]+)">field1_field2_field3_field4_field5</option> | |
303 <option value="(?P<field1>.*)__(?P<field2>[a-zA-Z0-9]+)__(?P<field3>[a-zA-Z0-9]+)__(?P<field4>[a-zA-Z0-9]+)__(?P<field5>[a-zA-Z0-9]+)">field1__field2__field3__field4__field5</option> | |
304 <option value="(?P<field1>.*)-(?P<field2>[a-zA-Z0-9]+)-(?P<field3>[a-zA-Z0-9]+)-(?P<field4>[a-zA-Z0-9]+)-(?P<field5>[a-zA-Z0-9]+)-(?P<field6>[a-zA-Z0-9]+)">field1-field2-field3-field4-field5-field6</option> | |
305 <option value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)_(?P<field4>[a-zA-Z0-9]+)_(?P<field5>[a-zA-Z0-9]+)_(?P<field6>[a-zA-Z0-9]+)">field1_field2_field3_field4_field5_field6</option> | |
306 <option value="(?P<field1>.*)__(?P<field2>[a-zA-Z0-9]+)__(?P<field3>[a-zA-Z0-9]+)__(?P<field4>[a-zA-Z0-9]+)__(?P<field5>[a-zA-Z0-9]+)__(?P<field6>[a-zA-Z0-9]+)">field1__field2__field3__field4__field5__field6</option> | |
307 </param> | |
308 <param name="folder_name_regex" type="text" value="(?P<Date>[0-9]{4}_[0-9]{2}_[0-9]{2})$" label="Regular expression to extract from folder name"> | |
309 <sanitizer sanitize="false"/> | |
310 </param> | |
311 <param name="extract_metadata_from" type="select" label="Extract metadata from"> | |
312 <option value="All images">All images</option> | |
313 <option value="Images matching a rule">Images matching a rule</option> | |
314 </param> | |
315 </repeat> | |
316 <param name="metadata_type" type="select" label="Metadata data type"> | |
317 <option value="Text">Text</option> | |
318 </param> | |
319 </when> | |
320 <when value="No"> | |
321 </when> | |
322 </conditional> | |
323 </section> | |
324 <!-- NamesAndTypes--> | |
325 <section name="nameandtypes" title="NamesAndTypes" expanded="false"> | |
326 <conditional name="pixel_space"> | |
327 <param name="process_3d" type="select" display="radio" label="Process 3D"> | |
328 <option value="No">No</option> | |
329 <option value="Yes">Yes</option> | |
330 </param> | |
331 <when value="Yes"> | |
332 <param name="x_spacing" type="float" value="1.0" label="Relative pixel spacing in X"/> | |
333 <param name="y_spacing" type="float" value="1.0" label="Relative pixel spacing in Y"/> | |
334 <param name="z_spacing" type="float" value="1.0" label="Relative pixel spacing in Z"/> | |
335 </when> | |
336 <when value="No"> | |
337 </when> | |
338 </conditional> | |
339 <conditional name="con_assign_a_name_to"> | |
340 <param name="assign_a_name_to" type="select" label="Assign a name to"> | |
341 <option value="All images">All images</option> | |
342 <option value="Images matching rules">Images matching rules</option> | |
343 </param> | |
344 <when value="All images"> | |
345 <param name="name_to_assign" type="text" value="DNA" label="Name to assign these images"/> | |
346 <conditional name="con_select_image_type"> | |
347 <param name="select_image_type" type="select" label="Select the image type"> | |
348 <option value="Grayscale image">Grayscale image</option> | |
349 <option value="Color image">Color image</option> | |
350 <option value="Binary mask">Binary mask</option> | |
351 </param> | |
352 <when value ="Grayscale image"> | |
353 <expand macro="image_type_condition" /> | |
354 </when> | |
355 <when value="Color image"> | |
356 <expand macro="image_type_condition" /> | |
357 </when> | |
358 <when value="Binary mask"> | |
359 </when> | |
360 </conditional> | |
361 </when> | |
362 <when value="Images matching rules"> | |
363 <expand macro="image_matching_rules"/> | |
364 <param name="matching_method" type="select" label="Image set matching method"> | |
365 <option value="Order">Order</option> | |
366 <option value="Metadata">Metadata</option> | |
367 </param> | |
368 </when> | |
369 </conditional> | |
370 </section> | |
371 <!-- Groups --> | |
372 <section name="groups" title="Groups" expanded="false"> | |
373 <conditional name="con_groups"> | |
374 <param name="group_images" type="select" value="No" label="Do you want to group your images?" display="radio"> | |
375 <option value="Yes">Yes</option> | |
376 <option value="No">No</option> | |
377 </param> | |
378 <when value="Yes"> | |
379 <param name="group_category" type="select" label="Metadata category"> | |
380 <option value="FileLocation">FileLocation</option> | |
381 <option value="Frame">Frame</option> | |
382 <option value="ImageId">ImageId</option> | |
383 <option value="Screen">Screen</option> | |
384 <option value="Series">Series</option> | |
385 </param> | |
386 </when> | |
387 <when value="No"> | |
388 </when> | |
389 </conditional> | |
390 </section> | |
391 </inputs> | |
392 <outputs> | |
393 <expand macro="output_pipeline_macro" /> | |
394 </outputs> | |
395 <tests> | |
396 <test> | |
397 <param name="filter_images" value="Images only"/> | |
398 <conditional name="con_metadata_extraction"> | |
399 <param name="extract" value="Yes"/> | |
400 <repeat name="extraction_method"> | |
401 <param name="metadata_extraction_method" value="Extract from file/folder names"/> | |
402 <param name="metadata_source" value="File name" /> | |
403 <param name="file_name_regex" value="(?P<field1>.*)_(?P<field2>[a-zA-Z0-9]+)_(?P<field3>[a-zA-Z0-9]+)_(?P<field4>[a-zA-Z0-9]+)" /> | |
404 <param name="extract_metadata_from" value="All images" /> | |
405 </repeat> | |
406 <param name="metadata_type" value="Text" /> | |
407 </conditional> | |
408 <conditional name="pixel_space"> | |
409 <param name="process_3d" value="No"/> | |
410 </conditional> | |
411 <conditional name="con_assign_a_name_to"> | |
412 <param name="assign_a_name_to" value="Images matching rules"/> | |
413 <repeat name="r_match_rule"> | |
414 <param name="match_all_any" value="and" /> | |
415 <conditional name="con_match"> | |
416 <param name="rule_type" value="file" /> | |
417 <param name="operator" value="does" /> | |
418 <param name="contain" value="startwith" /> | |
419 <param name="match_value" value="im" /> | |
420 </conditional> | |
421 <param name="name_to_assign" value="DNA" /> | |
422 <conditional name="con_select_image_type"> | |
423 <param name="select_image_type" value="Grayscale image" /> | |
424 <conditional name="con_set_intensity"> | |
425 <param name="set_intensity_range_from" value="Image metadata" /> | |
426 </conditional> | |
427 </conditional> | |
428 </repeat> | |
429 <param name="matching_method" value="Order" /> | |
430 </conditional> | |
431 <conditional name="con_groups"> | |
432 <param name="group_images" value="Yes" /> | |
433 <param name="group_category" value="Screen" /> | |
434 </conditional> | |
435 <expand macro="test_out_file" /> | |
436 </test> | |
437 </tests> | |
438 | |
439 <help> | |
440 This tool builds a cellProfiler pipeline file with headers and 4 compulsory modules, 'Images', 'Metadata', 'NamesAndTypes' and 'Groups'. | |
441 | |
442 No input parameters are needed for this tool. The rest CP modules will build based on the output of this file. | |
443 | |
444 | |
445 Images: use the Images module to compile a list of files that you want to analyze. | |
446 | |
447 Metadata: optionally allows you to extract information describing your images (i.e., metadata) which will be stored along with your measurements. | |
448 | |
449 NamesAndTypes: allows you to assign a meaningful name to each image by which other modules will refer to it. | |
450 | |
451 Groups: optionally allows you to split your list of images into image subsets (groups) which will be processed independently of each other. Examples of groupings include screening batches, microtiter plates, time-lapse movies, etc. | |
452 | |
453 </help> | |
454 <expand macro="citations" /> | |
455 </tool> |