-
Notifications
You must be signed in to change notification settings - Fork 265
Expand file tree
/
Copy pathcellprofiler.xml
More file actions
251 lines (229 loc) · 10.2 KB
/
cellprofiler.xml
File metadata and controls
251 lines (229 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<tool id="cp_cellprofiler" name="Run CellProfiler pipeline" version="@CP_VERSION@+galaxy@VERSION_SUFFIX@">
<description>with CellProfiler 3</description>
<macros>
<import>macros.xml</import>
<token name="@VERSION_SUFFIX@">2</token>
<xml name="test_assert_content" token_n="291">
<assert_contents>
<has_n_lines n="@N@" />
</assert_contents>
</xml>
</macros>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<xrefs>
<xref type="bio.tools">CellProfiler</xref>
<xref type="biii">cellprofiler</xref>
</xrefs>
<expand macro="cp_requirements" />
<command detect_errors="aggressive"><![CDATA[
bash '$script_file' &&
cellprofiler -c -r --file-list list.txt -o ./output -p '$pipeline'
#if '$detailed_output'
-L 10 > ./cp.log 2>&1
#end if
]]></command>
<configfiles>
<configfile name="script_file">
mkdir ./input
mkdir ./output
#if $con_input_type.input_type =="yes"
tar -C ./input -xvf $con_input_type.input_images
#else
#for $i, $filename in enumerate($con_input_type.input_images):
ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}'
#end for
#end if
find `pwd`/input -name "*.*" > list.txt
</configfile>
</configfiles>
<inputs>
<param name="pipeline" type="data" format="txt" label="Pipeline file" help="A ready-to-run .cppipe file. It can be created with various CellProfiler modules." />
<conditional name="con_input_type">
<param name="input_type" type="select" label="Are the input images packed into a tar archive?">
<option value="yes">Yes</option>
<option value="no">No</option>
</param>
<when value="no">
<param name="input_images" type="data" multiple="true" format="@FORMATS@" label="Images" />
</when>
<when value="yes">
<param name="input_images" type="data" format="tar" label="A tarball of images" />
</when>
</conditional>
<param name="detailed_output" type="boolean" label="Detailed logging file?" help="If set, a detailed CellProfiler log file will be generated." />
</inputs>
<outputs>
<collection name="pipeline_output" type="list" label="CellProfiler pipeline output files">
<discover_datasets pattern="__designation_and_ext__" visible="false" directory="output"/>
</collection>
<data format="txt" name="logs" from_work_dir="cp.log" label="CellProfiler log">
<filter>detailed_output</filter>
</data>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="pipeline" value="ExampleHuman.cppipe" />
<conditional name="con_input_type">
<param name="input_type" value="no" />
<param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
</conditional>
<param name="detailed_output" value="False" />
<output_collection name="pipeline_output" type="list" count="7">
<element name="AS_09125_050116030001_D03f00d0.tif_Overlay">
<assert_contents>
<has_size value="183808"/>
</assert_contents>
</element>
<element name="Cells">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Cytoplasm">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Experiment">
<expand macro="test_assert_content" n="259" />
</element>
<element name="Image">
<expand macro="test_assert_content" n="2" />
</element>
<element name="Nuclei">
<expand macro="test_assert_content" n="290" />
</element>
<element name="PH3">
<expand macro="test_assert_content" n="21" />
</element>
</output_collection>
</test>
<test expect_num_outputs="2">
<param name="pipeline" value="ExampleHuman.cppipe" />
<conditional name="con_input_type">
<param name="input_type" value="no" />
<param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
</conditional>
<param name="detailed_output" value="True" />
<output_collection name="pipeline_output" type="list" count="7">
<element name="AS_09125_050116030001_D03f00d0.tif_Overlay">
<assert_contents>
<has_size value="183808"/>
</assert_contents>
</element>
<element name="Cells">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Cytoplasm">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Experiment">
<expand macro="test_assert_content" n="259" />
</element>
<element name="Image">
<expand macro="test_assert_content" n="2" />
</element>
<element name="Nuclei">
<expand macro="test_assert_content" n="290" />
</element>
<element name="PH3">
<expand macro="test_assert_content" n="21" />
</element>
</output_collection>
<output name="logs" ftype='txt'>
<assert_contents>
<has_text_matching expression="JVM will be started with AWT in headless mode" />
</assert_contents>
</output>
</test>
<!-- Repeat tests for tarball input -->
<test expect_num_outputs="1">
<param name="pipeline" value="ExampleHuman.cppipe" />
<conditional name="con_input_type">
<param name="input_type" value="yes" />
<param name="input_images" value="images.tar" />
</conditional>
<param name="detailed_output" value="False" />
<output_collection name="pipeline_output" type="list" count="7">
<element name="AS_09125_050116030001_D03f00d0_Overlay">
<assert_contents>
<has_size value="183808"/>
</assert_contents>
</element>
<element name="Cells">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Cytoplasm">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Experiment">
<expand macro="test_assert_content" n="259" />
</element>
<element name="Image">
<expand macro="test_assert_content" n="2" />
</element>
<element name="Nuclei">
<expand macro="test_assert_content" n="290" />
</element>
<element name="PH3">
<expand macro="test_assert_content" n="21" />
</element>
</output_collection>
</test>
<test expect_num_outputs="2">
<param name="pipeline" value="ExampleHuman.cppipe" />
<conditional name="con_input_type">
<param name="input_type" value="yes" />
<param name="input_images" value="images.tar" />
</conditional>
<param name="detailed_output" value="True" />
<output_collection name="pipeline_output" type="list" count="7">
<element name="AS_09125_050116030001_D03f00d0_Overlay">
<assert_contents>
<has_size value="183808"/>
</assert_contents>
</element>
<element name="Cells">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Cytoplasm">
<expand macro="test_assert_content" n="290" />
</element>
<element name="Experiment">
<expand macro="test_assert_content" n="259" />
</element>
<element name="Image">
<expand macro="test_assert_content" n="2" />
</element>
<element name="Nuclei">
<expand macro="test_assert_content" n="290" />
</element>
<element name="PH3">
<expand macro="test_assert_content" n="21" />
</element>
</output_collection>
<output name="logs" ftype='txt'>
<assert_contents>
<has_text_matching expression="JVM will be started with AWT in headless mode" />
</assert_contents>
</output>
</test>
</tests>
<help>
<![CDATA[
.. class:: infomark
**What it does**
This is the last tool in a CellProfiler workflow and runs a CellProfiler @CP_VERSION@ pipeline file on a collection of images.
.. class:: infomark
**Input**
- Collection of images.
- Existing CellProfiler pipeline file *(.cppipe)* or generated by linking CellProfiler tools.
.. class:: infomark
**Output**
- Images if the tool *SaveImages* was included in the workflow.
- The features selected if the tool *ExportToSpreadsheet* was included in the workflow.
.. class:: warningmark
**IMPORTANT**
Only the pipelines generated with the version @CP_VERSION@ of CellProfiler can be run, other versions may cause problems.
]]>
</help>
<expand macro="citations" />
</tool>