comparison macros.xml @ 0:952808ffa842 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/DIMet commit abca848510cb4ac8d09d95634147626ea578cdf0
author iuc
date Tue, 10 Oct 2023 11:51:59 +0000
parents
children a06d1febf79e
comparison
equal deleted inserted replaced
-1:000000000000 0:952808ffa842
1 <macros>
2 <token name="@TOOL_VERSION@">0.1.4</token>
3 <token name="@VERSION_SUFFIX@">0</token>
4 <token name="@EXECUTABLE@">pca</token>
5 <xml name="factor_repeat">
6 <repeat name="rep_factorName" title="Factor" min="1">
7 <param name="factorName" type="text" value="FactorName" label="Specify a factor name, e.g. effects_drug_x or cancer_markers"
8 help="Only letters, numbers and underscores will be retained in this field">
9 <sanitizer>
10 <valid initial="string.letters,string.digits"><add value="_" /></valid>
11 </sanitizer>
12 </param>
13 <repeat name="rep_factorLevel" title="Factor level" min="2" default="2">
14 <param name="factorLevel" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor', 'normal', 'treated' or 'control'"
15 help="Only letters, numbers and underscores will be retained in this field">
16 <sanitizer>
17 <valid initial="string.letters,string.digits"><add value="_" /></valid>
18 </sanitizer>
19 </param>
20 <yield/>
21 </repeat>
22 </repeat>
23 </xml>
24 <xml name="requirements">
25 <requirements>
26 <requirement type="package" version="@TOOL_VERSION@">dimet</requirement>
27 </requirements>
28 </xml>
29 <xml name="statistical_test">
30 <param name="stat_test" type="select" value="Tt" display="radio" label="Select statistical to apply" help="Please enter at max 1 statistical test by file">
31 <option value="Tt">t-test</option>
32 <option value="MW">Mann Whitney</option>
33 <option value="KW">Kruskall Wallis</option>
34 <option value="ranksum">Wilcoxon's rank sum test</option>
35 <option value="Wcox">Wilcoxon signed-rank test</option>
36 <option value="BrMu">Brunner-Munzel test</option>
37 <option value="prm-scipy">permutations test</option>
38 <option value="disfit">distribution fitting (of the z-score of the ratios), disfit needs several hundreds of metabolites to be trustful.</option>
39 </param>
40 </xml>
41 <xml name="citations">
42 <citations>
43 <citation type="bibtex">
44 @software{Galvis_Rodriguez_DIMet,
45 author = {Galvis Rodriguez, Johanna and Guyon, Joris and Dartigues, Benjamin and Specque, Florian and Daubon, Thomas and Karkar, Slim and Nikolski, Macha},
46 license = {MIT},
47 title = {{DIMet}},
48 url = {https://github.com/cbib/DIMet}
49 }
50
51 </citation>
52 </citations>
53
54 </xml>
55 <xml name="metadata_file_macros">
56 <param name="metadata_path" type="data" format="tabular" label="metadata file" help="The metadata, a unique file with the description of the samples in your measures' files. This is compulsory, see section Metadata File Information."/>
57 </xml>
58 <xml name="abundance_file_macros">
59 <param name="abundance_file" type="data" format="tabular" label="Metabolite abundance file" help="The total abundances file must be organized as a matrix: - The first column must contain Metabolite IDs that are unique (not repeated) within the file. - The rest of the columns correspond to the samples - The rows correspond to the metabolites - The values must be tab separated, with the first row containing the sample/column labels. (see help below for more details)"/>
60 </xml>
61 <xml name="enrichment_file_macros">
62 <param name="me_or_frac_contrib_file" type="data" format="tabular" label="Metabolite enrichment file" help="The mean enrichment file must be organized as a matrix: - The first column must contain Metabolite IDs that are unique (not repeated) within the file. - The rest of the columns correspond to the samples. - The rows correspond to the metabolites. - The values must be tab separated, with the first row containing the sample/column labels. (see help below for more details)"/>
63 </xml>
64 <xml name="isotopologue_prop_file_macros">
65 <param name="isotop_prop_file" type="data" format="tabular" label="Isotopologues proportion abundance file" help=" The isotopologue proportions file must be organized as a matrix: - The first column must contain isotopologues IDs that are unique (not repeated) within the file. - The rest of the columns correspond to the samples. - The rows correspond to the isotopologues. - The values must be tab separated, with the first row containing the sample/column labels (see help below for more details)."/>
66 </xml>
67 <xml name="isotopologue_abs_file_macros">
68 <param name="isotop_abs_file" type="data" format="tabular" label="Isotopologues absolute abundance file" help="The isotopologue absolute values file must be organized as a matrix: - The first column must contain isotopologues IDs that are unique (not repeated) within the file. - The rest of the columns correspond to the samples. - The rows correspond to the isotopologues. - The values must be tab separated, with the first row containing the sample/column labels (see help below for more details)."/>
69 </xml>
70 <xml name="input_parameters_pca">
71 <expand macro="abundance_file_macros"/>
72 <param name="me_or_frac_contrib_file" type="data" optional="true" format="tabular" label="Mean enrichment or fraction contribution file"/>
73 <expand macro="metadata_file_macros"/>
74 </xml>
75 <xml name="input_parameters_abundance">
76 <expand macro="abundance_file_macros"/>
77 <expand macro="metadata_file_macros"/>
78 </xml>
79 <xml name="input_parameters_enrichment">
80 <expand macro="enrichment_file_macros"/>
81 <expand macro="metadata_file_macros"/>
82 </xml>
83 <xml name="input_parameters_isotopologue">
84 <expand macro="isotopologue_prop_file_macros"/>
85 <expand macro="metadata_file_macros"/>
86 </xml>
87 <xml name="input_parameters_metabologram">
88 <conditional name="data_input">
89 <param name="data_input_selector" type="select" label="Abundance, Enrichment or Isotopologues count files" help="Select between raw abundance, mean enrichment or isotopologue files">
90 <option value="abundance" selected="True">abundance</option>
91 <option value="mean_enrichment">mean_enrichment</option>
92 </param>
93 <when value="abundance">
94 <expand macro="abundance_file_macros"/>
95 <param name="metabolites_list" type="select" optional="false" multiple="true"
96 label="Select Metabolite(s) for factor 1 to plot (1 Min.). You have to load a abundance file prior to have access to metabolite list">
97 <validator type="length" min="1" message="Please enter at max 2 compartments"/>
98 <options from_dataset="abundance_file">
99 <column name="metabolite_or_isotopologue" index="0"/>
100 <column name="value" index="0"/>
101 <filter type="unique_value" name="metabolite_or_isotopologue" column="0"/>
102 <filter type="remove_value" value="metabolite_or_isotopologue"/>
103 </options>
104 <sanitizer>
105 <valid initial="default">
106 <add preset="string.printable"/>
107 <add value="\t"/>
108 <remove value="&quot;"/>
109 <remove value="&apos;"/>
110 </valid>
111 </sanitizer>
112 </param>
113 <expand macro="statistical_test"/>
114 </when>
115 <when value="mean_enrichment">
116 <expand macro="enrichment_file_macros"/>
117 <param name="metabolites_list" type="select" optional="false" multiple="true"
118 label="Select Metabolite(s) for factor 1 to plot (1 Min.). You have to load a abundance file prior to have access to metabolite list">
119 <validator type="length" min="1" message="Please enter at max 2 compartments"/>
120 <options from_dataset="me_or_frac_contrib_file">
121 <column name="metabolite_or_isotopologue" index="0"/>
122 <column name="value" index="0"/>
123 <filter type="unique_value" name="metabolite_or_isotopologue" column="0"/>
124 <filter type="remove_value" value="metabolite_or_isotopologue"/>
125 </options>
126 <sanitizer>
127 <valid initial="default">
128 <add preset="string.printable"/>
129 <add value="\t"/>
130 <remove value="&quot;"/>
131 <remove value="&apos;"/>
132 </valid>
133 </sanitizer>
134 </param>
135 <expand macro="statistical_test"/>
136 </when>
137 </conditional>
138 <param name="path_kegg_metabolites" type="data" format="tabular" label="Pathways kegg metabolites file" help="A file with the pathways and respective metabolites ID, that must match with those in your metabolomics data. The names of the columns must be the pathways' names, see the minimal data example downloaded from zenodo as explained above. (see help below for more details)"/>
139 <param name="path_kegg_transcripts" type="data" format="tabular" label="Pathways kegg transcripts file" help="A file with the pathways and respective gene symbols, which must match with those present in the transcriptomics data. The names of the columns must be the pathways' names, see the minimal data example downloaded from zenodo as explained above. (see help below for more details)"/>
140 <expand macro="metadata_file_macros"/>
141 </xml>
142 <xml name="input_parameters_diff_analysis">
143 <conditional name="data_input">
144 <param name="data_input_selector" type="select" label="Abundance, Enrichment or Isotopologues count files" help="Select between raw abundance and mean enrichment files">
145 <option value="abundance" selected="True">abundance</option>
146 <option value="mean_enrichment">mean_enrichment</option>
147 <option value="isotop_prop">isotop_prop</option>
148 <option value="isotop_abs">isotop_abs</option>
149 </param>
150 <when value="abundance">
151 <expand macro="abundance_file_macros"/>
152 <expand macro="statistical_test"/>
153
154 </when>
155 <when value="mean_enrichment">
156 <expand macro="enrichment_file_macros"/>
157 <expand macro="statistical_test"/>
158 </when>
159 <when value="isotop_prop">
160 <expand macro="isotopologue_prop_file_macros"/>
161 <expand macro="statistical_test"/>
162 </when>
163 <when value="isotop_abs">
164 <expand macro="isotopologue_abs_file_macros"/>
165 <expand macro="statistical_test"/>
166 </when>
167 </conditional>
168 <expand macro="metadata_file_macros"/>
169 </xml>
170 <xml name="suffix">
171 <param name="suffix" type="text" optional="false" label="suffix to add to output files" >
172 <sanitizer invalid_char="">
173 <valid initial="string.ascii_letters,string.digits">
174 <add value="_" />
175 </valid>
176 </sanitizer>
177 </param>
178 </xml>
179 <xml name="conditions">
180 <param name="conditions" type="select" optional="false" multiple="true" label="Browse conditions from metadata file (1 min. only if two timepoints are set. 2 max.). You have to load a metadata file prior to have access to metabolite list">
181 <options from_dataset="metadata_path">
182 <column name="condition" index="1"/>
183 <column name="value" index="1"/>
184 <filter type="unique_value" name="condition" column="condition"/>
185 <filter type="remove_value" value="condition"/>
186 </options>
187 <sanitizer>
188 <valid initial="default">
189 <add preset="string.printable"/>
190 <add value="\t"/>
191 <remove value="&quot;"/>
192 <remove value="&apos;"/>
193 </valid>
194 </sanitizer>
195 </param>
196 </xml>
197 <xml name="conditions_multigroup">
198 <param name="conditions" type="select" optional="false" multiple="true" label="Browse conditions from metadata file. (1 min. only if three timepoints are set). You have to load a metadata file prior to have access to conditions">
199 <options from_dataset="metadata_path">
200 <column name="condition" index="1"/>
201 <column name="value" index="1"/>
202 <filter type="unique_value" name="condition" column="condition"/>
203 <filter type="remove_value" value="condition"/>
204 </options>
205 <sanitizer>
206 <valid initial="default">
207 <add preset="string.printable"/>
208 <add value="\t"/>
209 <remove value="&quot;"/>
210 <remove value="&apos;"/>
211 </valid>
212 </sanitizer>
213 </param>
214 </xml>
215 <xml name="timepoint_multigroup">
216 <param name="timepoint" type="select" optional="true" multiple="true" label="Browse timepoint from metadata file (1 min. only if three conditions are set). You have to load a metadata file prior to have access to conditions">
217 <options from_dataset="metadata_path">
218 <column name="timepoint" index="2"/>
219 <column name="value" index="2"/>
220 <filter type="unique_value" name="timepoint" column="2"/>
221 <filter type="remove_value" value="timepoint"/>
222 <filter type="sort_by" name="timepoint" column="1"/>
223 </options>
224 <sanitizer>
225 <valid initial="default">
226 <add preset="string.printable"/>
227 <add value="\t"/>
228 <remove value="&quot;"/>
229 <remove value="&apos;"/>
230 </valid>
231 </sanitizer>
232 </param>
233 </xml>
234 <xml name="timepoint">
235 <param name="timepoint" type="select" optional="true" multiple="true" label="Browse timepoint from metadata file (1 min. only if two conditions are set.)">
236 <options from_dataset="metadata_path">
237 <column name="timepoint" index="2"/>
238 <column name="value" index="2"/>
239 <filter type="unique_value" name="timepoint" column="2"/>
240 <filter type="remove_value" value="timepoint"/>
241 <filter type="sort_by" name="timepoint" column="1"/>
242 </options>
243 <sanitizer>
244 <valid initial="default">
245 <add preset="string.printable"/>
246 <add value="\t"/>
247 <remove value="&quot;"/>
248 <remove value="&apos;"/>
249 </valid>
250 </sanitizer>
251 </param>
252 </xml>
253 <xml name="grouping">
254 <param name="grouping" type="select" optional="false" multiple="true" label="Browse group to compare">
255 <option value="condition" selected="true">condition</option>
256 <option value="timepoint" selected="true">timepoint</option>
257 </param>
258 </xml>
259 <xml name="correction_method">
260 <param name="correction_method" type="select" value="bonferroni" display="radio" label="Select multiple test correction to apply" help="Please enter at max 1 method">
261 <option value="bonferroni">bonferroni</option>
262 <option value="holm-sidak">holm-sidak</option>
263 <option value="holm">holm</option>
264 <option value="simes-hochberg">simes-hochberg</option>
265 <option value="hommel">hommel</option>
266 <option value="fdr_bh">fdr_bh</option>
267 <option value="fdr_by">fdr_by</option>
268 <option value="fdr_tsbh">fdr_tsbh</option>
269 <option value="fdr_tsbky">fdr_tsbky</option>
270 </param>
271 </xml>
272 <xml name="compartments_enrichment">
273 <param name="compartments" type="select" optional="false" multiple="true"
274 label="Browse compartments from metadata file (All needed). You have to load a metadata file prior to have access to compartments">
275 <options from_dataset="metadata_path">
276 <column name="compartment" index="4"/>
277 <column name="value" index="4"/>
278 <filter type="unique_value" name="compartment" column="4"/>
279 <filter type="remove_value" value="compartment"/>
280 </options>
281 <sanitizer>
282 <valid initial="default">
283 <add preset="string.printable"/>
284 <add value="\t"/>
285 <remove value="&quot;"/>
286 <remove value="&apos;"/>
287 </valid>
288 </sanitizer>
289 </param>
290 </xml>
291 <xml name="compartments_abundance">
292 <param name="compartments" type="select" optional="false" multiple="true"
293 label="Browse compartments from metadata file (All needed). You have to load a metadata file prior to have access to compartments">
294 <options from_dataset="metadata_path">
295 <column name="compartment" index="4"/>
296 <column name="value" index="4"/>
297 <filter type="unique_value" name="compartment" column="4"/>
298 <filter type="remove_value" value="compartment"/>
299 </options>
300 <sanitizer>
301 <valid initial="default">
302 <add preset="string.printable"/>
303 <add value="\t"/>
304 <remove value="&quot;"/>
305 <remove value="&apos;"/>
306 </valid>
307 </sanitizer>
308 </param>
309 </xml>
310 <xml name="compartments">
311 <param name="compartments" type="select" optional="false" multiple="true"
312 label="Browse compartments from metadata file (1 min.). You have to load a metadata file prior to have access to compartments">
313 <options from_dataset="metadata_path">
314 <column name="compartment" index="4"/>
315 <column name="value" index="4"/>
316 <filter type="unique_value" name="compartment" column="4"/>
317 <filter type="remove_value" value="compartment"/>
318 </options>
319 <sanitizer>
320 <valid initial="default">
321 <add preset="string.printable"/>
322 <add value="\t"/>
323 <remove value="&quot;"/>
324 <remove value="&apos;"/>
325 </valid>
326 </sanitizer>
327 </param>
328 </xml>
329 <xml name="abundance_metabolites_list">
330 <param name="metabolites_list" type="select" optional="false" multiple="true"
331 label="Select Metabolite(s) for factor 1 to plot (1 min). You have to load a abundance file prior to have access to metabolite list">
332 <validator type="length" min="1" message="Please enter at max 2 compartments"/>
333 <options from_dataset="abundance_file">
334 <column name="metabolite_or_isotopologue" index="0"/>
335 <column name="value" index="0"/>
336 <filter type="unique_value" name="metabolite_or_isotopologue" column="0"/>
337 <filter type="remove_value" value="metabolite_or_isotopologue"/>
338 </options>
339 <sanitizer>
340 <valid initial="default">
341 <add preset="string.printable"/>
342 <add value="\t"/>
343 <remove value="&quot;"/>
344 <remove value="&apos;"/>
345 </valid>
346 </sanitizer>
347 </param>
348 </xml>
349 <xml name="enrichment_metabolites_list">
350 <param name="metabolites_list" type="select" optional="false" multiple="true"
351 label="Select Metabolite(s) for factor 1 to plot (1 Min.). You have to load a abundance file prior to have access to metabolite list">
352 <validator type="length" min="1" message="Please enter at max 2 compartments"/>
353 <options from_dataset="me_or_frac_contrib_file">
354 <column name="ID" index="0"/>
355 <column name="value" index="0"/>
356 <filter type="unique_value" name="ID" column="0"/>
357 <filter type="remove_value" value="ID"/>
358 </options>
359 <sanitizer>
360 <valid initial="default">
361 <add preset="string.printable"/>
362 <add value="\t"/>
363 <remove value="&quot;"/>
364 <remove value="&apos;"/>
365 </valid>
366 </sanitizer>
367 </param>
368 </xml>
369 <xml name="isotopologue_metabolites_list">
370 <param name="metabolites_list" type="select" optional="false" multiple="true"
371 label="Select Metabolite(s) to plot (1 Min.). You have to load a abundance file prior to have access to metabolite list">
372 <validator type="length" min="1" message="Please enter at max 2 compartments"/>
373 <options from_dataset="isotop_prop_file">
374 <column name="ID" index="0"/>
375 <column name="value" index="0"/>
376 <filter type="unique_value" name="ID" column="0"/>
377 <filter type="remove_value" value="ID"/>
378 </options>
379 <sanitizer>
380 <valid initial="default">
381 <add preset="string.printable"/>
382 <add value="\t"/>
383 <remove value="&quot;"/>
384 <remove value="&apos;"/>
385 </valid>
386 </sanitizer>
387 </param>
388 </xml>
389 <xml name="deg_list">
390 <repeat name="deg_list" title="Deregulated gene set">
391 <param name="input" type="data" format="tabular" label="Deregulated genes set"/>
392 <param name="idcol" type="data_column" data_ref="input" label="Column for id" use_header_names="true"/>
393 <param name="valuecol" type="data_column" data_ref="input" label="Column for values" use_header_names="true"/>
394 </repeat>
395 </xml>
396 <token name="@INIT_PCA@"><![CDATA[
397 #import json
398 #import re
399
400 mkdir -p data/raw &&
401 mkdir -p data/processed &&
402
403 #if $metadata_path:
404 ln -s '$metadata_path' data/raw/metadata.csv &&
405 #end if
406 #if $abundance_file:
407 ln -s '$abundance_file' data/raw/abundance.csv &&
408 #end if
409 #if $me_or_frac_contrib_file:
410 ln -s '$me_or_frac_contrib_file' data/raw/me_or_frac_contrib.csv &&
411 #end if
412
413 ]]></token>
414 <token name="@INIT_CONFIG@"><![CDATA[
415 mkdir -p '$__new_file_path__/config' &&
416 touch '$__new_file_path__/config/config.yaml' &&
417 ]]></token>
418 <token name="@REMOVE_CONFIG@"><![CDATA[
419 && rm -r '$__new_file_path__/config'
420 ]]></token>
421 <token name="@INIT_ABUNDANCE_PLOT@"><![CDATA[
422
423 mkdir -p data/raw &&
424 mkdir -p data/processed &&
425
426 #if $metadata_path:
427 ln -s '$metadata_path' data/raw/metadata.csv &&
428 #end if
429 #if $abundance_file:
430 ln -s '$abundance_file' data/raw/abundance.csv &&
431 #end if
432 ]]></token>
433 <token name="@INIT_ENRICHMENT_PLOT@"><![CDATA[
434
435 mkdir -p data/raw &&
436 mkdir -p data/processed &&
437
438 #if $metadata_path:
439 ln -s '$metadata_path' data/raw/metadata.csv &&
440 #end if
441 #if $me_or_frac_contrib_file:
442 ln -s '$me_or_frac_contrib_file' data/raw/me_or_frac_contrib.csv &&
443 #end if
444 ]]></token>
445 <token name="@INIT_ISOTOPOLOGUE_PLOT@"><![CDATA[
446
447 mkdir -p data/raw &&
448 mkdir -p data/processed &&
449
450 #if $metadata_path:
451 ln -s '$metadata_path' data/raw/metadata.csv &&
452 #end if
453 #if $isotop_prop_file:
454 ln -s '$isotop_prop_file' data/raw/isotop_prop.csv &&
455 #end if
456 ]]></token>
457 <token name="@INIT_DIFF_ANALYSIS@"><![CDATA[
458
459 mkdir -p data/raw &&
460 mkdir -p data/processed &&
461
462 #if $metadata_path:
463 ln -s '$metadata_path' data/raw/metadata.csv &&
464 #end if
465
466 #set $impute_values = {}
467 #if str( $data_input.data_input_selector ) == "abundance":
468 #if $data_input.abundance_file:
469 ln -s '$data_input.abundance_file' data/raw/abundance.csv &&
470 #silent $impute_values['abundances']='min'
471 #end if
472 #elif str( $data_input.data_input_selector ) == "mean_enrichment":
473 #if $data_input.me_or_frac_contrib_file:
474 ln -s '$data_input.me_or_frac_contrib_file' data/raw/me_or_frac_contrib.csv &&
475 #silent $impute_values['mean_enrichment']='min'
476 #end if
477 #elif str( $data_input.data_input_selector ) == "isotop_prop":
478 #if $data_input.isotop_prop_file:
479 ln -s '$data_input.isotop_prop_file' data/raw/isotop_prop.csv &&
480 #silent $impute_values['isotopologue_proportions']='min'
481 #end if
482 #else
483 #if $data_input.isotop_abs_file:
484 ln -s '$data_input.isotop_abs_file' data/raw/isotop_abs.csv &&
485 #silent $impute_values['isotopologues']='min'
486 #end if
487 #end if
488 ]]></token>
489 <token name="@INIT_METABOLOGRAM@"><![CDATA[
490 #import json
491 #import re
492 #import os
493 #import csv
494 #import subprocess
495
496 mkdir -p data/raw &&
497 mkdir -p data/processed &&
498 mkdir -p data/integration_files &&
499
500 #if $path_kegg_metabolites:
501 ln -s '$path_kegg_metabolites' data/integration_files/pathways_kegg_metabolites.csv &&
502 #end if
503 #if $path_kegg_transcripts:
504 ln -s '$path_kegg_transcripts' data/integration_files/pathways_kegg_transcripts.csv &&
505 #end if
506
507 #if $metadata_path:
508 ln -s '$metadata_path' data/raw/metadata.csv &&
509 #end if
510
511 #set $impute_values = {}
512 #if str( $data_input.data_input_selector ) == "abundance":
513 #if $data_input.abundance_file:
514 ln -s '$data_input.abundance_file' data/raw/abundance.csv &&
515 #silent $impute_values['abundances']='min'
516 #end if
517 #else:
518 #if $data_input.me_or_frac_contrib_file:
519 ln -s '$data_input.me_or_frac_contrib_file' data/raw/me_or_frac_contrib.csv &&
520 #silent $impute_values['mean_enrichment']='min'
521 #end if
522 #end if
523
524 #for $i, $s in enumerate($deg_list)
525 #set $cpt = str($i+1)
526 ln -s '${s.input}' data/integration_files/DEG_comparison'${cpt}'.csv &&
527 #end for
528
529
530 ]]></token>
531 <token name="@INIT_DIFF_MULTIGROUP_ANALYSIS@"><![CDATA[
532
533 mkdir -p data/raw &&
534 mkdir -p data/processed &&
535
536 #if $metadata_path:
537 ln -s '$metadata_path' data/raw/metadata.csv &&
538 #end if
539
540 #set $impute_values = {}
541 #if str( $data_input.data_input_selector ) == "abundance":
542 #if $data_input.abundance_file:
543 ln -s '$data_input.abundance_file' data/raw/abundance.csv &&
544 #silent $impute_values['abundances']='min'
545 #end if
546 #elif str( $data_input.data_input_selector ) == "mean_enrichment":
547 #if $data_input.me_or_frac_contrib_file:
548 ln -s '$data_input.me_or_frac_contrib_file' data/raw/me_or_frac_contrib.csv &&
549 #silent $impute_values['mean_enrichment']='min'
550 #end if
551 #elif str( $data_input.data_input_selector ) == "isotop_prop":
552 #if $data_input.isotop_prop_file:
553 ln -s '$data_input.isotop_prop_file' data/raw/isotop_prop.csv &&
554 #silent $impute_values['isotopologue_proportions']='min'
555 #end if
556 #else
557 #if $data_input.isotop_abs_file:
558 ln -s '$data_input.isotop_abs_file' data/raw/isotop_abs.csv &&
559 #silent $impute_values['isotopologues']='min'
560 #end if
561 #end if
562 ]]></token>
563 <token name="@INIT_IMPUTE_VALUES@"><![CDATA[
564 #import re
565 #set $impute_values = {}
566 #if $abundance_file:
567 #silent $impute_values['abundances']='min'
568 #end if
569 #if $me_or_frac_contrib_file:
570 #silent $impute_values['mean_enrichment']='min'
571 #end if
572 ]]></token>
573 <token name="@INIT_DATATYPES@"><![CDATA[
574 #import re
575 #set $datatypes_avail = list()
576 #if str( $data_input.data_input_selector ) == "abundance":
577 #if $data_input.abundance_file:
578 $datatypes_avail.append(re.sub('"', '', "abundances"))
579 #end if
580 #elif str( $data_input.data_input_selector ) == "mean_enrichment":
581 #if $data_input.me_or_frac_contrib_file:
582 $datatypes_avail.append(re.sub('"', '', "mean_enrichment"))
583 #end if
584 #elif str( $data_input.data_input_selector ) == "isotop_prop":
585 #if $data_input.isotop_prop_file:
586 $datatypes_avail.append(re.sub('"', '', "isotopologue_proportions"))
587 #end if
588 #else
589 #if $data_input.isotop_abs_file:
590 $datatypes_avail.append(re.sub('"', '', "isotopologues"))
591 #end if
592 #end if
593 ]]></token>
594 <token name="@INIT_STAT_TEST@"><![CDATA[
595 #import re
596 #set $statistical_test = {}
597 #if str( $data_input.data_input_selector ) == "abundance":
598 #if $data_input.abundance_file:
599 #silent $statistical_test['abundances']=str($data_input.stat_test)
600 #end if
601 #elif str( $data_input.data_input_selector ) == "mean_enrichment":
602 #if $data_input.me_or_frac_contrib_file:
603 #silent $statistical_test['mean_enrichment']=str($data_input.stat_test)
604 #end if
605 #elif str( $data_input.data_input_selector ) == "isotop_prop":
606 #if $data_input.isotop_prop_file:
607 #silent $statistical_test['isotopologue_proportions']=str($data_input.stat_test)
608 #end if
609 #else
610 #if $data_input.isotop_abs_file:
611 #silent $statistical_test['isotopologues']=str($data_input.stat_test)
612 #end if
613 #end if
614 ]]></token>
615 <token name="@INIT_CONDITIONS@"><![CDATA[
616 #import re
617 #set $conds = list()
618 #for $co in $conditions:
619 $conds.append(re.sub('"', '', str($co)))
620 #end for
621 ]]></token>
622 <token name="@INIT_TIMEPOINTS@"><![CDATA[
623
624 #import re
625 #set $timepoints = list()
626 #for $tp in $timepoint:
627 $timepoints.append(re.sub('"', '', str($tp)))
628 #end for
629 ]]></token>
630 <token name="@INIT_GROUPS@"><![CDATA[
631 #import re
632 #set $groups = list()
633 $groups.append(re.sub('"', '', str("condition")))
634 $groups.append(re.sub('"', '', str("timepoint")))
635
636 ]]></token>
637 <token name="@INIT_ENRICHMENT_METABOLITES@"><![CDATA[
638 #import json
639 #import re
640 #set $metabolites = {}
641 #for $cp in $compartments:
642 #silent $metabolites[re.sub('"', '', str($cp))]=list()
643 #for $met in $metabolites_list:
644 $metabolites[re.sub('"', '', str($cp))].append(re.sub('"', '\'', str($met)))
645 #end for
646 #end for
647 ]]></token>
648 <token name="@INIT_ISOTOPOLOGUE_METABOLITES@"><![CDATA[
649 #set $metabolites = {}
650 #for $cp in $compartments:
651 #silent $metabolites[re.sub('"', '', str($cp))]=list()
652 #for $met in $metabolites_list:
653 #set tmp_met=re.sub('\,', '--',str($met))
654 #set tmp_met_bis=str(re.split('_m', str($tmp_met))[0])
655 #set tmp_met_ter=re.sub('--', '\,',str($tmp_met_bis))
656 $metabolites[re.sub('"', '', str($cp))].append(re.sub('"', '\'', str(tmp_met_ter)))
657 #end for
658 #end for
659 ]]></token>
660 <token name="@INIT_MULTIGROUP_COMPARISONS@"><![CDATA[
661 #set $comparisons = list()
662 #for $tp in $timepoint:
663 #set $ctrl_found=False
664 #set $ctrl=""
665
666 #for $co in $conditions:
667 #set $sub_comparisons = list()
668 #if str($co) in ["Control", "control","ctrl"]:
669 #set $ctrl_found=True
670 #set $ctrl=str($co)
671 $sub_comparisons.append(re.sub('"', '', str($co)))
672 $sub_comparisons.append(re.sub('"', '', str($tp)))
673 #else:
674 $sub_comparisons.append(re.sub('"', '', str($co)))
675 $sub_comparisons.append(re.sub('"', '', str($tp)))
676
677 #end if
678 $comparisons.append($sub_comparisons)
679 #end for
680 #end for
681 ]]></token>
682 <token name="@INIT_CONDITIONS_TIMECOURSE@"><![CDATA[
683 #import re
684 #set $conds = list()
685 #for $co in $conditions:
686 $conds.append(re.sub('"', '', str($co)))
687 #end for
688
689 ]]></token>
690 <token name="@INIT_COMPARISONS@"><![CDATA[
691 #import re
692 #set $conds = list()
693 #for $co in $conditions:
694 $conds.append(re.sub('"', '', str($co)))
695 #end for
696 #set $timepoints = list()
697 #for $tp in $timepoint:
698 $timepoints.append(re.sub('"', '', str($tp)))
699 #end for
700
701 #set $comparisons = list()
702 #if len($conds) > 1:
703 #if len($timepoints) > 0:
704 #for $tp in $timepoint:
705 #set $ctrl_found=False
706 #set $ctrl=""
707 #set $comparisons_bis = list()
708 #for $co in $conditions:
709 #set $sub_comparisons = list()
710 #if str($co) in ["'Control'", "'control'", "'ctrl'"]:
711 #set $ctrl_found=True
712 #set $ctrl=str($co)
713 #else:
714 $sub_comparisons.append(re.sub('"', '', str($co)))
715 $sub_comparisons.append(re.sub('"', '', str($tp)))
716
717 #end if
718 $comparisons_bis.append($sub_comparisons)
719 #end for
720
721 #if $ctrl_found:
722 $sub_comparisons.append(str($ctrl))
723 $sub_comparisons.append(str($tp))
724 $comparisons_bis.append($sub_comparisons)
725 #end if
726
727 $comparisons.append($comparisons_bis)
728 #end for
729 #else
730 #for $co in $conditions:
731 $comparisons.append(re.sub('"', '', str($co)))
732 #end for
733 #end if
734
735 #else
736 #if len($conds) > 0:
737 #if len($timepoints) > 1:
738 #for $co in $conditions:
739 #set $comparisons_bis = list()
740 #for $tp in $timepoint:
741 #set $sub_comparisons = list()
742 $sub_comparisons.append(re.sub('"', '', str($co)))
743 $sub_comparisons.append(re.sub('"', '', str($tp)))
744 $comparisons_bis.append($sub_comparisons)
745 #end for
746 $comparisons.append($comparisons_bis)
747 #end for
748 #end if
749 #else
750 #for $tp in $timepoint:
751 $comparisons.append(re.sub('"', '', str($tp)))
752 #end for
753 #end if
754 #end if
755 ]]></token>
756 <token name="@INIT_TRANSCRIPTS@"><![CDATA[
757 #import re
758 #import os
759 #import subprocess
760 #set $transcripts = list()
761
762 #for $i, $s in enumerate($deg_list)
763 #set $cpt = str($i+1)
764 $transcripts.append(re.sub('"', '', "DEG_comparison"+str($i+1)))
765 #set $deg_one_values = os.fsdecode(subprocess.check_output('head -n1 ' + str($s.input) + '| cut -f' + str($s.valuecol), shell=True))
766 #set $deg_one_id = os.fsdecode(subprocess.check_output('head -n1 ' + str($s.input) + '| cut -f' + str($s.idcol), shell=True))
767 #end for
768 ]]></token>
769 <token name="@INIT_PATHWAYS@"><![CDATA[
770 #set $pathways = {}
771 #if $path_kegg_metabolites:
772 #silent $pathways['metabolites']='pathways_kegg_metabolites'
773 #end if
774 #if $path_kegg_transcripts:
775 #silent $pathways['transcripts']='pathways_kegg_transcripts'
776 #end if
777 ]]></token>
778 </macros>