|
542
|
1 # Export Metabolic Model
|
|
|
2
|
|
547
|
3 Convert tabular data into COBRA metabolic model.
|
|
542
|
4
|
|
|
5 ## Overview
|
|
|
6
|
|
547
|
7 Export Metabolic Model converts structured tabular data (CSV/TSV) into functional COBRA models in SBML, JSON, MATLAB, or YAML formats.
|
|
|
8
|
|
|
9 **Input**: Tabular model data (CSV/TSV)
|
|
|
10 **Output**: SBML/JSON/MAT/YAML model files
|
|
|
11
|
|
|
12 ## Galaxy Interface
|
|
542
|
13
|
|
547
|
14 In Galaxy: **COBRAxy → Export Metabolic Model**
|
|
542
|
15
|
|
547
|
16 1. Upload tabular model data file
|
|
|
17 2. Select output format (SBML/JSON/MAT/YAML)
|
|
|
18 3. Click **Run tool**
|
|
|
19
|
|
|
20 ## Command-line console
|
|
542
|
21
|
|
|
22 ```bash
|
|
547
|
23 exportMetabolicModel \
|
|
|
24 --input model_data.csv \
|
|
|
25 --format sbml \
|
|
|
26 --output custom_model.xml \
|
|
|
27 --out_log conversion.log
|
|
542
|
28 ```
|
|
|
29
|
|
|
30 ## Parameters
|
|
|
31
|
|
|
32 | Parameter | Flag | Description |
|
|
|
33 |-----------|------|-------------|
|
|
|
34 | Input File | `--input` | Tabular file (CSV/TSV) with model data |
|
|
547
|
35 | Output Format | `--format` | Model format: sbml, json, mat, yaml |
|
|
542
|
36 | Output File | `--output` | Output model file path |
|
|
547
|
37 | Output Log | `--out_log` | Log file |
|
|
542
|
38
|
|
|
39 ## Input Format
|
|
|
40
|
|
547
|
41 Required columns:
|
|
542
|
42
|
|
|
43 ```csv
|
|
547
|
44 ReactionID,Formula,GPR,lower_bound,upper_bound,ObjectiveCoefficient,InMedium,TranslationIssues
|
|
|
45 R00001,A + B -> C + D,GENE1 or GENE2,-1000.0,1000.0,0.0,FALSE,
|
|
|
46 EX_glc_e,glc_e <->,-,-1000.0,1000.0,0.0,TRUE,
|
|
542
|
47 ```
|
|
|
48
|
|
547
|
49 **File Format Notes:**
|
|
|
50 - Use **comma-separated** (CSV) or **tab-separated** (TSV)
|
|
|
51 - First row must contain column headers
|
|
|
52 - Required columns: ReactionID, Formula, lower_bound, upper_bound
|
|
|
53 - Optional columns: GPR, ObjectiveCoefficient, InMedium, Pathway_1, Pathway_2
|
|
542
|
54
|
|
|
55 ## Reaction Formula Syntax
|
|
|
56
|
|
|
57 ```
|
|
547
|
58 # Irreversible
|
|
542
|
59 A + B -> C + D
|
|
|
60
|
|
547
|
61 # Reversible
|
|
542
|
62 A + B <-> C + D
|
|
|
63
|
|
547
|
64 # With stoichiometry
|
|
542
|
65 2 A + 3 B -> 1 C + 4 D
|
|
|
66 ```
|
|
|
67
|
|
|
68 ## GPR Rule Syntax
|
|
|
69
|
|
|
70 ```
|
|
|
71 # Single gene
|
|
|
72 GENE1
|
|
|
73
|
|
547
|
74 # Alternative genes (OR)
|
|
|
75 GENE1 or GENE2
|
|
542
|
76
|
|
547
|
77 # Required complex (AND)
|
|
542
|
78 GENE1 and GENE2
|
|
|
79
|
|
547
|
80 # Nested logic
|
|
|
81 (GENE1 and GENE2) or GENE3
|
|
542
|
82 ```
|
|
|
83
|
|
547
|
84 ## Output Formats
|
|
|
85
|
|
|
86 - **SBML**: XML standard, maximum compatibility
|
|
|
87 - **JSON**: COBRApy native format
|
|
|
88 - **MATLAB**: COBRA Toolbox compatibility
|
|
|
89 - **YAML**: Human-readable format
|
|
|
90
|
|
542
|
91 ## Examples
|
|
|
92
|
|
547
|
93 ### Basic Export
|
|
542
|
94
|
|
|
95 ```bash
|
|
547
|
96 exportMetabolicModel --input model.csv \
|
|
542
|
97 --format sbml \
|
|
547
|
98 --output model.xml \
|
|
|
99 --out_log conversion.log
|
|
542
|
100 ```
|
|
|
101
|
|
|
102 ## Troubleshooting
|
|
|
103
|
|
547
|
104 | Error | Solution |
|
|
|
105 |-------|----------|
|
|
|
106 | "Formula parsing failed" | Check reaction formula syntax |
|
|
|
107 | "Model infeasible" | Review bounds and exchange reactions |
|
|
542
|
108
|
|
|
109 ## See Also
|
|
|
110
|
|
547
|
111 - [Import Metabolic Model](reference/import-metabolic-model)
|
|
|
112 - [RAS to Bounds](tools/ras-to-bounds)
|
|
|
113 - [Flux Simulation](tools/flux-simulation)
|