|
93
|
1 <tool id="CustomDataGenerator" name="Custom Data Generator" version="2.0.0">
|
|
|
2
|
|
|
3 <macros>
|
|
|
4 <import>marea_macros.xml</import>
|
|
|
5 </macros>
|
|
|
6
|
|
383
|
7 <requirements>
|
|
93
|
8 <requirement type="package" version="1.24.4">numpy</requirement>
|
|
|
9 <requirement type="package" version="2.0.3">pandas</requirement>
|
|
383
|
10 <requirement type="package" version="0.29.0">cobra</requirement>
|
|
93
|
11 <requirement type="package" version="5.2.2">lxml</requirement>
|
|
371
|
12 <requirement type="package" >openpyxl</requirement>
|
|
383
|
13 </requirements>
|
|
93
|
14
|
|
|
15 <command detect_errors="exit_code">
|
|
|
16 <![CDATA[
|
|
383
|
17 python $__tool_directory__/custom_data_generator.py
|
|
354
|
18 --tool_dir $__tool_directory__
|
|
345
|
19 --medium_selector $cond_medium.medium_selector
|
|
|
20 --output_format $output_format
|
|
|
21 #if $cond_model.model_selector == 'Custom_model'
|
|
|
22 --input $cond_model.input
|
|
|
23 --name $cond_model.name
|
|
|
24 #else
|
|
|
25 --model $cond_model.model_selector
|
|
|
26 --name $cond_model.model_selector
|
|
|
27 #end if
|
|
|
28 #if $cond_medium.medium_selector == 'Custom'
|
|
|
29 --medium $cond_medium.medium
|
|
|
30 #end if
|
|
93
|
31 --out_log $log
|
|
378
|
32
|
|
|
33 #if $output_format == 'tabular'
|
|
376
|
34 --out_tabular $out_tabular
|
|
378
|
35 #end if
|
|
|
36 #if $output_format == 'xlsx'
|
|
376
|
37 --out_xlsx $out_xlsx
|
|
378
|
38 #end if
|
|
362
|
39
|
|
93
|
40 ]]>
|
|
|
41 </command>
|
|
|
42 <inputs>
|
|
345
|
43 <conditional name="cond_model">
|
|
|
44 <expand macro="options_model"/>
|
|
379
|
45 <!-- ENGRO2 -->
|
|
|
46 <when value="ENGRO2">
|
|
|
47 <param name="name" argument="--name" type="text" value="ENGRO2" hidden="true" />
|
|
|
48 <conditional name="medium_selector">
|
|
382
|
49 <expand macro="options_ras_to_bounds_medium"/>
|
|
379
|
50 <when value="Custom">
|
|
|
51 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
52 </when>
|
|
|
53 </conditional>
|
|
|
54 </when>
|
|
|
55
|
|
|
56 <!-- Recon -->
|
|
|
57 <when value="Recon">
|
|
|
58 <param name="name" argument="--name" type="text" value="Recon" hidden="true" />
|
|
|
59 <param name="medium_selector" argument="--medium_selector" type="select" label="Medium">
|
|
|
60 <option value="Default" selected="true">Default (Recon built-in medium)</option>
|
|
|
61 <option value="Custom">Custom medium file</option>
|
|
|
62 </param>
|
|
|
63 <conditional name="medium_selector">
|
|
|
64 <when value="Custom">
|
|
|
65 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
66 </when>
|
|
|
67 </conditional>
|
|
|
68 </when>
|
|
|
69
|
|
|
70 <!-- HMRcore -->
|
|
|
71 <when value="HMRcore">
|
|
|
72 <param name="name" argument="--name" type="text" value="HMRcore" hidden="true" />
|
|
|
73 <param name="medium_selector" argument="--medium_selector" type="select" label="Medium">
|
|
|
74 <option value="Default" selected="true">Default (HMRcore built-in medium)</option>
|
|
|
75 <option value="Custom">Custom medium file</option>
|
|
|
76 </param>
|
|
|
77 <conditional name="medium_selector">
|
|
|
78 <when value="Custom">
|
|
|
79 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
80 </when>
|
|
|
81 </conditional>
|
|
|
82 </when>
|
|
|
83
|
|
|
84 <!-- Custom model -->
|
|
345
|
85 <when value="Custom_model">
|
|
|
86 <param name="input" argument="--input" type="data" format="json,xml" label="Custom model file:" />
|
|
379
|
87 <param name="name" argument="--name" type="text" label="Model's name:" value="CustomModel" />
|
|
|
88 <param name="medium_selector" argument="--medium_selector" type="select" label="Medium">
|
|
|
89 <option value="Default" selected="true">Don't use a separate medium file (use model defaults)</option>
|
|
|
90 <option value="Custom">Custom medium file (required)</option>
|
|
|
91 </param>
|
|
|
92 <conditional name="medium_selector">
|
|
|
93 <when value="Custom">
|
|
|
94 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
95 </when>
|
|
|
96 </conditional>
|
|
345
|
97 </when>
|
|
|
98 </conditional>
|
|
|
99
|
|
379
|
100
|
|
345
|
101 <!-- formato output -->
|
|
|
102 <param name="output_format" argument="--output_format" type="select" label="Output format:">
|
|
|
103 <option value="tabular" selected="true">CSV (tabular)</option>
|
|
|
104 <option value="xlsx">Excel (.xlsx)</option>
|
|
|
105 </param>
|
|
|
106
|
|
383
|
107 <!-- formato output -->
|
|
|
108 <param name="output_format" argument="--output_format" type="select" label="Output format:">
|
|
|
109 <option value="tabular" selected="true">CSV (tabular)</option>
|
|
|
110 <option value="xlsx">Excel (.xlsx)</option>
|
|
|
111 </param>
|
|
|
112
|
|
379
|
113
|
|
93
|
114 </inputs>
|
|
|
115
|
|
|
116 <outputs>
|
|
378
|
117 <data name="log" format="txt" label="CustomDataGenerator - Log" />
|
|
376
|
118
|
|
378
|
119 <data name="out_tabular" format="tabular"
|
|
376
|
120 label="${cond_model.model_selector}_data_tabular"
|
|
378
|
121 optional="true"
|
|
376
|
122 filter="output_format == 'tabular'"/>
|
|
378
|
123
|
|
|
124 <data name="out_xlsx" format="xlsx"
|
|
|
125 label="${cond_model.model_selector}_data_xlsx"
|
|
|
126 optional="true"
|
|
|
127 filter="output_format == 'xlsx'"/>
|
|
93
|
128 </outputs>
|
|
|
129
|
|
358
|
130
|
|
362
|
131
|
|
93
|
132 <help>
|
|
|
133 <![CDATA[
|
|
|
134 What it does
|
|
|
135 -------------
|
|
|
136
|
|
|
137 This tool generates four files containing reactions, rules, reaction bounds and medium composition respectively, starting from a custom model in JSON or XML format.
|
|
|
138 Reactions and rules can be used as inputs for the RAS and RPS generator tools.
|
|
|
139
|
|
|
140 Accepted files:
|
|
381
|
141 - A model: JSON, XML, MAT or YAML (.yml) file reporting reactions and rules contained in the model. Supported compressed formats: .zip, .gz and .bz2. Filename must follow the pattern: {model_name}.{extension}.[zip|gz|bz2]
|
|
93
|
142
|
|
|
143 Output:
|
|
|
144 -------------
|
|
|
145
|
|
|
146 The tool generates:
|
|
|
147 - rules: reporting the rules for each reaction in the custom model given. Format: csv (tab separated).
|
|
|
148 - reactions: reporting the reactions in the custom model given. Format: csv (tab separated).
|
|
|
149 - reaction bounds: reporting the lower and upper bounds of each model reaction. Format: csv (tab separated).
|
|
|
150 - medium composition: reporting the list of exchange/transport reactions. Format: csv (tab separated).
|
|
|
151 - a log file (.txt).
|
|
|
152 ]]>
|
|
|
153 </help>
|
|
|
154 <expand macro="citations" />
|
|
|
155 </tool> |