From 431bcfed721d9ec81400f48dc6b8009be27474e1 Mon Sep 17 00:00:00 2001 From: Henning Redestig Date: Thu, 4 May 2017 12:49:50 +0200 Subject: [PATCH] doc: fix formatting in notebook --- documentation_builder/gapfilling.ipynb | 42 ++++++++++++++++++++------ 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/documentation_builder/gapfilling.ipynb b/documentation_builder/gapfilling.ipynb index 2af8bfedf..a149f00df 100644 --- a/documentation_builder/gapfilling.ipynb +++ b/documentation_builder/gapfilling.ipynb @@ -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." ] }, {