Skip to content

Commit

Permalink
doc: fix formatting in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
hredestig committed May 4, 2017
1 parent 30860da commit 431bcfe
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions documentation_builder/gapfilling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,45 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"# Gapfillling\n",
"\n",
"Model gap filling is the task of figuring out which reactions have to be added to a model to make it feasible. Several such algorithms have been reported e.g. [Kumar et al. 2009](http://dx.doi.org/10.1371/journal.pcbi.1000308) and [Reed et al. 2006](http://www.pnas.org/content/103/46/17480.short). Cobrapy has a gap filling implementation that is very similar to that of Reed et al. where we use a mixed-integer linear program to figure out the smallest number of reactions that need to be added for a user-defined collection of reactions, i.e. a universal model. Briefly, the problem that we try to solve is\n",
"$$\\textrm{minimize}: \\sum_i c_i * z_i$$\n",
"subject to\n",
"Model gap filling is the task of figuring out which reactions have to be added to a model to make it feasible. Several such algorithms have been reported e.g. [Kumar et al. 2009](http://dx.doi.org/10.1371/journal.pcbi.1000308) and [Reed et al. 2006](http://www.pnas.org/content/103/46/17480.short). Cobrapy has a gap filling implementation that is very similar to that of Reed et al. where we use a mixed-integer linear program to figure out the smallest number of reactions that need to be added for a user-defined collection of reactions, i.e. a universal model. Briefly, the problem that we try to solve is"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Minimize: $$\\sum_i c_i * z_i$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"subject to"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$Sv = 0$$\n",
"$$v^\\star \\geq t$$\n",
"$$l_i\\leq v_i \\leq u_i$$\n",
"$$v_i = 0 \\textrm{ if } z_i = 0$$\n",
"Where $l_i$, $u_i$ are lower and upper bounds for reaction $i$ and $z_i$ is an indicator variable that is zero if the reaction is not used and otherwise 1, $c_i$ is a user-defined cost associated with using the $i$th reaction, $v^\\star$ is the flux of the objective and $t$ a lower bound for that objective. To demonstrate, let's take a model and remove some essential reactions from it."
"$$v_i = 0 \\textrm{ if } z_i = 0$$"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Where *l*, *u* are lower and upper bounds for reaction *i* and *z* is an indicator variable that is zero if the reaction is not used and otherwise 1, *c* is a user-defined cost associated with using the *i*th reaction, $v^\\star$ is the flux of the objective and *t* a lower bound for that objective. To demonstrate, let's take a model and remove some essential reactions from it."
]
},
{
Expand Down

0 comments on commit 431bcfe

Please sign in to comment.