93
|
1 <tool id="FluxToMap" name="Metabolic Flux Enrichment Analysis" version="2.0.0">
|
|
2 <macros>
|
|
3 <import>marea_macros.xml</import>
|
|
4 </macros>
|
|
5
|
|
6 <requirements>
|
|
7 <requirement type="package" version="1.24.4">numpy</requirement>
|
|
8 <requirement type="package" version="2.0.3">pandas</requirement>
|
|
9 <requirement type="package" version="0.13.0">seaborn</requirement>
|
|
10 <requirement type="package" version="1.10.1">scipy</requirement>
|
|
11 <requirement type="package" version="1.5.1">svglib</requirement>
|
|
12 <requirement type="package" version="2.2.3">pyvips</requirement>
|
|
13 <requirement type="package" version="2.7.1">cairosvg</requirement>
|
|
14 <requirement type="package" version="0.29.0">cobra</requirement>
|
|
15 <requirement type="package" version="5.2.2">lxml</requirement>
|
|
16 </requirements>
|
|
17
|
|
18 <command detect_errors="exit_code">
|
|
19 <![CDATA[
|
|
20 python $__tool_directory__/flux_to_map.py
|
|
21
|
|
22 --tool_dir $__tool_directory__
|
|
23 --option $cond.type_selector
|
|
24 --out_log $log
|
|
25 --color_map $color_map
|
|
26
|
|
27 #if $cond.type_selector == 'datasets':
|
|
28
|
|
29 --input_datas_fluxes
|
|
30 #for $data in $cond.input_datasets_fluxes:
|
|
31 ${data.input_fluxes}
|
|
32 #end for
|
|
33
|
|
34 --names_fluxes
|
|
35 #for $data in $cond.input_datasets_fluxes:
|
|
36 ${data.input_name_fluxes}
|
|
37 #end for
|
|
38
|
|
39 #elif $cond.type_selector == 'dataset_class':
|
|
40
|
|
41 --input_data_fluxes $input_data_fluxes
|
|
42 --input_class_fluxes $input_class_fluxes
|
|
43
|
|
44 #end if
|
|
45
|
|
46 --comparison ${comparis.comparison}
|
|
47 #if $comparis.comparison == 'onevsmany'
|
226
|
48 --control '${comparis.controlgroup}'
|
93
|
49 #end if
|
|
50
|
|
51 --choice_map '${cond_choice_map.choice_map}'
|
|
52 #if $cond_choice_map.choice_map == 'Custom':
|
|
53 --custom_map ${cond_choice_map.custom_map}
|
|
54 #end if
|
|
55
|
|
56 #if $advanced.choice == 'true':
|
296
|
57 --test ${advanced.test}
|
93
|
58 --pValue ${advanced.pValue}
|
296
|
59 --adjusted ${advanced.adjusted}
|
93
|
60 --fChange ${advanced.fChange}
|
|
61 --generate_svg ${advanced.generateSvg}
|
|
62 --generate_pdf ${advanced.generatePdf}
|
|
63 #else
|
296
|
64 --test 'ks'
|
93
|
65 --pValue 0.05
|
296
|
66 --adjusted false
|
93
|
67 --fChange 1.2
|
|
68 --generate_svg false
|
|
69 --generate_pdf true
|
|
70 #end if
|
|
71 ]]>
|
|
72 </command>
|
|
73
|
|
74 <inputs>
|
|
75
|
|
76 <conditional name="cond">
|
|
77 <param name="type_selector" argument="--option" type="select" label="Input format:">
|
|
78 <option value="datasets" selected="true">Fluxes of group 1 + Fluxes of group 2 + ... + Fluxes of group N</option>
|
|
79 <option value="dataset_class">All fluxes + sample group specification</option>
|
|
80 </param>
|
|
81
|
|
82 <when value="datasets">
|
|
83 <repeat name="input_datasets_fluxes" title="Fluxes dataset" min="2">
|
|
84 <param name="input_fluxes" argument="--input_datas_fluxes" type="data" format="tabular, csv, tsv" label="add dataset" />
|
|
85 <param name="input_name_fluxes" argument="--names_fluxes" type="text" label="Dataset's name:" value="Dataset" help="Default: Dataset" />
|
|
86 </repeat>
|
|
87 </when>
|
|
88
|
|
89 <when value="dataset_class">
|
|
90 <param name="input_data_fluxes" argument="--input_data_fluxes" type="data" format="tabular, csv, tsv" label="All fluxes" />
|
|
91 <param name="input_class_fluxes" argument="--input_class_fluxes" type="data" format="tabular, csv, tsv" label="Sample group specification" />
|
|
92 </when>
|
|
93 </conditional>
|
|
94
|
|
95 <conditional name="comparis">
|
|
96 <param name="comparison" argument="--comparison" type="select" label="Groups comparison:">
|
|
97 <option value="manyvsmany" selected="true">One vs One</option>
|
|
98 <option value="onevsrest">One vs All</option>
|
|
99 <option value="onevsmany">One vs Control</option>
|
|
100 </param>
|
|
101 <when value="onevsmany">
|
|
102 <param name="controlgroup" argument="--controlgroup" type="text" label="Control group label:" value="0" help="Name of group label to be compared to others"/>
|
|
103 </when>
|
|
104 </conditional>
|
|
105
|
|
106 <conditional name="cond_choice_map">
|
|
107 <param name="choice_map" argument="--choice_map" type="select" label="Choose metabolic map:">
|
|
108 <option value="ENGRO2" selected="true">ENGRO2</option>
|
|
109 <option value="HMRcore" >HMRcore</option>
|
|
110 <option value="Custom">Custom</option>
|
|
111 </param>
|
|
112
|
|
113 <when value="Custom">
|
|
114 <param name="custom_map" argument="--custom_map" type="data" format="xml, svg" label="custom-map.svg"/>
|
|
115 </when>
|
|
116 </conditional>
|
|
117
|
|
118 <param name="color_map" argument="--color_map" type="select" label="Color map:">
|
|
119 <option value="viridis" selected="true">Viridis</option>
|
|
120 <option value="jet">Jet</option>
|
|
121 </param>
|
|
122
|
|
123 <conditional name="advanced">
|
296
|
124 <param name="choice" type="boolean" checked="false" label="Use advanced options?" help="Use this options to choose custom parameters for evaluation: statistical test, pValue, Fold-Change threshold, how to solve (A and NaN) and specify output maps.">
|
93
|
125 <option value="true" selected="true">No</option>
|
|
126 <option value="false">Yes</option>
|
|
127 </param>
|
|
128
|
|
129 <when value="true">
|
296
|
130 <param name="test" argument="--test" type="select" label="Statistical test to use" help="Select the statistical test to use for the analysis based on your data and the amount of replicates.">
|
293
|
131 <option value="ks" selected="true">Kolmogorov-Smirnov</option>
|
|
132 <option value="ttest_p">T-test (paired)</option>
|
|
133 <option value="ttest_ind">T-test (unpaired)</option>
|
|
134 <option value="wilcoxon">Wilcoxon</option>
|
|
135 <option value="mw">Mann-Whitney</option>
|
|
136 </param>
|
93
|
137 <param name="pValue" argument="--pValue" type="float" size="20" value="0.05" max="1" min="0" label="P-value threshold:" help="min value 0" />
|
296
|
138 <param name="adjusted" argument="--adjusted" type="boolean" checked="false" label="Use adjusted p-values" help="Should the program adjust the P-values based on the FDR (Benjamini-Hochberg) correction?" />
|
93
|
139 <param name="fChange" argument="--fChange" type="float" size="20" value="1.2" min="1" label="Fold-Change threshold:" help="min value 1" />
|
|
140 <param name="generateSvg" argument="--generateSvg" type="boolean" checked="false" label="Generate SVG map" help="should the program generate an editable svg map of the processes?" />
|
|
141 <param name="generatePdf" argument="--generatePdf" type="boolean" checked="true" label="Generate PDF map" help="should the program return a non editable (but displayble) pdf map of the processes?" />
|
|
142 </when>
|
|
143 </conditional>
|
|
144 </inputs>
|
|
145
|
|
146 <outputs>
|
|
147 <data format="txt" name="log" label="FluxToMap - Log" />
|
|
148 <collection name="results" type="list" label="FluxToMap - Results">
|
|
149 <discover_datasets pattern="__name_and_ext__" directory="result"/>
|
|
150 </collection>
|
|
151 </outputs>
|
|
152
|
|
153 <help>
|
|
154 <![CDATA[
|
|
155
|
|
156 What it does
|
|
157 -------------
|
|
158
|
|
159 This tool analyzes and visualizes differences in reactions fluxes of groups of samples, returned by the Flux Simulation tool, of groups of samples.
|
|
160
|
217
|
161 Accepted files are (Files must have different names):
|
93
|
162 - option 1) two or more fluxes datasets, each referring to samples in a given group. The user can specify a label for each group;
|
|
163 - option 2) one fluxes dataset and one group-file specifying the group each sample belongs to (e.g. the accepted group file is thought to be the one returned by the Clustering tool).
|
|
164
|
|
165 Optional files:
|
|
166 - custom svg map. Graphical elements must have the same IDs of reactions. See HmrCore svg map for an example.
|
|
167
|
|
168 The tool generates:
|
166
|
169 - A tab-separated file: reporting fold-change and p-values of fluxes between a pair of conditions/classes;
|
|
170 - A metabolic map file (downloadable as .svg and .png): visualizing up- and down-regulated reactions between a pair of conditions/classes;
|
169
|
171 - Two metabolic maps to visualize the mean and median fluxes normalized amongst all classes. The associated color map is also generated (absolute ranges);
|
166
|
172 - A log file (.txt).
|
165
|
173
|
93
|
174 Output options:
|
165
|
175 - To calculate P-Values and Fold-Changes and to enrich maps, comparisons are performed for each possible pair of groups (default option ‘One vs One’).
|
93
|
176
|
|
177 Alternative options are:
|
|
178 - comparison of each group vs. the rest of samples (option ‘One vs Rest’)
|
|
179 - comparison of each group vs. a control group (option ‘One vs Control). If this option is selected the user must indicate the control group label.
|
|
180
|
|
181 Output files will be named as classA_vs_classB. Reactions will conventionally be reported as up-regulated (down-regulated) if they are significantly more (less) active in class having label "classA".
|
|
182
|
|
183 Example input
|
|
184 -------------
|
|
185
|
|
186 "Fluxes of group 1 + Fluxes of group 2 + ... + Fluxes of group N" option:
|
|
187
|
|
188 Fluxes Dataset 1:
|
|
189
|
|
190 +------------+----------------+----------------+----------------+
|
|
191 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
|
|
192 +============+================+================+================+
|
|
193 | r1642 | 0.523167 | 0.371355 | 0.925661 |
|
|
194 +------------+----------------+----------------+----------------+
|
|
195 | r1643 | 0.568765 | 0.765567 | 0.456789 |
|
|
196 +------------+----------------+----------------+----------------+
|
|
197 | r1640 | 0.876545 | 0.768933 | 0.987654 |
|
|
198 +------------+----------------+----------------+----------------+
|
|
199 | r1641 | 0.456788 | 0.876543 | 0.876542 |
|
|
200 +------------+----------------+----------------+----------------+
|
|
201 | r1646 | 0.876543 | 0.786543 | 0.897654 |
|
|
202 +------------+----------------+----------------+----------------+
|
|
203
|
|
204 Fluxes Dataset 2:
|
|
205
|
|
206 +------------+----------------+----------------+----------------+
|
|
207 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
|
|
208 +============+================+================+================+
|
|
209 | r1642 | 0.523167 | 0.371355 | 0.925661 |
|
|
210 +------------+----------------+----------------+----------------+
|
|
211 | r1643 | 0.568765 | 0.765567 | 0.456789 |
|
|
212 +------------+----------------+----------------+----------------+
|
|
213 | r1640 | 0.876545 | 0.768933 | 0.987654 |
|
|
214 +------------+----------------+----------------+----------------+
|
|
215 | r1641 | 0.456788 | 0.876543 | 0.876542 |
|
|
216 +------------+----------------+----------------+----------------+
|
|
217 | r1646 | 0.876543 | 0.786543 | 0.897654 |
|
|
218 +------------+----------------+----------------+----------------+
|
|
219
|
|
220 "Fluxes of all samples + sample group specification" option:
|
|
221
|
|
222 Fluxes Dataset:
|
|
223
|
|
224 +------------+----------------+----------------+----------------+
|
|
225 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
|
|
226 +============+================+================+================+
|
|
227 | r1642 | 0.523167 | 0.371355 | 0.925661 |
|
|
228 +------------+----------------+----------------+----------------+
|
|
229 | r1643 | 0.568765 | 0.765567 | 0.456789 |
|
|
230 +------------+----------------+----------------+----------------+
|
|
231 | r1640 | 0.876545 | 0.768933 | 0.987654 |
|
|
232 +------------+----------------+----------------+----------------+
|
|
233 | r1641 | 0.456788 | 0.876543 | 0.876542 |
|
|
234 +------------+----------------+----------------+----------------+
|
|
235 | r1646 | 0.876543 | 0.786543 | 0.897654 |
|
|
236 +------------+----------------+----------------+----------------+
|
|
237
|
|
238 Group-file
|
|
239
|
|
240 +---------------+-----------+
|
|
241 | Patient ID | Class |
|
|
242 +===============+===========+
|
|
243 | TCGAAA3529 | MSI |
|
|
244 +---------------+-----------+
|
|
245 | TCGAA62671 | MSS |
|
|
246 +---------------+-----------+
|
|
247 | TCGAA62672 | MSI |
|
|
248 +---------------+-----------+
|
|
249
|
|
250
|
|
251 **TIP**: If your dataset is not split into classes, use MaREA cluster analysis.
|
|
252
|
|
253
|
|
254 ]]>
|
|
255 </help>
|
|
256 <expand macro="citations" />
|
|
257 </tool> |