|
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>
|
|
371
|
12 <requirement type="package" >openpyxl</requirement>
|
|
93
|
13 </requirements>
|
|
|
14
|
|
|
15 <command detect_errors="exit_code">
|
|
|
16 <![CDATA[
|
|
|
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
|
|
376
|
32 --out_tabular $out_tabular
|
|
|
33 --out_xlsx $out_xlsx
|
|
362
|
34
|
|
93
|
35 ]]>
|
|
|
36 </command>
|
|
|
37 <inputs>
|
|
345
|
38 <!-- modello -->
|
|
|
39 <conditional name="cond_model">
|
|
|
40 <expand macro="options_model"/>
|
|
|
41 <when value="Custom_model">
|
|
|
42 <param name="input" argument="--input" type="data" format="json,xml" label="Custom model file:" />
|
|
|
43 <param name="name" argument="--name" type="text" label="Model's name:" value="CustomModel" help="Default: CustomModel. Do not use spaces or special symbols." />
|
|
|
44 </when>
|
|
|
45 </conditional>
|
|
|
46
|
|
|
47 <!-- formato output -->
|
|
|
48 <param name="output_format" argument="--output_format" type="select" label="Output format:">
|
|
|
49 <option value="tabular" selected="true">CSV (tabular)</option>
|
|
|
50 <option value="xlsx">Excel (.xlsx)</option>
|
|
|
51 </param>
|
|
|
52
|
|
|
53 <!-- medium -->
|
|
|
54 <conditional name="cond_medium">
|
|
|
55 <expand macro="options_ras_to_bounds_medium"/>
|
|
|
56 <when value="Custom">
|
|
|
57 <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
|
|
|
58 </when>
|
|
|
59 </conditional>
|
|
93
|
60 </inputs>
|
|
|
61
|
|
|
62 <outputs>
|
|
345
|
63 <data name="log" format="txt" label="CustomDataGenerator - Log" />
|
|
376
|
64
|
|
|
65 <data name="out_tabular" format="tabular"
|
|
|
66 label="${cond_model.model_selector}_data_tabular"
|
|
|
67 filter="output_format == 'tabular'"/>
|
|
|
68
|
|
|
69 <data name="out_xlsx" format="xlsx"
|
|
|
70 label="${cond_model.model_selector}_data_xlsx"
|
|
|
71 filter="output_format == 'xlsx'"/>
|
|
93
|
72 </outputs>
|
|
|
73
|
|
358
|
74
|
|
362
|
75
|
|
93
|
76 <help>
|
|
|
77 <![CDATA[
|
|
|
78 What it does
|
|
|
79 -------------
|
|
|
80
|
|
|
81 This tool generates four files containing reactions, rules, reaction bounds and medium composition respectively, starting from a custom model in JSON or XML format.
|
|
|
82 Reactions and rules can be used as inputs for the RAS and RPS generator tools.
|
|
|
83
|
|
|
84 Accepted files:
|
|
345
|
85 - 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
|
86
|
|
|
87
|
|
|
88 Output:
|
|
|
89 -------------
|
|
|
90
|
|
|
91 The tool generates:
|
|
|
92 - rules: reporting the rules for each reaction in the custom model given. Format: csv (tab separated).
|
|
|
93 - reactions: reporting the reactions in the custom model given. Format: csv (tab separated).
|
|
|
94 - reaction bounds: reporting the lower and upper bounds of each model reaction. Format: csv (tab separated).
|
|
|
95 - medium composition: reporting the list of exchange/transport reactions. Format: csv (tab separated).
|
|
|
96 - a log file (.txt).
|
|
|
97 ]]>
|
|
|
98 </help>
|
|
|
99 <expand macro="citations" />
|
|
|
100 </tool> |