93
+ − 1 <tool id="MaREA" name="Metabolic Reaction 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="5.2.2">lxml</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 </requirements>
+ − 16
+ − 17 <command detect_errors="exit_code">
+ − 18 <![CDATA[
+ − 19 python $__tool_directory__/marea.py
+ − 20
+ − 21 --tool_dir $__tool_directory__
+ − 22 --option $cond.type_selector
+ − 23 --out_log $log
+ − 24
+ − 25 #if $cond.type_selector == 'datasets':
+ − 26
+ − 27 --using_RAS $cond.using_ras.check
+ − 28 --using_RPS $cond.using_rps.check
+ − 29
+ − 30 #if $cond.using_ras.check == 'true':
+ − 31 --input_datas
+ − 32 #for $data in $cond.using_ras.input_datasets:
+ − 33 ${data.input}
+ − 34 #end for
+ − 35
+ − 36 --names
+ − 37 #for $data in $cond.using_ras.input_datasets:
+ − 38 ${data.input_name}
+ − 39 #end for
+ − 40 #end if
+ − 41
+ − 42 #if $cond.using_rps.check == 'true':
+ − 43 --input_datas_rps
+ − 44 #for $data in $cond.using_rps.input_datasets_rps:
+ − 45 ${data.input_rps}
+ − 46 #end for
+ − 47
+ − 48 --names_rps
+ − 49 #for $data in $cond.using_rps.input_datasets_rps:
+ − 50 ${data.input_name_rps}
+ − 51 #end for
+ − 52 #end if
+ − 53
+ − 54 #elif $cond.type_selector == 'dataset_class':
+ − 55
+ − 56 --using_RAS $cond.using_ras_all.check
+ − 57 --using_RPS $cond.using_rps_all.check
+ − 58
+ − 59 #if $cond.using_ras_all.check == 'true':
+ − 60 --input_data ${cond.using_ras_all.input_data}
+ − 61 --input_class ${cond.using_ras_all.input_class}
+ − 62 #end if
+ − 63
+ − 64 #if $cond.using_rps_all.check == 'true':
+ − 65 --input_data_rps ${cond.using_rps_all.input_data_rps}
+ − 66 --input_class_rps ${cond.using_rps_all.input_class_rps}
+ − 67 #end if
+ − 68 #end if
+ − 69
+ − 70 --comparison ${comparis.comparison}
+ − 71 #if $comparis.comparison == 'onevsmany'
+ − 72 --control '${cond.comparis.controlgroup}'
+ − 73 #end if
+ − 74
+ − 75 --choice_map '${cond_choice_map.choice_map}'
+ − 76 #if $cond_choice_map.choice_map == 'Custom':
+ − 77 --custom_map ${cond_choice_map.custom_map}
+ − 78 #end if
+ − 79
+ − 80 #if $advanced.choice == 'true':
+ − 81 --pValue ${advanced.pValue}
+ − 82 --fChange ${advanced.fChange}
+ − 83 --generate_svg ${advanced.generateSvg}
+ − 84 --generate_pdf ${advanced.generatePdf}
+ − 85 --net ${advanced.netRPS}
+ − 86 #else
+ − 87 --pValue 0.05
+ − 88 --fChange 1.2
+ − 89 --generate_svg false
+ − 90 --generate_pdf true
+ − 91 --net false
+ − 92 #end if
+ − 93 ]]>
+ − 94 </command>
+ − 95
+ − 96 <inputs>
+ − 97 <conditional name="cond">
+ − 98 <param name="type_selector" argument="--option" type="select" label="Input format:">
+ − 99 <option value="datasets" selected="true">RAS of group 1 + RAS of group 2 + ... + RAS of group N</option>
+ − 100 <option value="dataset_class">RAS of all samples + sample group specification</option>
+ − 101 </param>
+ − 102
+ − 103 <when value="datasets">
+ − 104 <conditional name = "using_ras">
+ − 105 <param name = "check" argument = "--using_ras" type = "boolean" checked = "true" label = "Using RAS datasets." />
+ − 106
+ − 107 <when value = "true">
+ − 108 <repeat name="input_datasets" title="RAS dataset" min="2">
+ − 109 <param name="input" argument="--input_datas" type="data" format="tabular, csv, tsv" label="add dataset" />
+ − 110 <param name="input_name" argument="--names" type="text" label="Dataset's name:" value="Dataset" help="Default: Dataset" />
+ − 111 </repeat>
+ − 112 </when>
+ − 113 </conditional>
+ − 114
+ − 115 <conditional name = "using_rps">
+ − 116 <param name = "check" argument = "--using_rps" type = "boolean" checked = "false" label = "Using RPS datasets." />
+ − 117
+ − 118 <when value = "true">
+ − 119 <repeat name="input_datasets_rps" title="RPS dataset" min="2">
+ − 120 <param name="input_rps" argument="--input_datas_rps" type="data" format="tabular, csv, tsv" label="add dataset" />
+ − 121 <param name="input_name_rps" argument="--names_rps" type="text" label="Dataset's name:" value="Dataset" help="Default: Dataset" />
+ − 122 </repeat>
+ − 123 </when>
+ − 124 </conditional>
+ − 125 </when>
+ − 126
+ − 127 <when value="dataset_class">
+ − 128 <conditional name = "using_ras_all">
+ − 129 <param name = "check" argument = "--using_ras_all" type = "boolean" checked = "true" label = "Using RAS datasets." />
+ − 130
+ − 131 <when value = "true">
+ − 132 <param name="input_data" argument="--input_data" type="data" format="tabular, csv, tsv" label="RAS of all samples" />
+ − 133 <param name="input_class" argument="--input_class" type="data" format="tabular, csv, tsv" label="Sample group specification" />
+ − 134 </when>
+ − 135 </conditional>
+ − 136
+ − 137 <conditional name = "using_rps_all">
+ − 138 <param name = "check" argument = "--using_rps_all" type = "boolean" checked = "false" label = "Using RPS datasets." />
+ − 139
+ − 140 <when value = "true">
+ − 141 <param name="input_data_rps" argument="--input_data_rps" type="data" format="tabular, csv, tsv" label="RPS of all samples" />
+ − 142 <param name="input_class_rps" argument="--input_class_rps" type="data" format="tabular, csv, tsv" label="Sample group specification" />
+ − 143 </when>
+ − 144 </conditional>
+ − 145 </when>
+ − 146 </conditional>
+ − 147
+ − 148 <conditional name="comparis">
+ − 149 <param name="comparison" argument="--comparison" type="select" label="Groups comparison:">
+ − 150 <option value="manyvsmany" selected="true">One vs One</option>
+ − 151 <option value="onevsrest">One vs All</option>
+ − 152 <option value="onevsmany">One vs Control</option>
+ − 153 </param>
+ − 154 <when value="onevsmany">
+ − 155 <param name="controlgroup" argument="--controlgroup" type="text" label="Control group label:" value="0" help="Name of group label to be compared to others"/>
+ − 156 </when>
+ − 157 </conditional>
+ − 158
+ − 159 <conditional name="cond_choice_map">
+ − 160 <param name="choice_map" argument="--choice_map" type="select" label="Choose metabolic map:">
+ − 161 <option value="HMRcore" selected="true">HMRcore</option>
+ − 162 <option value="ENGRO2">ENGRO2</option>
+ − 163 <option value="Custom">Custom</option>
+ − 164 </param>
+ − 165
+ − 166 <when value="Custom">
+ − 167 <param name="custom_map" argument="--custom_map" type="data" format="xml, svg" label="custom-map.svg"/>
+ − 168 </when>
+ − 169 </conditional>
+ − 170
+ − 171 <conditional name="advanced">
+ − 172 <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.">
+ − 173 <option value="true" selected="true">No</option>
+ − 174 <option value="false">Yes</option>
+ − 175 </param>
+ − 176
+ − 177 <when value="true">
+ − 178 <param name="pValue" argument="--pValue" type="float" size="20" value="0.05" max="1" min="0" label="P-value threshold:" help="min value 0" />
+ − 179 <param name="fChange" argument="--fChange" type="float" size="20" value="1.2" min="1" label="Fold-Change threshold:" help="min value 1" />
+ − 180 <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?" />
+ − 181 <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?" />
+ − 182
+ − 183 <param name="netRPS" argument="--net" type="boolean" checked="false" label="Should RPS enrichment use net values?" help="If checked and RPS datasets are present the arrow tips of a reversible arrow will be colored with the net contribution of both directions' RPS values" />
+ − 184 </when>
+ − 185 </conditional>
+ − 186 </inputs>
+ − 187
+ − 188 <outputs>
+ − 189 <data format="txt" name="log" label="MaREA - Log" />
+ − 190 <collection name="results" type="list" label="MaREA - Results">
+ − 191 <discover_datasets pattern="__name_and_ext__" directory="result"/>
+ − 192 </collection>
+ − 193 </outputs>
+ − 194
+ − 195 <help>
+ − 196 <![CDATA[
+ − 197
+ − 198 What it does
+ − 199 -------------
+ − 200
+ − 201 This tool analyzes and visualizes differences in the Reaction Activity Scores (RASs) of groups of samples, as computed by the Expression2RAS tool, of groups of samples.
+ − 202
+ − 203 Accepted files are:
+ − 204 - option 1) two or more RAS datasets, each referring to samples in a given group. The user can specify a label for each group (as e.g. "classA" and "classB");
+ − 205 - option 2) one RAS dataset and one group-file specifying the group each sample belongs to.
+ − 206
+ − 207 RAS datasets format: tab-separated text files, reporting the RAS value of each reaction (row) for a given sample (column).
+ − 208
+ − 209 Column header: sample ID.
+ − 210 Row header: reaction ID.
+ − 211
+ − 212 Optional files:
+ − 213 - custom svg map. Graphical elements must have the same IDs of reactions. See HmrCore svg map for an example.
+ − 214
+ − 215 The tool generates:
+ − 216 - 1) a tab-separated file: reporting fold-change and p-values of reaction activity scores (RASs) between a pair of conditions/classes;
+ − 217 - 2) a metabolic map file (downloadable as .svg): visualizing up- and down-regulated reactions between a pair of conditions/classes;
+ − 218 - 3) a log file (.txt).
+ − 219
+ − 220 Output options:
+ − 221 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’).
+ − 222
+ − 223 Alternative options are:
+ − 224 - comparison of each group vs. the rest of samples (option ‘One vs Rest’)
+ − 225 - 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.
+ − 226
+ − 227 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".
+ − 228
+ − 229 Example input
+ − 230 -------------
+ − 231
+ − 232 "RAS of group 1 + RAS of group 2 + ... + RAS of group N" option:
+ − 233
+ − 234 RAS Dataset 1:
+ − 235
+ − 236 +------------+----------------+----------------+----------------+
+ − 237 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
+ − 238 +============+================+================+================+
+ − 239 | r1642 | 0.523167 | 0.371355 | 0.925661 |
+ − 240 +------------+----------------+----------------+----------------+
+ − 241 | r1643 | 0.568765 | 0.765567 | 0.456789 |
+ − 242 +------------+----------------+----------------+----------------+
+ − 243 | r1640 | 0.876545 | 0.768933 | 0.987654 |
+ − 244 +------------+----------------+----------------+----------------+
+ − 245 | r1641 | 0.456788 | 0.876543 | 0.876542 |
+ − 246 +------------+----------------+----------------+----------------+
+ − 247 | r1646 | 0.876543 | 0.786543 | 0.897654 |
+ − 248 +------------+----------------+----------------+----------------+
+ − 249
+ − 250 RAS Dataset 2:
+ − 251
+ − 252 +------------+----------------+----------------+----------------+
+ − 253 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
+ − 254 +============+================+================+================+
+ − 255 | r1642 | 0.523167 | 0.371355 | 0.925661 |
+ − 256 +------------+----------------+----------------+----------------+
+ − 257 | r1643 | 0.568765 | 0.765567 | 0.456789 |
+ − 258 +------------+----------------+----------------+----------------+
+ − 259 | r1640 | 0.876545 | 0.768933 | 0.987654 |
+ − 260 +------------+----------------+----------------+----------------+
+ − 261 | r1641 | 0.456788 | 0.876543 | 0.876542 |
+ − 262 +------------+----------------+----------------+----------------+
+ − 263 | r1646 | 0.876543 | 0.786543 | 0.897654 |
+ − 264 +------------+----------------+----------------+----------------+
+ − 265
+ − 266 "RAS of all samples + sample group specification" option:
+ − 267
+ − 268 RAS Dataset:
+ − 269
+ − 270 +------------+----------------+----------------+----------------+
+ − 271 | Reaction ID| TCGAA62670 | TCGAA62671 | TCGAA62672 |
+ − 272 +============+================+================+================+
+ − 273 | r1642 | 0.523167 | 0.371355 | 0.925661 |
+ − 274 +------------+----------------+----------------+----------------+
+ − 275 | r1643 | 0.568765 | 0.765567 | 0.456789 |
+ − 276 +------------+----------------+----------------+----------------+
+ − 277 | r1640 | 0.876545 | 0.768933 | 0.987654 |
+ − 278 +------------+----------------+----------------+----------------+
+ − 279 | r1641 | 0.456788 | 0.876543 | 0.876542 |
+ − 280 +------------+----------------+----------------+----------------+
+ − 281 | r1646 | 0.876543 | 0.786543 | 0.897654 |
+ − 282 +------------+----------------+----------------+----------------+
+ − 283
+ − 284 Group-file
+ − 285
+ − 286 +---------------+-----------+
+ − 287 | Patient ID | Class |
+ − 288 +===============+===========+
+ − 289 | TCGAAA3529 | MSI |
+ − 290 +---------------+-----------+
+ − 291 | TCGAA62671 | MSS |
+ − 292 +---------------+-----------+
+ − 293 | TCGAA62672 | MSI |
+ − 294 +---------------+-----------+
+ − 295
+ − 296 Advanced options
+ − 297 ----------------
+ − 298
+ − 299 P-Value threshold: the threshold used for significance Kolmogorov-Smirnov (KS) test, to verify whether the distributions of RASs over the samples in two sets are significantly different
+ − 300
+ − 301 Fold-Change threshold: threshold of the fold-change between the average RAS of two groups. Among the reactions that pass the KS test, only fold-change values larger than the indicated threshold will be visualized on the output metabolic map;
+ − 302
+ − 303
+ − 304 .. class:: infomark
+ − 305
+ − 306 **TIP**: If your data is not TAB delimited, use `Convert delimiters to TAB`_.
+ − 307
+ − 308 .. class:: infomark
+ − 309
+ − 310 **TIP**: If your dataset is not split into classes, use MaREA cluster analysis.
+ − 311
+ − 312 .. class:: infomark
+ − 313
+ − 314 **TIP**: This tool using the RAS scores computed by Ras generator tool.
+ − 315
+ − 316 @REFERENCE@
+ − 317
+ − 318 .. _Ras tool: http://bimib.disco.unimib.it:5555/?tool_id=toolshed.g2.bx.psu.edu%2Frepos%2Fbimib%2Fmarea%2FMaREA+RAS+Generator%2F1.0.6&version=1.0.6&__identifer=auulv6gbp76
+ − 319 .. _Convert delimiters to TAB: http://bimib.disco.unimib.it:5555/?tool_id=Convert+characters1&version=1.0.0&__identifer=76g7trea4j6
+ − 320 .. _MaREA cluster analysis: http://bimib.disco.unimib.it:5555/?tool_id=toolshed.g2.bx.psu.edu%2Frepos%2Fbimib%2Fmarea%2FMaREA_cluester%2F1.1.2&version=1.1.2&__identifer=lxbyzn2me9
+ − 321
+ − 322 ]]>
+ − 323 </help>
+ − 324 <expand macro="citations" />
+ − 325 </tool>