Skip to content

Commit b75e260

Browse files
committed
build model examples
1 parent 2f0c1e6 commit b75e260

File tree

1 file changed

+118
-6
lines changed

1 file changed

+118
-6
lines changed

examples/build_metabolic_model.ipynb

+118-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"cell_type": "code",
60-
"execution_count": 6,
60+
"execution_count": 5,
6161
"metadata": {},
6262
"outputs": [],
6363
"source": [
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 7,
69+
"execution_count": 6,
7070
"metadata": {},
7171
"outputs": [
7272
{
@@ -79,7 +79,7 @@
7979
" <td>ecoli.core</td>\n",
8080
" </tr><tr>\n",
8181
" <td><strong>Memory address</strong></td>\n",
82-
" <td>0x07fe3b14c4f50</td>\n",
82+
" <td>0x07faf31a00190</td>\n",
8383
" </tr><tr>\n",
8484
" <td><strong>Number of metabolites</strong></td>\n",
8585
" <td>190</td>\n",
@@ -99,10 +99,10 @@
9999
" </table>"
100100
],
101101
"text/plain": [
102-
"<Model ecoli.core at 0x7fe3b14c4f50>"
102+
"<Model ecoli.core at 0x7faf31a00190>"
103103
]
104104
},
105-
"execution_count": 7,
105+
"execution_count": 6,
106106
"metadata": {},
107107
"output_type": "execute_result"
108108
}
@@ -226,7 +226,7 @@
226226
"</table>"
227227
],
228228
"text/plain": [
229-
"<cobra.summary.model_summary.ModelSummary at 0x7fa682e4f7d0>"
229+
"<cobra.summary.model_summary.ModelSummary at 0x7faf4344bd90>"
230230
]
231231
},
232232
"execution_count": 9,
@@ -238,6 +238,118 @@
238238
"model.summary()"
239239
]
240240
},
241+
{
242+
"cell_type": "code",
243+
"execution_count": 17,
244+
"metadata": {},
245+
"outputs": [
246+
{
247+
"data": {
248+
"text/html": [
249+
"<h3>Objective</h3><p>1.0 bio1 = 0.1229368143626848</p><h4>Uptake</h4><table border=\"1\" class=\"dataframe\">\n",
250+
" <thead>\n",
251+
" <tr style=\"text-align: right;\">\n",
252+
" <th>Metabolite</th>\n",
253+
" <th>Reaction</th>\n",
254+
" <th>Flux</th>\n",
255+
" <th>C-Number</th>\n",
256+
" <th>C-Flux</th>\n",
257+
" </tr>\n",
258+
" </thead>\n",
259+
" <tbody>\n",
260+
" <tr>\n",
261+
" <td>cpd00007_e0</td>\n",
262+
" <td>EX_cpd00007_e0</td>\n",
263+
" <td>1.371</td>\n",
264+
" <td>0</td>\n",
265+
" <td>0.00%</td>\n",
266+
" </tr>\n",
267+
" <tr>\n",
268+
" <td>cpd00009_e0</td>\n",
269+
" <td>EX_cpd00009_e0</td>\n",
270+
" <td>0.5182</td>\n",
271+
" <td>0</td>\n",
272+
" <td>0.00%</td>\n",
273+
" </tr>\n",
274+
" <tr>\n",
275+
" <td>cpd00027_e0</td>\n",
276+
" <td>EX_cpd00027_e0</td>\n",
277+
" <td>1</td>\n",
278+
" <td>6</td>\n",
279+
" <td>100.00%</td>\n",
280+
" </tr>\n",
281+
" </tbody>\n",
282+
"</table><h4>Secretion</h4><table border=\"1\" class=\"dataframe\">\n",
283+
" <thead>\n",
284+
" <tr style=\"text-align: right;\">\n",
285+
" <th>Metabolite</th>\n",
286+
" <th>Reaction</th>\n",
287+
" <th>Flux</th>\n",
288+
" <th>C-Number</th>\n",
289+
" <th>C-Flux</th>\n",
290+
" </tr>\n",
291+
" </thead>\n",
292+
" <tbody>\n",
293+
" <tr>\n",
294+
" <td>cpd00001_e0</td>\n",
295+
" <td>EX_cpd00001_e0</td>\n",
296+
" <td>-2.812</td>\n",
297+
" <td>0</td>\n",
298+
" <td>0.00%</td>\n",
299+
" </tr>\n",
300+
" <tr>\n",
301+
" <td>cpd00011_e0</td>\n",
302+
" <td>EX_cpd00011_e0</td>\n",
303+
" <td>-0.5044</td>\n",
304+
" <td>1</td>\n",
305+
" <td>100.00%</td>\n",
306+
" </tr>\n",
307+
" <tr>\n",
308+
" <td>cpd00067_e0</td>\n",
309+
" <td>EX_cpd00067_e0</td>\n",
310+
" <td>-1.749</td>\n",
311+
" <td>0</td>\n",
312+
" <td>0.00%</td>\n",
313+
" </tr>\n",
314+
" <tr>\n",
315+
" <td>cpd11416_c0</td>\n",
316+
" <td>SK_cpd11416_c0</td>\n",
317+
" <td>-0.1229</td>\n",
318+
" <td>0</td>\n",
319+
" <td>0.00%</td>\n",
320+
" </tr>\n",
321+
" </tbody>\n",
322+
"</table>"
323+
],
324+
"text/plain": [
325+
"<cobra.summary.model_summary.ModelSummary at 0x7faf31083d10>"
326+
]
327+
},
328+
"execution_count": 17,
329+
"metadata": {},
330+
"output_type": "execute_result"
331+
}
332+
],
333+
"source": [
334+
"model.objective = 'bio1'\n",
335+
"model.medium = {\n",
336+
" 'EX_cpd00067_e0': 1000,\n",
337+
" 'EX_cpd00027_e0': 1,\n",
338+
" 'EX_cpd00007_e0': 1000,\n",
339+
" 'EX_cpd00001_e0': 1000,\n",
340+
" 'EX_cpd00009_e0': 1000,\n",
341+
" \n",
342+
"}\n",
343+
"model.summary()"
344+
]
345+
},
346+
{
347+
"cell_type": "code",
348+
"execution_count": null,
349+
"metadata": {},
350+
"outputs": [],
351+
"source": []
352+
},
241353
{
242354
"cell_type": "code",
243355
"execution_count": 10,

0 commit comments

Comments
 (0)