comparison COBRAxy/flux_to_map.xml @ 4:41f35c2f0c7b draft

Uploaded
author luca_milaz
date Wed, 18 Sep 2024 10:59:10 +0000
parents
children 505b8574c017
comparison
equal deleted inserted replaced
3:1f3ac6fd9867 4:41f35c2f0c7b
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'
48 --control '${cond.comparis.controlgroup}'
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':
57 --pValue ${advanced.pValue}
58 --fChange ${advanced.fChange}
59 --generate_svg ${advanced.generateSvg}
60 --generate_pdf ${advanced.generatePdf}
61 #else
62 --pValue 0.05
63 --fChange 1.2
64 --generate_svg false
65 --generate_pdf true
66 #end if
67 ]]>
68 </command>
69
70 <inputs>
71
72 <conditional name="cond">
73 <param name="type_selector" argument="--option" type="select" label="Input format:">
74 <option value="datasets" selected="true">Fluxes of group 1 + Fluxes of group 2 + ... + Fluxes of group N</option>
75 <option value="dataset_class">All fluxes + sample group specification</option>
76 </param>
77
78 <when value="datasets">
79 <repeat name="input_datasets_fluxes" title="Fluxes dataset" min="2">
80 <param name="input_fluxes" argument="--input_datas_fluxes" type="data" format="tabular, csv, tsv" label="add dataset" />
81 <param name="input_name_fluxes" argument="--names_fluxes" type="text" label="Dataset's name:" value="Dataset" help="Default: Dataset" />
82 </repeat>
83 </when>
84
85 <when value="dataset_class">
86 <param name="input_data_fluxes" argument="--input_data_fluxes" type="data" format="tabular, csv, tsv" label="All fluxes" />
87 <param name="input_class_fluxes" argument="--input_class_fluxes" type="data" format="tabular, csv, tsv" label="Sample group specification" />
88 </when>
89 </conditional>
90
91 <conditional name="comparis">
92 <param name="comparison" argument="--comparison" type="select" label="Groups comparison:">
93 <option value="manyvsmany" selected="true">One vs One</option>
94 <option value="onevsrest">One vs All</option>
95 <option value="onevsmany">One vs Control</option>
96 </param>
97 <when value="onevsmany">
98 <param name="controlgroup" argument="--controlgroup" type="text" label="Control group label:" value="0" help="Name of group label to be compared to others"/>
99 </when>
100 </conditional>
101
102 <conditional name="cond_choice_map">
103 <param name="choice_map" argument="--choice_map" type="select" label="Choose metabolic map:">
104 <option value="ENGRO2" selected="true">ENGRO2</option>
105 <option value="HMRcore" >HMRcore</option>
106 <option value="Custom">Custom</option>
107 </param>
108
109 <when value="Custom">
110 <param name="custom_map" argument="--custom_map" type="data" format="xml, svg" label="custom-map.svg"/>
111 </when>
112 </conditional>
113
114 <param name="color_map" argument="--color_map" type="select" label="Color map:">
115 <option value="viridis" selected="true">Viridis</option>
116 <option value="jet">Jet</option>
117 </param>
118
119 <conditional name="advanced">
120 <param name="choice" type="boolean" checked="false" label="Use advanced options?" help="Use this options to choose custom parameters for evaluation: pValue, Fold-Change threshold, how to solve (A and NaN) and specify output maps.">
121 <option value="true" selected="true">No</option>
122 <option value="false">Yes</option>
123 </param>
124
125 <when value="true">
126 <param name="pValue" argument="--pValue" type="float" size="20" value="0.05" max="1" min="0" label="P-value threshold:" help="min value 0" />
127 <param name="fChange" argument="--fChange" type="float" size="20" value="1.2" min="1" label="Fold-Change threshold:" help="min value 1" />
128 <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?" />
129 <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?" />
130 </when>
131 </conditional>
132 </inputs>
133
134 <outputs>
135 <data format="txt" name="log" label="FluxToMap - Log" />
136 <collection name="results" type="list" label="FluxToMap - Results">
137 <discover_datasets pattern="__name_and_ext__" directory="result"/>
138 </collection>
139 </outputs>
140
141 <help>
142 <![CDATA[
143
144 What it does
145 -------------
146
147 This tool analyzes and visualizes differences in reactions fluxes of groups of samples, returned by the Flux Simulation tool, of groups of samples.
148
149 Accepted files are:
150 - option 1) two or more fluxes datasets, each referring to samples in a given group. The user can specify a label for each group;
151 - 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).
152
153 Optional files:
154 - custom svg map. Graphical elements must have the same IDs of reactions. See HmrCore svg map for an example.
155
156 The tool generates:
157 - 1) a tab-separated file: reporting fold-change and p-values of reaction activity scores (RASs) between a pair of conditions/classes;
158 - 2) a metabolic map file (downloadable as .svg): visualizing up- and down-regulated reactions between a pair of conditions/classes;
159 - 3) a log file (.txt).
160
161 Output options:
162 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’).
163
164 Alternative options are:
165 - comparison of each group vs. the rest of samples (option ‘One vs Rest’)
166 - 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.
167
168 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".
169
170 Example input
171 -------------
172
173 "RAS of group 1 + RAS of group 2 + ... + RAS of group N" option:
174
175 RAS Dataset 1:
176
177 +------------+----------------+----------------+----------------+
178 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
179 +============+================+================+================+
180 | r1642 | 0.523167 | 0.371355 | 0.925661 |
181 +------------+----------------+----------------+----------------+
182 | r1643 | 0.568765 | 0.765567 | 0.456789 |
183 +------------+----------------+----------------+----------------+
184 | r1640 | 0.876545 | 0.768933 | 0.987654 |
185 +------------+----------------+----------------+----------------+
186 | r1641 | 0.456788 | 0.876543 | 0.876542 |
187 +------------+----------------+----------------+----------------+
188 | r1646 | 0.876543 | 0.786543 | 0.897654 |
189 +------------+----------------+----------------+----------------+
190
191 RAS Dataset 2:
192
193 +------------+----------------+----------------+----------------+
194 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
195 +============+================+================+================+
196 | r1642 | 0.523167 | 0.371355 | 0.925661 |
197 +------------+----------------+----------------+----------------+
198 | r1643 | 0.568765 | 0.765567 | 0.456789 |
199 +------------+----------------+----------------+----------------+
200 | r1640 | 0.876545 | 0.768933 | 0.987654 |
201 +------------+----------------+----------------+----------------+
202 | r1641 | 0.456788 | 0.876543 | 0.876542 |
203 +------------+----------------+----------------+----------------+
204 | r1646 | 0.876543 | 0.786543 | 0.897654 |
205 +------------+----------------+----------------+----------------+
206
207 "RAS of all samples + sample group specification" option:
208
209 RAS Dataset:
210
211 +------------+----------------+----------------+----------------+
212 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
213 +============+================+================+================+
214 | r1642 | 0.523167 | 0.371355 | 0.925661 |
215 +------------+----------------+----------------+----------------+
216 | r1643 | 0.568765 | 0.765567 | 0.456789 |
217 +------------+----------------+----------------+----------------+
218 | r1640 | 0.876545 | 0.768933 | 0.987654 |
219 +------------+----------------+----------------+----------------+
220 | r1641 | 0.456788 | 0.876543 | 0.876542 |
221 +------------+----------------+----------------+----------------+
222 | r1646 | 0.876543 | 0.786543 | 0.897654 |
223 +------------+----------------+----------------+----------------+
224
225 Group-file
226
227 +---------------+-----------+
228 | Patient ID | Class |
229 +===============+===========+
230 | TCGAAA3529 | MSI |
231 +---------------+-----------+
232 | TCGAA62671 | MSS |
233 +---------------+-----------+
234 | TCGAA62672 | MSI |
235 +---------------+-----------+
236
237
238 **TIP**: If your dataset is not split into classes, use `MaREA cluster analysis`_.
239
240 .. class:: infomark
241
242 **TIP**: This tool using the RAS scores computed by `Ras tool`_.
243
244 ]]>
245 </help>
246 <expand macro="citations" />
247 </tool>