|
491
|
1 <tool id="tabular2MetabolicModel" name="tabular2MetabolicModel" version="1.0.0">
|
|
|
2 <description>Convert a tabular dataset to a COBRA model</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__/tabular2MetabolicModel.py
|
|
|
20 --tool_dir $__tool_directory__
|
|
|
21 --input $input
|
|
498
|
22 --format $format
|
|
491
|
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="Input table"/>
|
|
498
|
30 <param name="model_name" type="text" value="Converted_Model" label="Model name" help="Name for the created COBRA model"/>
|
|
491
|
31 <param name="format" type="select" label="Output COBRA model 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>
|
|
498
|
41 <data name="log" format="txt" label="Tabular to Model Conversion - Log" />
|
|
|
42 <data name="output" format="xml" label="${model_name}.${format}">
|
|
491
|
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 converts a tabular dataset into a COBRA model using COBRApy.
|
|
|
55
|
|
|
56 **Input**
|
|
|
57 - A tabular/CSV/TSV file describing reactions, metabolites, or stoichiometry.
|
|
|
58
|
|
|
59 **Output**
|
|
|
60 - A COBRA model in the chosen format:
|
|
|
61 - SBML (.xml)
|
|
|
62 - JSON (.json)
|
|
|
63 - MATLAB (.mat)
|
|
|
64 - YAML (.yml)
|
|
|
65
|
|
|
66 **Notes**
|
|
|
67 - The exact table structure (columns required) depends on how you want to encode reactions and metabolites.
|
|
|
68 - You can extend the Python script to parse specific column formats.
|
|
|
69 ]]></help>
|
|
|
70 </tool>
|