|
540
|
1 <tool id="exportMetabolicModel" name="Export Metabolic Model" version="1.0.0">
|
|
|
2 <description>Export a tabular model to file format (SBML, JSON, MAT or YAML)</description>
|
|
|
3
|
|
|
4 <!-- Python dependencies required for COBRApy -->
|
|
|
5 <requirements>
|
|
|
6 <requirement type="package" version="0.29.0">cobra</requirement>
|
|
|
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 </requirements>
|
|
|
11
|
|
|
12 <!-- Import shared macros if available -->
|
|
|
13 <macros>
|
|
|
14 <import>marea_macros.xml</import>
|
|
|
15 </macros>
|
|
|
16
|
|
|
17 <!-- Command to run the Python script -->
|
|
|
18 <command detect_errors="exit_code"><![CDATA[
|
|
|
19 python $__tool_directory__/exportMetabolicModel.py
|
|
|
20 --tool_dir $__tool_directory__
|
|
|
21 --input $input
|
|
|
22 --format $format
|
|
|
23 --output $output
|
|
|
24 --out_log $log
|
|
|
25 ]]></command>
|
|
|
26
|
|
|
27 <!-- Tool inputs -->
|
|
|
28 <inputs>
|
|
|
29 <param name="input" type="data" format="tabular,csv,tsv" label="Model tabular:"/>
|
|
|
30 <param name="model_name" type="text" value="Converted_Model" label="Output model name:" help="Name for the created COBRA model"/>
|
|
|
31 <param name="format" type="select" label="Output format">
|
|
|
32 <option value="sbml" selected="true">SBML (.xml)</option>
|
|
|
33 <option value="json">JSON (.json)</option>
|
|
|
34 <option value="mat">MATLAB (.mat)</option>
|
|
|
35 <option value="yaml">YAML (.yml)</option>
|
|
|
36 </param>
|
|
|
37 </inputs>
|
|
|
38
|
|
|
39 <!-- Tool outputs -->
|
|
|
40 <outputs>
|
|
542
|
41 <data name="log" format="txt" label="Export Metabolic Model - Log" />
|
|
540
|
42 <data name="output" format="xml" label="${model_name}.${format}">
|
|
|
43 <change_format>
|
|
|
44 <when input="format" value="sbml" format="xml"/>
|
|
|
45 <when input="format" value="json" format="json"/>
|
|
|
46 <when input="format" value="mat" format="mat"/>
|
|
|
47 <when input="format" value="yaml" format="yaml"/>
|
|
|
48 </change_format>
|
|
|
49 </data>
|
|
|
50 </outputs>
|
|
|
51
|
|
|
52 <!-- Help section -->
|
|
|
53 <help><![CDATA[
|
|
|
54 This tool exports a tabular dataset into a standard metabolic model file formats using COBRApy.
|
|
|
55
|
|
|
56 **Input**
|
|
|
57 - A tabular/CSV/TSV file describing the metabolic properties of the model (reactions, metabolites, and genes), as generated by the Import Metabolic Model tool.
|
|
|
58
|
|
|
59 The possible columns are:
|
|
|
60 - ReactionID: unique identifier of the reactions
|
|
|
61 - Formula: chemical equation showing the metabolites involved in the reaction and their stoichiometric coefficients.
|
|
|
62 - GPR: gene-protein-reaction association, expressed as a logical rule describing how genes contribute to catalyzing the reaction.
|
|
|
63 - lower bound: minimum allowable flux value for the reaction.
|
|
|
64 - upper bound: maximum allowable flux value for the reaction.
|
|
|
65 - Objective coefficient: coefficient used in the objective function (e.g., for pFBA or FVA analyses).
|
|
|
66 - Pathway_1,Pathway_2,etc.: possible pathways in which the reaction is involved.
|
|
|
67 - InMedium: TRUE if the reaction represents nutrient uptake from the medium, FALSE otherwise.
|
|
|
68
|
|
|
69 Columns ReactionID and Formula are mandatory.
|
|
|
70
|
|
|
71 **Output**
|
|
|
72 - A COBRA model in the chosen format:
|
|
|
73 - SBML (.xml)
|
|
|
74 - JSON (.json)
|
|
|
75 - MATLAB (.mat)
|
|
|
76 - YAML (.yml)
|
|
|
77
|
|
|
78 **Notes**
|
|
|
79 - The exact table structure (columns required) depends on how you want to encode reactions and metabolites.
|
|
|
80 - You can extend the Python script to parse specific column formats.
|
|
|
81 ]]></help>
|
|
|
82 </tool>
|