annotate COBRAxy/src/importMetabolicModel.xml @ 550:4cf00f21f609 draft default tip

Uploaded
author francesco_lapi
date Mon, 03 Nov 2025 14:49:49 +0000
parents fa93040a75af
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
1 <tool id="importMetabolicModel" name="Import Metabolic Model" version="2.0.0">
541
fa93040a75af Uploaded
francesco_lapi
parents: 540
diff changeset
2 <description>Import a tabular model from file format (SBML, JSON, MAT or YAML)</description>
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
3
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
4 <requirements>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
5 <requirement type="package" version="1.24.4">numpy</requirement>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
6 <requirement type="package" version="2.0.3">pandas</requirement>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
7 <requirement type="package" version="0.29.0">cobra</requirement>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
8 <requirement type="package" version="5.2.2">lxml</requirement>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
9 </requirements>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
10
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
11 <macros>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
12 <import>marea_macros.xml</import>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
13 </macros>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
14
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
15 <command detect_errors="exit_code">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
16 <![CDATA[
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
17 python $__tool_directory__/importMetabolicModel.py
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
18 --tool_dir $__tool_directory__
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
19 --medium_selector $cond_model.cond_medium.medium_selector
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
20 #if $cond_model.model_selector == 'Custom_model'
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
21 --input $cond_model.input
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
22 --name $cond_model.input.element_identifier
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
23 --out_tabular $out_tabular_custom
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
24 #elif $cond_model.model_selector == 'ENGRO2'
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
25 --model $cond_model.model_selector
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
26 --name $cond_model.model_selector
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
27 --out_tabular $out_tabular_engro2
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
28 #else
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
29 --model $cond_model.model_selector
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
30 --name $cond_model.model_selector
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
31 --out_tabular $out_tabular_recon
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
32 #end if
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
33 --gene_format $cond_model.gene_format
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
34 --out_log $log
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
35 ]]>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
36 </command>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
37 <inputs>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
38 <conditional name="cond_model">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
39 <expand macro="options_model"/>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
40
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
41 <!-- ENGRO2 -->
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
42 <when value="ENGRO2">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
43
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
44 <conditional name="cond_medium">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
45 <expand macro="options_ras_to_bounds_medium"/>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
46 </conditional>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
47
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
48 <param name="gene_format" argument="--gene_format" type="select" label="Gene nomenclature format:">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
49 <option value="Default" selected="true">Keep original gene nomenclature (HGNC Symbol)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
50 <option value="ENSG">ENSG (Ensembl Gene ID)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
51 <option value="HGNC_ID">HGNC ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
52 <option value="entrez_id">Entrez Gene ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
53 </param>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
54 </when>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
55
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
56 <!-- Recon -->
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
57 <when value="Recon">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
58
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
59 <conditional name="cond_medium">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
60 <param name="medium_selector" argument="--medium_selector" type="select" label="Medium">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
61 <option value="Default" selected="true">Default (Recon built-in medium)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
62 </param>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
63 <when value="Default">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
64 <!-- Nessun parametro aggiuntivo necessario -->
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
65 </when>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
66 </conditional>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
67 <param name="gene_format" argument="--gene_format" type="select" label="Gene nomenclature format:">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
68 <option value="Default" selected="true">Keep original gene nomenclature (HGNC Symbol)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
69 <option value="ENSG">ENSG (Ensembl Gene ID)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
70 <option value="HGNC_ID">HGNC ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
71 <option value="entrez_id">Entrez Gene ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
72 </param>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
73 </when>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
74
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
75 <!-- Custom model -->
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
76 <when value="Custom_model">
550
4cf00f21f609 Uploaded
francesco_lapi
parents: 541
diff changeset
77 <param name="input" argument="--input" type="data" format="sbml,json,mat,yaml" label="Custom model file:" />
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
78 <conditional name="cond_medium">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
79 <param name="medium_selector" argument="--medium_selector" type="select" label="Medium">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
80 <option value="Default" selected="true">Default (custom model medium)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
81 </param>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
82 <when value="Default">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
83 <!-- Nessun parametro aggiuntivo necessario -->
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
84 </when>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
85 </conditional>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
86 <param name="gene_format" argument="--gene_format" type="select" label="Gene nomenclature format:">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
87 <option value="Default" selected="true">Keep original gene nomenclature</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
88 <option value="HGNC_symbol">HGNC Symbol</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
89 <option value="ENSG">ENSG (Ensembl Gene ID)</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
90 <option value="HGNC_ID">HGNC ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
91 <option value="entrez_id">Entrez Gene ID</option>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
92 </param>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
93 </when>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
94 </conditional>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
95
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
96 </inputs>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
97
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
98 <outputs>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
99 <data name="log" format="txt" label="MetabolicModelSetting - Log" />
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
100
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
101 <data name="out_tabular_engro2" format="tabular" label="ENGRO2_model_tabular">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
102 <filter>cond_model['model_selector'] == 'ENGRO2'</filter>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
103 </data>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
104
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
105 <data name="out_tabular_recon" format="tabular" label="Recon_model_tabular">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
106 <filter>cond_model['model_selector'] == 'Recon'</filter>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
107 </data>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
108
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
109 <data name="out_tabular_custom" format="tabular" label="${cond_model.input.element_identifier}_model_tabular">
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
110 <filter>cond_model['model_selector'] == 'Custom_model'</filter>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
111 </data>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
112 </outputs>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
113
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
114 <help>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
115 <![CDATA[
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
116 Overview
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
117 -------------
541
fa93040a75af Uploaded
francesco_lapi
parents: 540
diff changeset
118 This tool generates a tabular file (.tabular) containing the main information of the metabolic model, starting either from a built-in model or a user-provided model file.
fa93040a75af Uploaded
francesco_lapi
parents: 540
diff changeset
119
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
120 For built-in models, users can select among different nutrient-informed variants (i.e., different media composition) and gene nomenclature formats.
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
121
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
122 The generated tabular file can be used as input for tools Expression2RAS, Expression2RPS, RAS2Bounds, Flux Simulation and Export Metabolic Model - within the COBRAxy suite.
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
123
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
124 Input parameters:
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
125 -------------
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
126
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
127 The tool has three input parameters:
541
fa93040a75af Uploaded
francesco_lapi
parents: 540
diff changeset
128 - Model: a file containing metabolic information (reactions, metabolites, genes). Ready-to-use models are ENGRO2 and Recon3D. The user can also upload a custom model (see TIP 1).
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
129 - Medium: choose a growth medium typically used for cell culture (see TIP 2 & 3).
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
130 - Gene nomenclature format: use the original GPR gene names or translate them into another nomenclature.
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
131
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
132 Output files:
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
133 -------------
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
134
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
135 The tool generates:
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
136 - one tabular file (.tabular) containing reaction IDs, reaction formula, GPR rules, reaction bounds, objective function coefficients, pathways in which the reaction is involved and a flag indicating whether the reaction is an exchange reaction (i.e., related to the growth medium).
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
137 - a log file (.txt).
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
138
550
4cf00f21f609 Uploaded
francesco_lapi
parents: 541
diff changeset
139 **TIP 1**: Different input files can be used as the input model. The possible formats are SBML, JSON, MAT or YAML (.yml).
540
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
140 Supported compressed formats: .zip, .gz and .bz2. Filename must follow the pattern: {model_name}.{extension}.[zip|gz|bz2]
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
141 More detail can be found at https://cobrapy.readthedocs.io/en/latest/io.html
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
142
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
143 **TIP 2**: for pre-existing models ENGRO2 and RECON3D, the user can select the default built-in medium or one of the possible growth medium typically used for cell line cultures.
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
144 In case no specific information is available, it is possible to set an "OPEN" medium in which all the nutrients are available in unlimited quantity.
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
145
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
146 **TIP 3:** Medium composition can be derived from the tabular file. Exchange reactions with `InMedium = TRUE` are included. Nutrient values correspond to the lower bound (e.g., EX_Glc_D_e lower bound -10 → nutrient value 10).
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
147 More info: [COBRApy Media](https://cobrapy-cdiener.readthedocs.io/en/latest/media.html)
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
148
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
149 ]]>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
150 </help>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
151 <expand macro="citations" />
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
152
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
153 </tool>
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
154
7d5b35c715e8 Uploaded
francesco_lapi
parents:
diff changeset
155
550
4cf00f21f609 Uploaded
francesco_lapi
parents: 541
diff changeset
156
4cf00f21f609 Uploaded
francesco_lapi
parents: 541
diff changeset
157