comparison Matrix_Manipulation.xml @ 1:f1bcd79cd923 draft default tip

Uploaded
author insilico-bob
date Tue, 27 Nov 2018 14:20:40 -0500
parents
children
comparison
equal deleted inserted replaced
0:7f12c81e2083 1:f1bcd79cd923
1 <?xml version='1.1' encoding='utf-8'?>
2 <tool id="Matrix_Manipulation" name="Matrix Manipulation" version="1.2.4">
3 <description> Data manipulation before heatmap creation</description>
4
5 <command interpreter="bash" detect_errors="aggressive">
6 $__tool_directory__/Matrix_Manipulation.sh '$__tool_directory__' '${manipulation.option}' '$p_input' '$output_file'
7 '${manipulation.extra.choice}' '${manipulation.extra.thresh}' '${manipulation.extra.axis}'
8 '${manipulation.extra.transpose}' '${manipulation.extra.input2}' '${manipulation.extra.offsetvalue}' '${manipulation.extra.scalevalue}'
9
10 </command>
11
12 <inputs>
13 <param name="p_input" type="data" format="tabular" label="Input Matrix" />
14 <conditional name="manipulation">
15 <param name="option" type="select" label="Choose Manipulation Method">
16 <option value="Matrix_Validations">Missing or Invalid Data</option>
17 <option value="Matrix_Filters">Filter Data</option>
18 <option value="Matrix_Transformations">Transform Data</option>
19 <option value="Matrix_Multiply">Multiply or Correlate Matrices</option>
20 <!-- <option value="Matrix_Statistics">View metadata about Heat Map Matrix</option> -->
21 <!-- <option value="Split_ExcelTabs_IntoFiles">Split Excel tabs into separate tab delimited files</option> -->
22 </param>
23
24
25 <when value="Matrix_Validations">
26 <conditional name="extra">
27 <param name="choice" type="select" label="Replace Invalid Value with:">
28 <option value="Mean">Mean</option>
29 <option value="Zero">Zero</option>
30 </param>
31 <when value="Mean">
32 <param name="axis" type="select" label="Choose Axis:">
33 <option value="Row">Row</option>
34 <option value="Column">Column</option>
35 </param>
36
37 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
38 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
39 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
40 <param name="transpose" type="text" size="10" hidden="true" value="n" />
41 <param name="input2" type="data" hidden="true" value="$input1" />
42 </when>
43 <when value="Zero">
44 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
45
46 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
47 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
48 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
49 <param name="transpose" type="text" size="10" hidden="true" value="n" />
50 <param name="input2" type="data" hidden="true" value="$input1" />
51 </when>
52 </conditional>
53 </when>
54
55
56
57 <when value="Matrix_Filters">
58 <conditional name="extra">
59 <param name="choice" type="select" label="Filter Criteria:">
60 <option value="LowerLimit">Remove row/column if any cell is less than threshold value</option>
61 <option value="UpperLimit">Remove row/column if any cell is greater than threshold value</option>
62 <option value="NANlimit">Remove row/column if number of invalid cells exceeds threshold value </option>
63 <option value="NANpercent">Remove row/column if invalid cells exceeds threshold percent</option>
64 <!-- <option value="VarianceValue">Remove row/column if Variance is below threshold value</option> -->
65 <option value="VarianceCount">Remove row/column if Variance is not in top row/column count</option>
66 <option value="VariancePercent">Remove row/column if Variance is not in top percent</option>
67 <!-- <option value="MADcount">Remove row/column if Median Absolute Deviation (MAD) is not in top row/column count</option>
68 <option value="MADpercent">Remove row/column if Median Absolute Deviation (MAD) is not in top percent</option> -->
69 <!-- <option value="Covariance">Remove row/column if covariance exceeds threshold value</option>
70 <option value="Median">Remove row/column if Median is less than threshold value</option>
71 <option value="MADvalue">Remove row/column if Median Absolute Deviation (MAD) is below threshold value</option>
72 <option value="Mean">Remove row/column if Mean is less than threshold value</option>
73 <option value="Quantile">Remove row/column if less than Quantile_Cutoff</option>
74 <option value="GeneList">Keep only these genes</option>
75 <option value="Histogram">View filter histogram</option>
76 -->
77 </param>
78 <when value="LowerLimit">
79 <param name="thresh" type="float" size="5" value="0.01" label="Absolute minimum value" help="Lowest value allowed or row/col removed."/>
80 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
81 <option value="Row">Row</option>
82 <option value="Column">Column</option>
83 </param>
84
85 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
86 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
87 <param name="transpose" type="text" size="10" hidden="true" value="n" />
88 <param name="input2" type="data" hidden="true" value="$input1" />
89 </when>
90 <when value="UpperLimit">
91 <param name="thresh" type="float" size="5" value="0.9" label="Absolute maximum value" help="Highest value allowed or row/col removed."/>
92 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
93 <option value="Row">Row</option>
94 <option value="Column">Column</option>
95 </param>
96
97 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
98 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
99 <param name="transpose" type="text" size="10" hidden="true" value="n" />
100 <param name="input2" type="data" hidden="true" value="$input1" />
101 </when>
102 <when value="NANlimit">
103 <param name="thresh" type="integer" size="5" value="50" label="Maximum number NANs" help="More NANs per row/col removed."/>
104 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
105 <option value="Row">Row</option>
106 <option value="Column">Column</option>
107 </param>
108
109 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
110 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
111 <param name="transpose" type="text" size="10" hidden="true" value="n" />
112 <param name="input2" type="data" hidden="true" value="$input1" />
113 </when>
114 <when value="NANpercent">
115 <param name="thresh" type="integer" size="5" value="20" label="Percent maximum" help="Above percent rows/cols removed."/>
116 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
117 <option value="Row">Row</option>
118 <option value="Column">Column</option>
119 </param>
120
121 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
122 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
123 <param name="transpose" type="text" size="10" hidden="true" value="n" />
124 <param name="input2" type="data" hidden="true" value="$input1" />
125 </when>
126 <when value="VariancePercent">
127 <param name="thresh" type="integer" size="5" value="90" label="Percentile minimum" help="Below percentile rows/cols removed."/>
128 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
129 <option value="Row">Row</option>
130 <option value="Column">Column</option>
131 </param>
132
133 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
134 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
135 <param name="transpose" type="text" size="10" hidden="true" value="n" />
136 <param name="input2" type="data" hidden="true" value="$input1" />
137 </when>
138 <when value="VarianceCount">
139 <param name="thresh" type="integer" size="5" value="10" label="Number minimum" help="Below threshold rows/cols removed."/>
140 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
141 <option value="Row">Row</option>
142 <option value="Column">Column</option>
143 </param>
144
145 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
146 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
147 <param name="transpose" type="text" size="10" hidden="true" value="n" />
148 <param name="input2" type="data" hidden="true" value="$input1" />
149 </when>
150 <when value="MADpercent">
151 <param name="thresh" type="integer" size="5" value="90" label="Percentile minimum" help="Below percentile rows/cols removed."/>
152 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
153 <option value="Row">Row</option>
154 <option value="Column">Column</option>
155 </param>
156
157 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
158 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
159 <param name="transpose" type="text" size="10" hidden="true" value="n" />
160 <param name="input2" type="data" hidden="true" value="$input1" />
161 </when>
162 <when value="MADcount">
163 <param name="thresh" type="integer" size="5" value="10" label="Number minimum" help="Below threshold rows/cols removed."/>
164 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
165 <option value="Row">Row</option>
166 <option value="Column">Column</option>
167 </param>
168
169 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
170 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
171 <param name="transpose" type="text" size="10" hidden="true" value="n" />
172 <param name="input2" type="data" hidden="true" value="$input1" />
173 </when>
174 </conditional>
175 </when>
176
177
178
179 <when value="Matrix_Transformations">
180 <conditional name="extra">
181 <param name="choice" type="select" label="Choose Normalization Method">
182 <option value="ln_normalization">Log2 Normalization</option>
183 <option value="log_normalization">Log10 Normalization</option>
184 <option value="mean_center_normalization">Mean Centered Normalization</option>
185 <option value="median_center_normalization">Median Centered Normalization</option>
186 <option value="z_score_normalization">Z-Score Normalization</option>
187 <option value="add_offset">Add Offset Value</option>
188 <option value="scale">Scale by Multiple</option>
189 <option value="divide_by_sum">Divide by Sum</option>
190 <option value="transpose">Matrix Transpose</option>
191 </param>
192 <when value="add_offset">
193 <param name="offsetvalue" type="text" size="10" value="0.0" label="Matrix Values offset" help="Add value to each Matrix element."/>
194 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
195 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
196
197 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
198 <param name="transpose" type="text" size="10" hidden="true" value="n" />
199 <param name="input2" type="data" hidden="true" value="$input1" />
200 </when>
201 <when value="scale">
202 <param name="scalevalue" type="text" size="10" value="1.0" label="Matrix Value scaling" help="multiply value with each Matrix element."/>
203 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
204 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
205
206 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
207 <param name="transpose" type="text" size="10" hidden="true" value="n" />
208 <param name="input2" type="data" hidden="true" value="$input1" />
209 </when>
210 <when value="ln_normalization">
211 <param name="offsetvalue" type="text" size="10" value="0.0" label="Matrix Values offset" help="Calculate log2 for each Matrix element then add offset."/>
212 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
213 <param name="axis" type="select" label="Choose Axis">
214 <option value="Row">Row</option>
215 <option value="Column">Column</option>
216 </param>
217
218 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
219 <param name="transpose" type="text" size="10" hidden="true" value="n" />
220 <param name="input2" type="data" hidden="true" value="$input1" />
221 </when>
222 <when value="log_normalization">
223 <param name="offsetvalue" type="text" size="10" value="0.0" label="Matrix Values offset" help="Calculate log10 for each Matrix element then add offset."/>
224 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
225 <param name="axis" type="select" label="Choose Axis">
226 <option value="Row">Row</option>
227 <option value="Column">Column</option>
228 </param>
229
230 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
231 <param name="transpose" type="text" size="10" hidden="true" value="n" />
232 <param name="input2" type="data" hidden="true" value="$input1" />
233 </when>
234 <when value="z_score_normalization">
235 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
236 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
237 <param name="axis" type="select" label="Choose Axis">
238 <option value="Row">Row</option>
239 <option value="Column">Column</option>
240 </param>
241
242 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
243 <param name="transpose" type="text" size="10" hidden="true" value="n" />
244 <param name="input2" type="data" hidden="true" value="$input1" />
245 </when>
246 <when value="mean_center_normalization">
247 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
248 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
249 <param name="axis" type="select" label="Choose Axis">
250 <option value="Row">Row</option>
251 <option value="Column">Column</option>
252 </param>
253
254 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
255 <param name="transpose" type="text" size="10" hidden="true" value="n" />
256 <param name="input2" type="data" hidden="true" value="$input1" />
257 </when>
258 <when value="median_center_normalization">
259 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
260 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
261 <param name="axis" type="select" label="Choose Axis">
262 <option value="Row">Row</option>
263 <option value="Column">Column</option>
264 </param>
265
266 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
267 <param name="transpose" type="text" size="10" hidden="true" value="n" />
268 <param name="input2" type="data" hidden="true" value="$input1" />
269 </when>
270 <when value="transpose">
271 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
272 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
273 <param name="axis" type="text" size="10" hidden="true" value="neither"/>
274
275 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
276 <param name="transpose" type="text" size="10" hidden="true" value="n" />
277 <param name="input2" type="data" hidden="true" value="$input1" />
278 </when>
279 <when value="divide_by_sum">
280 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
281 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
282 <param name="axis" type="select" label="Choose Axis">
283 <option value="Row">Row</option>
284 <option value="Column">Column</option>
285 </param>
286
287 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
288 <param name="transpose" type="text" size="10" hidden="true" value="n" />
289 <param name="input2" type="data" hidden="true" value="$input1" />
290 </when>
291 </conditional>
292 </when>
293
294
295
296 <when value="Matrix_Multiply">
297 <conditional name="extra">
298 <param name="choice" type="select" label="Choose composition type">
299 <option value="MatrixMultiply">Matrix Multiplication</option>
300 <option value="Corr2Matrices">Correlate two matrices</option>
301 <option value="Corr1Matrix">Correlate one matrix with itself</option>
302 </param>
303 <when value="MatrixMultiply">
304 <param name="transpose" type="select" label="transpose matrix?">
305 <option value="y">Transpose matrix</option>
306 <option value="n" selected="true">Do Not transpose matrix</option>
307 </param>
308 <param name="input2" type="data" format="tabular" label="Second Input Matrix size NxP" />
309
310 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
311 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
312 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
313 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
314 </when>
315 <when value="Corr2Matrices">
316 <param name="transpose" type="select" label="transpose matrix?">
317 <option value="y">Transpose matrix</option>
318 <option value="n" selected="true">Do Not transpose matrix</option>
319 </param>
320 <param name="input2" type="data" format="tabular" label="Second Input Matrix size NxP" />
321
322 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
323 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
324 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
325 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
326 </when>
327 <when value="Corr1Matrix">
328 <param name="transpose" type="text" size="10" hidden="true" value="n" />
329 <param name="input2" type="data" hidden="true" value="$input1" />
330
331 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
332 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
333 <param name="thresh" type="float" size="4" value=".05" hidden="true" />
334 <param name="axis" type="text" size="10" hidden="true" value="Row"/>
335 </when>
336 </conditional>
337 </when>
338
339
340
341 <when value="Matrix_Statistics">
342 <conditional name="extra">
343 <param name="choice" type="select" label="Choose Metric to Filter By">
344 <option value="Histogram">Plot info about either matrix row/column</option>
345 </param>
346 <when value = "Histogram">
347 <param name="thresh" type="float" size="4" value=".05" label="Filter Threshold (Value above/below row/column will be Removed)" />
348 <param name="axis" type="select" label="Choose axis to Filter on (Rows or Columns)">
349 <option value="Row">Row</option>
350 <option value="Column">Column</option>
351 </param>
352
353 <param name="offsetvalue" type="text" size="10" hidden="true" value="0"/>
354 <param name="scalevalue" type="text" size="10" hidden="true" value="1.0"/>
355 <param name="transpose" type="text" size="10" hidden="true" value="n" />
356 <param name="input2" type="data" hidden="true" value="$input1" />
357 </when>
358 </conditional>
359 </when>
360
361
362
363
364
365
366
367
368 <!-- <when value="Split_ExcelTabs_IntoFiles">
369 <description>into separate tab delimited files</description>
370
371 <param name="input" type="data" format="txt" label="Input Excel.xls or Excel.xlsx file"> </param>
372
373 <conditional name="extra">
374 <param name="choice" type="select" label="Select tab" help="Select tab position or name">
375 <option value="tab_number">Tab number</option>
376 </param>
377
378 '$extra.tabname'
379 <option value="tab_name">Tab name</option>
380 <option value="all">All tabs in file</option>
381 <option value="1">First tab only</option>
382 </param>
383 <when value="tab_name">
384 <param name="tabname" type="text" size="20" value="" label="Tab Name" help="Spreadsheet Tab Name">
385 </param>
386 </when>
387
388 <when value="tab_number">
389 <param name="tabnumber" type="text" size="2" value="1" label="Tab position" help="Integer Tab position from left">
390 </param>
391 </when>
392 </conditional>
393
394 <outputs>
395 <data name="output_file" format="tabular" label="Output File Name" help="Name based on Input file name and tab name"/>
396 </outputs>
397 </when> -->
398
399
400
401 </conditional>
402 </inputs>
403 <outputs>
404 <data name="output_file" format="tabular" />
405 </outputs>
406 </tool>