|
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
|
|
|
7 <requirements>
|
|
|
8 <requirement type="package" version="1.24.4">numpy</requirement>
|
|
|
9 <requirement type="package" version="2.0.3">pandas</requirement>
|
|
|
10 <requirement type="package" version="0.29.0">cobra</requirement>
|
|
|
11 <requirement type="package" version="5.2.2">lxml</requirement>
|
|
|
12 </requirements>
|
|
|
13
|
|
|
14 <command detect_errors="exit_code">
|
|
|
15 <![CDATA[
|
|
|
16 python $__tool_directory__/custom_data_generator.py
|
|
354
|
17 --tool_dir $__tool_directory__
|
|
345
|
18 --medium_selector $cond_medium.medium_selector
|
|
|
19 --output_format $output_format
|
|
|
20 #if $cond_model.model_selector == 'Custom_model'
|
|
|
21 --input $cond_model.input
|
|
|
22 --name $cond_model.name
|
|
|
23 #else
|
|
|
24 --model $cond_model.model_selector
|
|
|
25 --name $cond_model.model_selector
|
|
|
26 #end if
|
|
|
27 #if $cond_medium.medium_selector == 'Custom'
|
|
|
28 --medium $cond_medium.medium
|
|
|
29 #end if
|
|
93
|
30 --out_log $log
|
|
366
|
31 --out_tabular $out_tabular
|
|
|
32 --out_xlsx $out_xlsx
|
|
362
|
33
|
|
93
|
34 ]]>
|
|
|
35 </command>
|
|
|
36 <inputs>
|
|
345
|
37 <!-- modello -->
|
|
|
38 <conditional name="cond_model">
|
|
|
39 <expand macro="options_model"/>
|
|
|
40 <when value="Custom_model">
|
|
|
41 <param name="input" argument="--input" type="data" format="json,xml" label="Custom model file:" />
|
|
|
42 <param name="name" argument="--name" type="text" label="Model's name:" value="CustomModel" help="Default: CustomModel. Do not use spaces or special symbols." />
|
|
|
43 </when>
|
|
|
44 </conditional>
|
|
|
45
|
|
|
46 <!-- formato output -->
|
|
|
47 <param name="output_format" argument="--output_format" type="select" label="Output format:">
|
|
|
48 <option value="tabular" selected="true">CSV (tabular)</option>
|
|
|
49 <option value="xlsx">Excel (.xlsx)</option>
|
|
|
50 </param>
|
|
|
51
|
|
|
52 <!-- medium -->
|
|
|
53 <conditional name="cond_medium">
|
|
|
54 <expand macro="options_ras_to_bounds_medium"/>
|
|
|
55 <when value="Custom">
|
|
|
56 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
57 </when>
|
|
|
58 </conditional>
|
|
93
|
59 </inputs>
|
|
|
60
|
|
|
61 <outputs>
|
|
345
|
62 <data name="log" format="txt" label="CustomDataGenerator - Log" />
|
|
368
|
63 <!-- Output condizionali -->
|
|
|
64 <data name="out_tabular" format="tabular" label="${cond_model.model_selector}_data_tabular"
|
|
|
65 filter="output_format == 'tabular'"/>
|
|
|
66 <data name="out_xlsx" format="xlsx" label="${cond_model.model_selector}_data_xlsx"
|
|
|
67 filter="output_format == 'xlsx'"/>
|
|
93
|
68 </outputs>
|
|
|
69
|
|
358
|
70
|
|
362
|
71
|
|
93
|
72 <help>
|
|
|
73 <![CDATA[
|
|
|
74 What it does
|
|
|
75 -------------
|
|
|
76
|
|
|
77 This tool generates four files containing reactions, rules, reaction bounds and medium composition respectively, starting from a custom model in JSON or XML format.
|
|
|
78 Reactions and rules can be used as inputs for the RAS and RPS generator tools.
|
|
|
79
|
|
|
80 Accepted files:
|
|
345
|
81 - A model: JSON or XML file reporting reactions and rules contained in the model. Supported compressed formats: .zip, .gz and .bz2 - Filename must end with .json.zip (.xml.zip), .json.gz (.xml.gz) or .json.bz2 (.xml.bz2) for JSON (XML) files.
|
|
93
|
82
|
|
|
83
|
|
|
84 Output:
|
|
|
85 -------------
|
|
|
86
|
|
|
87 The tool generates:
|
|
|
88 - rules: reporting the rules for each reaction in the custom model given. Format: csv (tab separated).
|
|
|
89 - reactions: reporting the reactions in the custom model given. Format: csv (tab separated).
|
|
|
90 - reaction bounds: reporting the lower and upper bounds of each model reaction. Format: csv (tab separated).
|
|
|
91 - medium composition: reporting the list of exchange/transport reactions. Format: csv (tab separated).
|
|
|
92 - a log file (.txt).
|
|
|
93 ]]>
|
|
|
94 </help>
|
|
|
95 <expand macro="citations" />
|
|
|
96 </tool> |