Home | About | Journals | Submit | Contact Us | Français |

**|**BMC Syst Biol**|**v.6; 2012**|**PMC3311073

Formats

Article sections

- Abstract
- Background
- Methods
- Definitions
- Results and Discussion
- Conclusions
- Availability and requirements
- Authors' contributions
- Appendix A Reduction proofs for the shortest hyperpath problem and the minimal constrained hyperpath problem
- Appendix B Hard instances of minimal constrained hyperpath problem
- Supplementary Material
- References

Authors

Related links

BMC Syst Biol. 2012; 6: 10.

Published online 2012 February 6. doi: 10.1186/1752-0509-6-10

PMCID: PMC3311073

Pablo Carbonell: moc.liamg@bracolbap; Davide Fichera: rf.eloponeg.bssi@arehcifd; Shashi B Pandit: moc.liamg@pbihsahs; Jean-Loup Faulon: moc.liamg@noluafj

Received 2011 August 2; Accepted 2012 February 6.

Copyright ©2012 Carbonell et al.; licensee BioMed Central Ltd.

This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

This article has been cited by other articles in PMC.

We consider the possibility of engineering metabolic pathways in a chassis organism in order to synthesize novel target compounds that are heterologous to the chassis. For this purpose, we model metabolic networks through hypergraphs where reactions are represented by hyperarcs. Each hyperarc represents an enzyme-catalyzed reaction that transforms set of substrates compounds into product compounds. We follow a retrosynthetic approach in order to search in the metabolic space (hypergraphs) for pathways (hyperpaths) linking the target compounds to a source set of compounds.

To select the best pathways to engineer, we have developed an objective function that computes the cost of inserting a heterologous pathway in a given chassis organism. In order to find minimum-cost pathways, we propose in this paper two methods based on steady state analysis and network topology that are to the best of our knowledge, the first to enumerate all possible heterologous pathways linking a target compounds to a source set of compounds. In the context of metabolic engineering, the source set is composed of all naturally produced chassis compounds (endogenuous chassis metabolites) and the target set can be any compound of the chemical space. We also provide an algorithm for identifying precursors which can be supplied to the growth media in order to increase the number of ways to synthesize specific target compounds.

We find the topological approach to be faster by several orders of magnitude than the steady state approach. Yet both methods are generally scalable in time with the number of pathways in the metabolic network. Therefore this work provides a powerful tool for pathway enumeration with direct application to biosynthetic pathway design.

Metabolism is the process of synthesis and degradation of molecules occurring in living organisms. Metabolism is generally represented as a network where metabolites are interconnected by reactions. In order to give a functional description of metabolism, metabolic networks are often decomposed into separated parts, called metabolic pathways. The description of metabolism through metabolic pathways is useful, even though any division in pathways is arbitrary, because it helps in modeling and understanding the behavior of the full network. A metabolic pathway can be defined as a coherent set of enzyme-catalyzed biochemical reactions by which a living organism transforms a set of source compounds into a set of target compounds. By regulating enzyme and protein synthesis, living organisms can adapt to different environments. This model of metabolism as composed by independent metabolic pathways is simplistic, since pathways are nested and interdependent. In fact, metabolism is a complex system and pathways interact with each other.

The aim of the work presented here is to find all the viable sets of heterologous enzymes, which can produce a predefined target compound when added to the pool of endogenous enzymes of a given organism. Our method enables a metabolic engineer to find all heterologous metabolic pathways producing a target compound, for instance liquiritigenin (a plant secondary metabolite with therapeutic applications), from the endogenous metabolites of *E*. coli K-12, as shown in Figure Figure11.

As depicted in Figure Figure1,1, our problem can be formulated as searching for all possible heterologous pathways linking a target compound to the endogenous metabolites of an organism. To this purpose we provide software tools that enable the discovery of potential pathways producing a target chosen by the user [1]. More precisely the user enters a target compound, a chassis organism, and our software tools return a ranked list of pathways (each list being composed of enzymes) to be engineered into the chassis organism. To achieve this task we have developed an approach composed of three steps. In the first step, using a retrosynthesis software, reactions producing a target compound are iteratively searched backwards until the set of needed precursors only contains source metabolites. This first step returns a retrosynthetic network connecting a target compound to the endogenous metabolites of an organism. There may be several pathways in the retrosynthetic network linking the source metabolites to the target compounds and there is thus a need to enumerate all the possibilities. Pathway enumeration is performed by in the second step. Once the pathways have been enumerated, we evaluate in the third step the possibility to insert each pathway and its associated heterologous enzymes in the host organism. This step consist of determining the catalytic efficacy of the enzymes, the toxicity of the products and the coproducts [2], and the easiness of inserting the enzymes into the host. The efficiency of the pathways can then be further estimated by flux models for the cell metabolism such as flux balance analysis [3].

We have already discuss elsewhere the first and third step [1,2], i.e. methods to generate retrosynthetic networks and methods to rank pathway efficiency. To apply these methods in the context of heterologous target production, we need a computationally fast method to enumerate all possible pathways. We address the enumeration problem in the current paper.

Different mathematical models that describe metabolism have been proposed (cf. [4] for a review of the different models). We distinguish two main families of approaches: the ones computing steady states of the fluxes of reactions (one well-known application being the flux balance analysis) and the ones based only the topology of the network. Typically, steady states are studied and simulated by generating the flux space. Of particular interest are the extreme pathways and the elementary modes, they both represent the smallest (minimal) generating set of the flux space and they both are composed of independent non-decomposable pathways in the network [4]. The differences between extreme pathways and elementary modes have already been discussed in details [5] and these differences arise when dealing with reversible reactions. In the present paper we consider all reaction irreversible, and networks comprising reversible reactions are modeled by doubling each reversible reaction into a forward reaction and a reverse reaction. Algorithms have been developed to enumerate both extreme pathways [6] and elementary modes [7] and these algorithm are all variants of the double description method [8], which enumerates all extreme rays of a polyhedral cone. The algorithms use as input a stoichiometric matrix (**S**) representing the network (cf. [3] for definition of stoichiometric matrix) and output sets of fluxes (**v**) satisfying **Sv **= 0. One notices that extreme pathways and elementary modes while representing pathways (to each flux verifying **Sv **= 0 correspond a stoichiometrically balanced pathway) do not directly enumerate all pathways linking a source set to a target set of compounds. However as shown in the subsection "Enumerating pathways using the steady state approach" one can construct stoichiometric matrices where input fluxes are added to the set of source compounds and outgoing fluxes are associated to the target and heterologous coproducts such that the extreme pathways and elementary modes enumerated from these matrices do correspond to all pathways linking the source set to the target.

While as mentioned above, the problem of systematically enumerating pathways for heterologous production in chassis organisms has not yet been addressed, there are methods based on the steady state approach to search for heterologous pathways optimizing target productions [9], and methods to search for shortest pathways between source and target sets of compounds [10] and [11]. All these methods are based on optimization and make use of integer linear programming. Precisely, the method of Pharkya *et al*. [9], is aimed at redesigning microbial chassis organisms through heterologous reaction addition and native reaction deletion for the overproduction of a target compound. The addition and deletion are parameterized using binary variables attached to each reaction. A mixed integer linear program (MILP) is then set up to maximize the target yield while minimizing the number of added reactions. The methods of de Figueiredo *et al*. [10], and Pey *et al*. [11] are both aimed at searching for the *k *shortest pathways. In de Figueiredo *et al*. [10] the *k *first shortest pathways are searched in entire metabolic networks, while in Pey *et al*. [11] the pathways are searched between a source metabolite and a target metabolite. Both methods solve the problem at steady state and search for fluxes, *v*, verifying **Sv **= 0, while minimizing the number of reactions turned on (using a binary variable). Aside from the fact that integer linear programs suffer from computational complexity (MILP is an NP-hard problem) all the above methods search for at most *k *optimized (shortest) pathways and do not guarantee a full enumeration of the possibilities. In our methods the optimal pathways are computed in a post process by ranking the pathways that have been enumerated. Our approach allows one to decouple enumeration from optimization, and thus to plug any optimization criteria, including nonlinear functions and not only target yield or pathway length (cf. page 3 and Carbonell *et al*. [1] for a list of criteria entering our metabolic engineering optimization problem).

Aside from using extreme pathways and elementary modes, we also present in this paper a topological model which directly enumerates all the possible heterologous pathways linking target compounds to a source set of compounds. The main advantage of the topological approach compared to the stationary state approach is computational speed. Speed is in fact an important aspect when searching for the best pathways to engineer, as there are generally a combinatorial number of pathways between given source sets and target sets. As an illustration of this combinatorial complexity, the work of Hatzimanikatis et *al*. [12], which provides a list of 75,000 novel biochemical routes from chorismate to phenylalanine, and the work of Cho et *al*. [13], which enumerates 107,272 reaction routes to produce isobutanol.

There exist standard graph-based methods to search and eventually enumerate pathways in metabolic networks, but these methods including PathFinding [14-16] and Pathway Hunter Tool [17] are computing pathways and shortest pathways in graphs instead of hypergraphs. The particularity of these techniques is that only main substrates and main products are taken into account when constructing pathways, and consequently these main compounds must be differentiated from the cofactors (i.e. co-substrates and co-products). In the work of Croes *et al*. [14,15] cofactors are filtered out based on their connectivity in the network. Indeed, compounds highly connected such as ATP, NADP, or H_{2}O are cofactors of most reactions as they do not share carbon atoms with the products of the reactions. In a more recent work [16], the main compounds in the pathways linking source metabolites to target metabolites are detected using the Kegg RPAIR annotation [18,19], which enables one to follow the fate of atoms when going from a set of substrates to a set of products. Another approach to search for main substrates and main product is the one developed with the Pathway Hunter Tool, which consists of mapping substrates to products using cheminformatics fingerprints. While all the above techniques are computationally efficient, their main shortcoming is that they are not able to encompass reactions when a main product is formed from two main substrates. There are plenty of such reactions in metabolic networks, consider for instance the formation of guanidinoacetate from arginine and glycine through a glycine amidinotransferase (EC 2.1.4.1), or the formation of glutathione from *γ*-L-glutamyl-L-cysteine and glycine catalyzed by a glutathione synthase (EC 6.3.2.3). Recently, some of the above topological methods have been benchmarked against the integer linear programming technique mentioned above [11] to search for the shortest pathways linking various compounds, the recovery ratio for a set of 40 predefined reference pathways could not reach 100% with the graph based approach, exemplifying the shortcoming of that approach.

As reviewed above, while there are methods and theoretical results to enumerate elementary modes or extreme pathways and graph based techniques to search for pathways in a given metabolic network, to the best of our knowledge there is no known methods to directly enumerate pathways in the context of metabolic engineering, that is, to enumerate all the pathways encompassing all substrates and products necessary and sufficient to produce a given set of target compounds from a given set of source compounds. In the present paper we address that specific problem and present two methods one based on elementary modes (steady state approach) and one based on a direct enumeration algorithm (topological approach). In order to address this problem we need, in addition, to consider the problem of determining supplement molecules, i.e. metabolites that the organism cannot synthesize, but which can be added to the growth media in order to increase the number of viable pathways; and bootstrap molecules, i.e. metabolites which are required fist in order to be produced [20]. While in the general context of metabolic network analysis, finding elementary modes does not require to first search for bootstrap molecules, in the context of metabolic engineering however any heterologous pathway solution that comprises a compound that is first consumed before being produced is valid only when the compound is added to the growth medium. Therefore, in our study in the context of metabolic engineering, there is a need to first compute the bootstrap compounds prior to elementary modes.

The paper is divided as follows. In the Methods section we first provide some definitions, then outline our algorithms to solve the pathway enumeration problem with both the steady state approach and the topological approach. The problem of finding and enumerating all the pathways going from a large source (as for instance al the metabolites of an organism) to a target chosen by the user is considered. All the algorithms presented for the topological approach (with the exception of the algorithm for enumeration) have polynomial worst-case running time, the algorithm for enumeration is a polynomial time per output algorithm on some classes of hypergraphs. We also provide algorithms to determine supplements, which are metabolites that the organism cannot synthesize, but which can be added to the growth media in order to increase the number of viable pathways. Furthermore, an analysis of pathways containing supplements allows finding out pathways that contain bootstrap molecules. In the Results and Discussion section we illustrate our algorithms with the enumeration of the possible pathways to synthesize more than 5000 compounds in *E. coli*. We "experimentally" probe the computational complexity of the steady state and topological approaches for a series of networks of growing sizes and discuss the theoretical complexity results of the topological approach, which are provided in Appendices A and B.

While we illustrate our two methods for the production of heterologous compounds using as a source set all the endogenous metabolites of *E*. coli, our methods can be applied to any chassis organism and more generally to any source set (for instance a set of nutrients or a set of abundant currency metabolites).

In the context of metabolic engineering, metabolic networks have been represented as directed graphs (cf. for instance Cho *et al *[13]). In such graphs, edges are directed and correspond to reactions connecting two compounds if one is the product of the other. Directed graphs can represent monomolecular reactions (one substrate gives one product), but they are not well suited to capture more complex reactions. As already discussed in the background section, when representing bimolecular reactions, one has to choose which molecules are connected by the edges of the graph and which ones have to be excluded from the graph because they are considered co-substrates or co-products. Additionally, one of the limitations of a model based on a graph representation is that depending on the criteria used to identify the co-substrates and co-products in the reactions, the networks obtained are different.

In the present paper to palliate the limitations of the directed graph model, we represent networks as directed hypergraphs. The first examples of modeling through hypergraphs can be found in [20]. In a hypergraph, each hyperarc connects a set of vertices, corresponding to reactants, to a disjoint set of vertices, representing the products. In our model each hyperarc corresponds to a reaction that can be catalyzed by an enzyme. It is worth noticing that hypergraph models have already been used to find minimal sets of metabolites sufficient to produce a set of target metabolites [21]. Unfortunately, the algorithms proposed in [21], do not enumerate pathways and are therefore not directly applicable to our metabolic engineering problem.

**Definition 1 **(Hypergraphs and hyperarcs).

*A directed hypergraph is a pair $\mathcal{H}=\left(V,E\right)$ where V *= {*v*_{1}, *v*_{2 }..., *v _{n}*}

The set *X _{i }*is also called the tail of

We denote by $X:E\to \mathcal{P}\left(V\right)$ the application that given an hyperarc *e _{i }*returns its tail

**Definition 2 **(Reactions and networks).

*In a metabolic network each vertex corresponds to a metabolite and each hyperarc corresponds to a reaction. A metabolic network of m metabolites and n reactions can be represented with a m *× *n stoichiometric matrix ***S***, where the rows correspond to the m metabolites and the n columns to the reactions. A reaction j is represented by the column vector S _{j }*= (

Examples of hypergraph, network, and stochiometric matrix are given in Figure Figure2A.2A. We notice that the stoichiometric coefficients of the reactions are not taken into account in the hypergraph representation. We also notice that the pair (*X*, *Y*) is ordered so to make the distinction between reactants and products. In this representation reactions are irreversible. Many biochemical reactions can be considered as irreversible, since in organisms the homeostatic equilibrium is often strongly polarized. Nonetheless, metabolic network may comprise reversible reactions, and we model these reactions by introducing both hyperarcs: (*X*, *Y*), and (*Y*, *X*).

Hyperpaths, a generalization of simple paths in graphs where cycle free paths going from one vertex to another, are used to represent pathways. A hyperpath connects a source set of vertices to a target set of nodes. Two examples of hyperpaths are given in Figures Figures2A2A and and2C.2C. We remark that in a natural way a set *E *of hyperarcs defines a hypergraph *ε *= (_{eE}*X*(*e*) _{eE}*Y *(*e*), *E*). By abuse of the terminology we denote by *E *the hypergraph corresponding to the set *E *of hyperarcs and all the heads and tails of the hyperarcs in *E*. The following definition for hyperpaths is borrowed from Nielsen et *al*. [22].

**Definition 3 **(Hyperpaths).

*A hyperpath P going from a source subset ${S}_{\mathcal{H}}$ of V to a target subset T _{P }of P in a hypergraph $\mathcal{H}=\left(V,E\right)$ is a hypergraph ${\mathcal{H}}_{P}=\left({V}_{P},{E}_{P}\right)$ with VP *

• $\forall k\left\{0,\dots ,\left|F\right|\right\},X\left({F}_{k}\right){S}_{\mathcal{H}}({jk}_{Y})$

• ${T}_{P}{S}_{\mathcal{H}}({e{E}_{P}Y\left(e\right)}_{)}$

From the point of view of metabolism, the first condition corresponds to the requirement that reactants of reactions participating in the hyperpath can be produced without the presence of the reaction itself. Hyperpaths defined in this manner represent a metabolic route from the source to the target. According to definition (3) the hypergraph of Figure Figure2B2B with source *a *is not a hyperpath because neither reaction *R*_{1 }nor *R*_{2 }can happen until the other does not start. The definition (3), though complex, is computationally tractable, meaning that the time required to determine if a hypergraph is a hyperpath is proportional to the number of reactions. A polynomial time algorithm to determine if a hypergraph is a hyperpath is given in [23], the algorithm *FindAll *presented below can also be used for that purpose. In fact, as discussed below, if the set of reactions returned by *FindAll *$\left({\mathcal{H}}_{P},{S}_{\mathcal{H}}\right)$ contains all the reactions in ${\mathcal{H}}_{P}$, then ${\mathcal{H}}_{P}$ is a hyperpath.

The metabolic network described by a hypergraph has to be as comprehensive as possible, containing every known enzyme-catalyzed reaction occurring in organisms. We say that a hyperpath produces a set of target metabolites if it contains all those target elements. A set of target compounds is said to be reachable from a given source, or linked to the source, if there is at least one hyperpath producing the targets.

We are interested in the enumeration of pathways leading to the production of a desired compound. Hyperpaths do not generally give the best representation of pathways because hyperpaths can contain reactions not necessarily linking the target to the source. Minimal hyperpaths, cf. definition (4), are an appropriate representation of pathways since they contain only the essential reactions linking the source to the target.

In the definition given below, we say that a hyperpath $\mathcal{P}\left(\mathcal{V},\mathcal{E}\right)$ is a subset of another hyperpath ${\mathcal{P}}^{\prime}\left({V}^{\prime},{E}^{\prime}\right)$ if *V * *V' *and *E * *E'*. For instance the hyperpath of Figure Figure2C2C is a subset of the one of Figure Figure2A2A.

**Definition 4 **(Minimal Hyperpaths).

*A hyperpath *(*V _{P}*,

The target is disconnected from the source if a reaction is removed from a minimal hyperpath. In this sense minimal hyperpaths cannot be reduced. From a metabolic engineering perspective the concept of minimal hyperpath is useful as it defines the minimum set of reactions necessary to produce a target heterologous compounds, and consequently the minimum set of enzymes needed to be inserted into the chassis organism where the compound is going to be produced.

In the following we define $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ to be the set of all molecules linked to the source for a given hypergraph $\mathcal{H}$ and source set ${S}_{\mathcal{H}}$. The characterization of $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ is the first task to be solved before the enumeration. Once this set is known all the minimal hyperpaths can be enumerated for all the molecules associated to the vertices in $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$.

Supplements for a target are molecules whose presence in the source set increases the number of pathways for target production. Finding supplements is an important improvement when exploring ways to produce the target, since they make possible new pathways.

For each target of interest one can look for vertices that once inserted in ${S}_{\mathcal{H}}$ give place to pathways otherwise impassable. In terms of metabolism we are looking for the "supplement" molecules, i.e., molecules that once introduced in the source set permit to find more pathways than those otherwise available. We introduce below *FindSupp*, an algorithm that returns the supplements.

An analysis of pathways containing supplements allows to find out pathways containing bootstrap molecules, i.e. metabolites that are needed in reactions producing compounds afterwards used for the production of the bootstrap molecules. As a matter of fact, many pathways can be made viable once bootstrap molecules become available in the metabolic network (a concept introduced in [20]). Loosely speaking bootstrap molecules are molecules that cannot be produced by the reactions belonging to a hyperpath unless they are already present in the source. Cottret *et al *[21] stated that given a source set the existence of a pathway making use of bootstrap molecules can be tested in polynomial time. We provide later in this section an algorithm returning the bootstrap compounds, such algorithm can be used to determine if a target molecule is connected to the source through a pathway making use of bootstraps.

In steady state, all possible pathways in a metabolic network are by definition stoichiometrically balanced, i.e. all metabolites produced from the source set must be consumed except for those that are target products. Extreme pathways and elementary modes are two methods that compute the set of independent non-decomposable pathways in the network that generate all feasible steady state solutions in the flux space. They do not directly enumerate all pathways linking a source set to a target set of compounds. However, one can construct stoichiometric matrices where input fluxes are added to the set of source compounds and outgoing fluxes are associated to the target and heterologous co-products such that the extreme pathways and elementary modes enumerated from these matrices can be used to generate all pathways linking the source set to the target.

Given a hyperpath ${\mathcal{H}}_{P}=\left(V,E\right)$ of a hypergraph $\mathcal{H}=\left(V,E\right)$, we can define a set of flux vectors **v*** _{P }*for the hyperpath where components

$${v}_{Pj}=\mathsf{\text{}}\left\{\begin{array}{cc}\hfill 0\hfill & \hfill {e}_{j}{\mathcal{H}}_{P}\hfill & \hfill 0\hfill & \hfill {e}_{j}\mathcal{H}\backslash {\mathcal{H}}_{P}\hfill & \hfill \hfill \end{array}\right)$$

(1)

A hyperpath ${\mathcal{H}}_{P}=\left(V,E\right)$ of a hypergraph $\mathcal{H}=\left(V,E\right)$ with input source subset ${S}_{\mathcal{H}}$ and the target subset *T _{P }*is defined as stoichiometrically balanced if the rows corresponding to each metabolite

$$\mathbf{S}{\mathbf{v}}_{P}=\left\{\begin{array}{cc}\hfill \le 0\hfill & \hfill {v}_{i}{S}_{\mathcal{H}}\hfill & \hfill \ge 0\hfill & \hfill {v}_{i}{T}_{P}\hfill & \hfill \mathbf{0}\hfill & \hfill {v}_{i}V\backslash \left\{{S}_{\mathcal{H}},\phantom{\rule{2.77695pt}{0ex}}{T}_{P}\right\}\hfill & \hfill \hfill \end{array}\right)$$

(2)

A way to introduce the constraint on input and output metabolites in the previous equation is by adding to the stoichiometric matrix **S **additional columns corresponding to input reactions (reactions with no substrate that produce the source set ${S}_{\mathcal{H}}$), and output reactions (reactions with no product that consume the product metabolites in the hypergraph *T _{P}*). These auxiliary reactions, even if non-properly balanced in terms of the law of conservation of mass, are useful in order to define completely the problem in a compact manner:

$$\begin{array}{cc}\hfill \mathbf{S}\mathbf{v}=\mathbf{0}\hfill & \hfill \hfill \\ \hfill \mathbf{v}\ge 0\hfill & \hfill \mathbf{v}\mathcal{R}\hfill & \hfill \hfill \end{array}$$

(3)

Both extreme pathways and elementary modes make use of this formulation in order to compute the set of feasible solutions **v**. Since in our hypergraph definition all reactions are irreversible, the set of pathways solving Equation 3 computed by both extreme pathways and elementary modes are identical (cf. [5]). Furthermore, solutions in **v **must contain only positive or null fluxes.

In order to determine all stoichiometrically balanced heterologous pathways ${\mathcal{H}}_{P}$ that can be inserted into the chassis organism to produce a target set *T _{P}*, we need to constrain the computation of elementary modes only to those that have non-zero fluxes for heterologous reactions. Efficient solutions to this problem have been considered in the divide-and-conquer approach [24,25] by rearranging the constraints in an echelon form so that the constraints containing only the desired reactions appear at the bottom. To define the constraints in our case, we consider first the hypergraph ${\mathcal{R}}_{T}$ that is formed only by heterologous reactions. This hypergraph ${\mathcal{R}}_{T}$ is the subset of the hypergraph $\mathcal{R}\left(V,E\right)$ formed by those hyperedges where at least one vertex

Finally, from the computed set of solutions **v **for Equation 3, we are interested in enumerating all minimal hyperpaths from ${S}_{\mathcal{R}}$ to the target set *T *on the hypergraph given by ${\mathcal{R}}_{T}$. According to Definition 4, minimal hyperpaths for some target *T *are given by those cycle-free solutions in **v **containing only reactions linking the source to the target. Since any feasible flux pattern **v **is a superposition of elementary modes with non-negative coefficients [26], the set of minimal hyperpaths for a given target *T *is a subset of the elementary modes producing *T *that are solution of Equation 3. Namely, any feasible solution generated from the elementary modes will contain at least as many reactions as the ones that are in those elementary modes that form its basis. Therefore no additional minimal hyperpaths can be generated in this case by superposition of elementary modes.

The algorithm *FindAll *that allows to find $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$, the set of metabolites that can be linked to the source ${S}_{\mathcal{H}}$ by a hyperpath. *FindAll*, by explicitly constructing the ordered set ** F **in definition (3), provides a proof of the tractability of the problem of checking if a hypergraph is a hyperpath. Moreover

As presented below the algorithm *Minimize*, when called on the output of *FindAll*, returns, if exists, a minimal hyperpath linking a given target to the source. These algorithms are the main components of the algorithm enumerating the pathways *FindPath *described next. Then we present *FindSupp *an algorithm to enumerate supplements.

Let $\mathcal{H}=\left(V,E\right)$ be the hypergraph representing the set of metabolic reactions, *n *= |*V|*, *m *= |*E| *and let ${S}_{\mathcal{H}}$ be the set of source vertices representing the source metabolites.

The algorithm *FindAll *returns all the reactions that can contribute to the production of any element in $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$, i.e., the set of all compounds that can be connected to the source. *FindAll *is a linear algorithm in the number of vertices, hyperarcs and in the total coordination; the complexity is *O*(*n *+ *m *+Σ_{vV }|*X *^{-1}(*v*) |+ |*Y*^{-1}(*v*)|) that is bounded by *O*(*n *+ *m *+ *n · m*). Therefore, such algorithm can be applied to the hypergraph $\mathcal{H}$ of all reactions in order to obtain a pruned sub-hypergraph ${\mathcal{H}}^{\prime}=\left({V}^{\prime},{E}^{\prime}\right)$ where the set of vertices ${V}^{\prime}:={S}_{\mathcal{H}}B$, and the set of edges *E' *is the set of reactions returned by *FindAll*. In the context of metabolic engineering *FindAll *returns all the compounds that can be produced from a given set of source compounds and reactions. For instance, using *FindAll *with all know metabolic reactions one can determine all the compounds that can be produced from the metabolites of *E*. coli.

**Algorithm FindAll **(Given a hypergraph $\mathcal{H}$ and a source ${S}_{\mathcal{H}}$, returns all the hyperarcs that are part of at least one hyperpath.)

input:

$\mathcal{H},{S}_{\mathcal{H}}$

1. **for all ***r ***in $\mathcal{H}$**

2. *x*(*r*) ← *X*(*r*)

3. **end for**

4. $V\leftarrow {S}_{\mathcal{H}}$

5. $D\leftarrow {S}_{\mathcal{H}}$

6. ** F **← {}

7. **while ***V *≠ {}

8. let *i *be an element of *V*

9. *V *← *V \ i*

10. *D *← *D * *i*

11. **for all ***r * *H *such that *i * *x*(*r*):

12. *x*(*r*) ← *x*(*r*) *\ i*

13. **if ***x*(*r*) = {}

14. ** F **← {

15. **for all ***j ***in ***Y *(*r*) **and not in ***D*:

16. *V *← *V * *j*

17. **end for**

18. **end if**

19. **end for**

20. **end while**

output:

*F*

Let *D *be the union of the source set and of the heads of all the reactions output in ** F **by

• The proof of the fact that every element in *D *is reachable from the source is given constructively by the ordered set ** F **returned by the algorithm. In fact at each step

• The second claim can be proved by contradiction: if an element of $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ were not in *D *there would be a hyperpath linking it to the source. In such hyperpath let consider the first (according to the order given by the definition) reaction *r *whose *X*(*r*) belongs to *D *and such that one of the elements of *Y *(*r*) does not. Consider among *x*(*r*) the last one that has been inserted into the set *V *; after its removal from *X*(*r*) this set becomes empty and the elements of *Y *(*r*) are inserted into *V *(line 16) and then in *D *(line 10), which is a contradiction.

From the above statements follows that each vertex appearing in a hyperpath having as source ${S}_{\mathcal{H}}$ is an element of *D *and every hyperarc is an element of ** F**. Thus the algorithm

Notice that *FindAll *algorithm as presented above returns in polynomial time a hyperpath valid for each target vertex in $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$. Even though there are more efficient algorithms for finding a hyperpath for one single target, for the sake of simplicity we avoid to introduce here an additional algorithm and just remark that since *FindAll *is polynomial, the use of it does not affect the complexity analysis of the algorithms making use of its output.

Remark that a minimal hyperpath going to a specific target can be easily extracted from the hyperpath output of *FindAll*. Namely, given a hyperpath $\mathcal{P}$ connecting *S *to *T*, it is always possible to find a minimal hyperpath ${\mathcal{P}}^{\prime}$ subset of $\mathcal{P}$. Moreover it can be done in polynomial time, for instance by using *Minimize *$(\mathcal{P},\{\},T,S)$, the algorithm introduced below.

*Minimize*$\left(\mathcal{P},{R}_{f},T,S\right)$ is an algorithm that takes as input a hypergraph $\mathcal{P}$, a hyperpath *R _{f }*subset of $\mathcal{P}$, a target set of vertices

**Algorithm Minimize **(Given a hypergraph $\mathcal{P}$ containing *R _{f}*, returns either a hyperpath from

input:

$\mathcal{P},{R}_{f},T,S$

1. ** F **← FindAll($\mathcal{P}$,

2. *P' *← *P*

3. **if ***T * * _{k }Y *(

4. ${\mathcal{P}}^{\prime}\leftarrow \{\}$

5. **else**

6. **for all ***r ***in $\mathcal{P}$**

7. **if ***r ***not in ***R _{f}*

8. ** F **← FindAll(${\mathcal{P}}^{\prime}$

9. **if ***T * * _{k }Y *(

10. ${\mathcal{P}}^{\prime}\leftarrow {\mathcal{P}}^{\prime}\backslash r$

11. **end if**

12. **end if**

13. **end for**

14. **end if**

output:

${\mathcal{P}}^{\prime}$

The proof of correctness of this algorithm is simple and is based on the fact that ${\mathcal{P}}^{\prime}\mathcal{P}$ implies $FindAll\left({\mathcal{P}}^{\prime},S\right)FindAll\left(\mathcal{P},S\right)$. If a reaction in $\mathcal{P}$ has not been removed from ${\mathcal{P}}^{\prime}$, then any subset of *P ^{0 }*not containing

A related problem to *Minimize *is the minimal constrained hyperpath problem: the problem of finding if a minimal hyperpath from a given source to a given target, containing the hyperarcs in *R _{f }*exists. Notice that

Below we will discuss why we are interested in algorithms for the minimal constrained hyperpath problem, while in Appendix A.2 we show that in general the problem is NP-complete (reduction to 3-SAT).

The basic idea behind the enumeration algorithm presented below is to introduce an iterative refinement of partitions of the space of feasible solutions i.e. of the space of hyperpaths and in each part to look for a solution. In our implementation, a part is defined by two sets of reactions (*R _{f }*and

First we describe informally the enumeration algorithm through the toy example hypergraph in Figure Figure2D2D and and3A,3A, then we outline in Figure Figure3B3B a typical run for a more involved example: liquiritigenin (cf. Figure Figure11).

A minimal hyperpath ${\mathcal{P}}_{1}$ connecting the node *v*_{8 }to the source nodes *v*_{1}, *v*_{4 }on the hypergraph $\mathcal{H}$ of Figure Figure2D2D can be obtained by calling *Minimize *(${\mathcal{P}}^{\prime}$, {}, {*v*_{8}}, {*v*_{1}, *v*_{4}}) on the hypergraph ${\mathcal{P}}^{\prime}$ obtained by $FindAll\left(\mathcal{H},\left\{{v}_{1},{v}_{4}\right\}\right)$. The hypergraph ${\mathcal{P}}^{\prime}$ is represented in Figure Figure3A3A.

Once ${\mathcal{P}}_{1}=\left\{{R}_{4},{R}_{3}\right\}$ has been obtained, the search space is divided into three parts:

• the hypergraphs which do not contain *R*_{4},

• the hypergraphs which do contain *R*_{4 }and do not contain *R*_{3},

• the hypergraphs which do contain *R*_{4 }and *R*_{3}.

The first set does not contain hyperpaths connecting the target to the source: once the reaction *R*_{4 }is removed, *v*_{8 }is disconnected from the source. The second set contains a solution and thus has to be partitioned. The third set contains only one minimal pathway (the one consisting of hyperarcs *R*_{3}, *R*_{4 }highlighted in Figure Figure3A3A).

The minimal hyperpath in the second set is found by running *FindAll *on $\mathcal{H}\backslash {R}_{3}$ and then *Minimize *with constraint *R _{f }*= {

• the hypergraphs which do contain *R*_{4 }and do not contain *R*_{3 }and *R*_{7}.

• the hypergraphs which do contain *R*_{4 }and *R*_{7 }and do not contain *R*_{3}.

The first of these sets does not contain hyperpaths going to *v*_{8}: once *R*_{3 }and *R*_{7 }are removed, node *v*_{8 }is disconnected from the source. The second one only contains the second and last minimal hyperpath: the one consisting of hyperarcs *R*_{7}, *R*_{4}. The algorithm here sketched is based on the fact that all minimal hyperpaths are found once the problem of finding a minimal hyperpath has been solved for each part of the partition.

The enumeration procedure is performed by the algorithm *FindPath*, which enumerates all the minimal pathways and does not output duplicate hyperpaths. Precisely *FindPath *($\mathcal{H}$, *R _{f}*,

A schematic representation of how *FindPath *works for the enumeration of the pathways of liquiritigenin is given in Figure Figure3B3B where we represent each call with a box connected by an arrow to its parent process. For each call of *FindPath *either a new hyperpath is found and then *FindPath *is executed with new constraints, or there are no new hyperpaths and the branching process is stopped. The new constraints sets *R _{f }*',

*FindPath *($\mathcal{H}$, {}, *T*, *${S}_{\mathcal{H}}$*) returns all the minimal hyperpaths from the source ${S}_{\mathcal{H}}$ to the target *T *in $\mathcal{H}$. In the context of metabolic engineering *FindPath *returns all the metabolic pathways for the production of the target compounds.

**Algorithm FindPath **(Enumerate all minimal hyperpaths from ${S}_{\mathcal{H}}$ to the target set *T *with constrains *R _{f }*on the hypergraph given by $\mathcal{H}$)

input:

$\mathcal{H}$, *R _{f}*,

1. ** F **← FindAll($\mathcal{H}$,${S}_{\mathcal{H}}$)

2. $\mathcal{P}$ ← Minimize(_{k}F_{k }*R _{f}*,

3. *En *←

4. **if $\mathcal{P}\ne $**

5. $En\leftarrow \mathcal{P}$

6. $\mathit{F}\leftarrow \mathsf{\text{FindAll}}\left(\mathcal{P},{S}_{\mathcal{H}}\right)$

7. **for all ***k ***in **|** F**|,..., 1}

8. *r *= *F _{k}*

9. **if ***r ***not in ***R _{f }*:

10. $En\leftarrow \left\{En,\phantom{\rule{2.77695pt}{0ex}}\mathsf{\text{FindPath}}\left(\mathcal{H}\backslash r,{R}_{f},T,{S}_{\mathcal{H}}\right)\right\}$

11. *R _{f }*←

12. **end if**

13. **end for**

14. **end if**

output:

*En*

The loop at line 7 of *FindPath *is done according to the order given by line 6 where the hyperarcs are ordered so that at least one of the head vertices of each hyperarc is a tail vertex of some previous reaction. Such an ordering is always possible since $\mathcal{P}$ is a hyperpath. As said above and illustrated in Figure Figure3B,3B, F*indPath *is an algorithm that iteratively calls itself, see line 10. Note that even if *R _{n }*is not explicitly defined in

Let us note that the output of the enumeration is not always composed of minimal hyperpaths. This is due to the fact that the algorithm *Minimize *while running in polynomial time can return a non-minimal hyperpath. An algorithm always returning minimal hyperpaths cannot be polynomial since the problem of finding a minimal hyperpath containing a set *R _{f }*of hyperarcs is an NP-complete problem as showed in Appendix A.2. However, in many practical instances (for instance when hyperarcs only have one head node), the algorithm

Provided a given metabolic network and a set of source compounds (e.g. a set of compounds in the growth media, a set of endogenous metabolites of a species) it may not be possible to link all the metabolites of the network to the source set. When a target compound is not accessible from the source set, one can consider the possibility of inserting into the metabolism of the organism some precursors so that the target becomes reachable. In practice such a task can be carried out through the enrichment of the growth media. More generally, the insertion of supplements can be used even when the target compound is reachable in order to access to new pathways for the production of the target.

Let a supplement for a target *T *be any compound $iB\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ that is involved as reactant in at least one minimal hyperpath going from a superset of ${S}_{\mathcal{H}}i$ to the target *T*. Below we give the algorithm *FindSupp *finding the supplements for the production of a given target. In Figure Figure2D2D supplements are highlighted in red. Therefore, the process of finding supplements is use-ful as a general strategy in metabolic engineering in order to determine which metabolites might be part of the metabolism that produces a given target. **Algorithm FindSupp **(Find supplements for the production of the compounds in *T*, from the source ${S}_{\mathcal{H}}$ of hypergraph $\mathcal{H}$)

input:

$\mathcal{H}$, *${S}_{\mathcal{H}}$*, *T *(list of compounds to produce)

1. *WishList *← *T*

2. *D *← {}

3. **while ***WishList \ D *≠ {}

4. let *i *be an element of *WishList \ D*

5. *D *← *D * *i*

6. *Aux *← {}

7. **for all **reactions *r *with *i * *Y *(*r*)

8. $Aux\leftarrow Aux(X\left(r\right)\backslash ({S}_{\mathcal{H}}D))$

9. **end for**

10. *WishList *← *WishList * *Aux*

11. **end while**

12. $F\leftarrow \mathsf{\text{FindAll}}\left(\mathcal{H},{S}_{\mathcal{H}}\right)$

13. $D\leftarrow D\backslash {S}_{\mathcal{H}}({k}_{Y})$

output:

D

Bootstrap molecules relative to a source ${S}_{\mathcal{H}}$ are the molecules that cannot be produced by a hyperpath with source ${S}_{\mathcal{H}}$ unless they are already present in the media. An example of bootstrap nodes are nodes *v*_{2}, *v*_{3 }of Figure Figure2D.2D. In this section we give an algorithm finding in polynomial time all the bootstraps of a hypergraph $\mathcal{H}$ with source vertices ${S}_{\mathcal{H}}$. Bootstraps are special kind of supplement, if at any step of a pathway, a heterologous metabolite is needed as a substrate but has not yet been produced from the source set, then this metabolite is a bootstrap and must be added in the growth media for the reaction to take place, and for the pathway to be a valid pathway. The algorithm given below enables one to detect bootstraps prior enumerating pathways running the *FindPath *algorithm.

**Algorithm FindBootstraps **(Given a hypergraph $\mathcal{H}$ and a source ${S}_{\mathcal{H}}$, returns the set *B *of bootstrap nodes)

input:

$\mathcal{H},{S}_{\mathcal{H}}$

1. $\mathit{F}\leftarrow \mathsf{\text{FindAll}}\left(\mathcal{H},{S}_{\mathcal{H}}\right)$

2. $D\leftarrow {S}_{\mathcal{H}}({k}_{Y})$

3. ${\mathcal{H}}^{\prime}\leftarrow \{\}$

4. **for all ***r ***in $\mathcal{H}$**

5. *r*' ← (*X *(*r*) *\ D*, *Y *(*r*) *\ D*)

6. **if ***Y *(*r*') ≠ {}:

7. ${\mathcal{H}}^{\prime}\leftarrow {\mathcal{H}}^{\prime}{r}^{\prime}$

8. **end if**

9. **end for**

10. **while **exists *v ***in ${r{\mathcal{H}}^{\prime}Y\left(r\right)\backslash {r{\mathcal{H}}^{\prime}X\left(r\right)}_{}}_{}$**

11. **for all ***r*' containing *v*:

12. *r*' ← (*X*(*r*'), *Y*(*r*') *\ v*)

13. **if **(*Y*(*r*') = {}) **or **(*v * *X*(*r*')):

14. ${\mathcal{H}}^{\prime}\leftarrow {\mathcal{H}}^{\prime}\backslash {r}^{\prime}$

15. **end if**

16. **end for**

17. **end while**

18. $B={r{\mathcal{H}}^{\prime}Y\left({r}^{\prime}\right)}_{}$

output:

B

The *FindBootstraps *algorithm is linear in the number of vertices, hyperarcs and in the total coordination. Remark that the set ${r{\mathcal{H}}^{\prime}Y\left({r}^{\prime}\right)}_{}$ obtained in line 18 is equal to ${r{\mathcal{H}}^{\prime}X\left({r}^{\prime}\right)}_{}$. In fact the bootstrap vertices $b\phantom{\rule{0.3em}{0ex}}\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ constitute the largest set of vertices not reachable from the source and such that each element of the set belongs to the head of at least one reaction whose tail only contains vertices in $B\left(\mathcal{H},{S}_{\mathcal{H}}\right)$ or in $b\phantom{\rule{0.3em}{0ex}}\left(\mathcal{H},{S}_{\mathcal{H}}\right)$. Notice that the set of bootstrap vertices in a hypergraph $\mathcal{H}$ only depends on the source vertices and does not depend on the target.

To evaluate the performance of our topological approach (e.g. algorithm FindPath), we have compared running times of this approach with the running times of the steady state approach presented in the Methods section. All our tests were run on a Mac Pro server 2 *× *2.66 Ghz Quad-Core Intel Xeon, 16 GB. All the algorithms of the topological approach were implemented in Python. For the steady state approach we used two software products, one computing elementary modes and the other extreme pathways. Elementary modes were computed by using the MATLAB interface to the Java implementation of efmtool Version 4.7.1 [7]. Extreme pathways were computed by using the Mac OSX version of the ExPA program [6]. The running time comparison test was performed for different random samples of the hypergraph $\mathcal{H}$ constructed from the KEGG database [27]. *E*. coli was chosen as source organism. The hypergraph $\mathcal{H}$ was composed of 6542 metabolites connected by 8392 reactions including 971 metabolites endogenous to *E*. coli and 5571 heterologous compounds. Each sampled hypergraph ${\mathcal{H}}_{s}$ was built by randomly sampling a given fraction of the total reactions in the hypergraph $\mathcal{H}$. Tests for each sampling fraction were repeated 10 times. In the case of elementary modes, we were able to run the test only up to 50% sampling of the full metabolic network, due to memory constraints in MATLAB. For extreme pathways, the test was run up to 85% due again to memory constraints as well. Prior to enumerating pathways with elementary modes, extreme pathways or the direct algorithm, bootstraps were identified by using the algorithm *FindBootstraps *defined in Methods and added to the growth media.

The observed trend is consistent in the three cases, as it is shown in Figure Figure4.4. For the network composed of all 6542 metabolites and 8392 reactions, there are 23564 pathways connecting 2338 out of 5571 heterologous metabolites to the source. This relative low number of pathways producing heterologous compounds is related to the fact that heterologous maps usually show a degree of hierarchy higher than the one observed in native metabolic networks such as central metabolism (a comparison is provided in supplementary Additional file 1, Figure S1). It is indeed not surprising to find the same number of extreme pathways and elementary modes as all reactions in our networks are irreversible. In the case of FindPath, the fact that the topological approach does not take stoichiometry into account might produce some inconsistent pathways. Checking that a given pathway is stoichiometrically balanced can be done using linear programming [28]. In the context of metabolic engineering (i.e. enumerating pathways between native metabolites and heterologous targets) we found only few inconsistent pathways (less than 1% of the 23564 enumerated pathways). These pathways are eliminated after enumeration by our ranking function as one of the criteria to rank pathways is to solve the steady state equations [1]. Once unbalanced pathways were removed from the list of enumerated pathways, we obtained the same pathways as through the calculation of elementary modes. These results are consistent with the given definitions of the algorithms. In a forthcoming paper, we plan to generalize them into a formal proof.

We also find that FindPath has the fastest execution time, the algorithm required less than 5 min to compute the full network. Elementary modes has an execution time approximately 10-fold slower than FindPath. The computation of extreme pathways, in turn, is the slowest one, being between 10^{2 }~ 10^{3}-fold slower than FindPath. The execution times are on average of 0.0136 ± 0.0051 s per output with the FindPath algorithm, of 0.218 ± 0.042 s with elementary modes, and of 2.84 ± 1.24 s with extreme pathways. The observed execution times mean that for the compound with the highest number of pathways in our tests, the anti-diabetic drug acarbose containing 1513 pathways, enumerating the pathways with elementary modes takes more than 329.83 seconds, while it can be computed in 20.58 seconds with FindPath. We have measured running times per output and memory usage as function of input size and output size (see Table Table11 and Additional file 2, Figure S2). In all cases we found linear growth *O*(*n*) for both input size and output size. In the case of running times, FindPath and efmtool have running times per output approximately constant in function of the size of the input stoichiometric matrix S of 3.1 × 10^{-2 }and 1.6 × 10^{-1 }seconds, respectively, being ExPA the less efficient code with a constant time of 4.2 × 10^{-1 }seconds and a linear growth of 1.6 × 10^{-7 }seconds per input. Similar values were obtained depending on the size of the output, although the scaling in this case for ExPA was of 5.7 × 10^{-3 }seconds per output. Regarding memory usage, ExPA and FindPath are less demanding, especially for output size, with linear growths of 3.9 and 54 kB per output, respectively, while efmtool required significantly more memory allocation, 3.3 × 10^{4 }kB per output.

To the best of our knowledge, the computational complexity of enumerating elementary modes on networks comprising irreversible reactions is up-to-date unknown [28]. In Appendix A.2 we prove that enumerating minimal pathway is an NP-complete problem (reduction to 3-SAT) but as examplified in Appendix B the hard instances are rather rare and obviously none of these hard instances were found in our running tests as all pathways returned by FindPath were indeed minimal pathways.

To further probe the computational complexity of FindPath we computed distribution of the run time for each of the 2338 heterologous targets that are linked to *E*. coli. As shown in Figure Figure5,5, the distribution is exponentially distributed, the average run time is thus finite. Examples of pathway enumeration for heterologous compounds with therapeutical applications were provided in our previous methodology study about pathway ranking [1] for penicillin N and taxol (see also Additional file 4, Figure S5 and S6). These two examples contained a relative low level of combinatorial complexity, with a maximum number of 14 different pathways producing penicillin N. The combinatorial complexity of enumerating all putative biosynthetic routes producing a target compound, however, might become considerably higher than in these two previous examples (cf. Figure Figure22 in [1] where more than 10000 pathways can be found between tyrosine and chorismate). Further examples are those involved in the biosynthetic pathways for plant steroids leading to brassinolide, where 8 pathways can be used to produce campesterol, one of the initial precursors. The number of pathways grows as we proceed downstream going up to 40 for teasterone, and to 224 for typhasterol. Finally, the number of pathways for the end products, castasterone and brassinolide is of 328. This example illustrates how the complexity of pathways enumeration can grow with the number of intermediates involved in the synthesis of the final product. Since FindPath algorithm has been designed with the aim to enumerate pathways in metabolic engineering applications, it does not directly address other general metabolic network analysis problems like finding shortest paths between two compounds of endogenous pathways in central metabolisms. Indeed, FindPath does not enumerate pathways comprising compounds (bootstraps) that are consumed before being produced unless they were added as supplement in the growth medium (cf. in Additional file 3 an example of pathway enumeration with FindPath using bootstrap compounds).

Another aspect of pathway design is the definition of a cost function that estimates limiting effects on production efficiency by multiple factors associated with genetic and metabolic engineering of the pathway, such as gene heterogeneity, metabolite toxicity, or steady-state fluxes. In order to facilitate the designer in the selection of the best synthetic pathways to be implemented each hyperpath enumerated by our *FindPath *algorithm is ranked depending on this cost estimation. Once a cost function to minimize is introduced, the search for an optimal pathway can be formulated as a shortest path problem. The shortest path problem for weighted graphs consists of finding a path going from a given source vertex to a given target vertex while minimizing a cost function given by the sum of the costs of the arcs involved in the path. In order to define a shortest-hyperpath problem we need a definition of cost for hyperpaths in a weighted hypergraph (i.e. a hypergraph whose hyperarcs have associated a non-negative real number representing their cost). A natural generalization of the cost function for paths in graphs to hypergraphs is the sum of the costs of the hyperarcs contained in the hyperpath. If on the one hand this generalization seems to be natural, on the other hand the two problems have, however, not the same complexity. In fact the shortest-hyperpath problem with this cost function is known to be an NP-hard problem (see Appendix A.1).

The reason why the algorithms commonly used for graphs cannot be easily adapted for hypergraphs is that given the costs $W\left(\mathcal{P},{a}_{i}\right)$ for the hyperpaths ${A}_{i}\mathcal{P}$ leading to the vertices *a _{i}*, tails of a hyperarc

Provided an additive cost function as defined in [23], finding the shortest hyperpath can be done in polynomial time by an algorithm of complexity *O*(*m *· (*n *+ ln *m*)) given in [23], which finds the shortest hyperpath in *B*-hyperpaths. In fact, this algorithm does apply to minimal hyperpaths given in definition (4).

Generally speaking, the strategy we used in the enumeration algorithm (iterative partition of the space of feasible solutions) is often used to solve the problem of finding the first *k *solutions of a combinatorial problem, but it cannot be extended to the *k*-shortest problem on hypergraphs not even with an additive cost function (cf. definition in Appendix A.1), since when splitting the problem into a constrained part and a free one (by using the sets *R _{n }*and

Therefore, the *k*-shortest path problem might be solvable efficiently if one is able to develop a specific cost function making the problem tractable. However such an artifact cost function may not be necessarily appropriate to practical problems, such as the production of heterologous targets using metabolic engineering. As an alternative we have proposed in this paper an enumeration algorithm, which systematically enumerates all pathways linking source compounds to target compounds. In all the cases that we have so far processed for metabolic networks, our algorithm runs in polynomial time per output, and therefore pathways can be ranked by the designer based on their own user-defined cost functions.

In summary, the methods presented in this paper provide metabolic engineers with powerful tools that extend the toolbox for heterologous biosynthetic pathway design. Besides pathway enumeration of biosynthetic routes for a given target product, our methods have several other possible applications. For instance, they can be used in combination with gene deletion strategies in order to determine pathway manipulations leading to overproduction of the target compound. Another application is in biodegradation and bioremediation, where our algorithms would need to be slightly modified in order to reverse the pathway search so that it can identify degradation routes for a given compound, while the underlying structure of the algorithms remains still valid. Finally beyond metabolism, our algorithms could also be utilized in the context of chemical synthesis to enumerate all the possible routes linking a target molecule to a source set of starting reactants, enabling the search for the best routes in terms of production costs.

A web server is available: http://bioretrosynth.issb.genopole.fr/tools/metahype See details in Additional file 4.

JLF and PC designed the algorithms and the experiments. DF implemented the algorithms, and wrote the proof of the NP-completeness for the minimal constrained hyperpath problem. SBP wrote the example of pathway enumeration. PC implemented the web service prototype, performed the experiments and analyzed the results. All authors wrote the manuscript. All authors read and approved the final manuscript.

In [30] a reduction of the shortest-hyperpath problem to Minimum Set Cover (MC) is given. We have to adapt the proof to our case for two reasons: the definition of directed hypergraph that was used is more restrictive (they only admit hyperarcs *e _{i }*such that

Nonetheless the proof of NP-hardness they gave is valid for our more general hypergraphs and minimal hyperpaths because the set of directed hypergraphs employed in the reduction proof in [S1] is a sub-ensemble of the directed hypergraphs we defined above in the Definitions section and all the hypergraphs employed for the reduction are well defined as hyperpaths, independently of the way the incomplete definition they gave is completed. Since our definition is a way to complete the definition in [S1], then the two definitions agree on the set of hypergraphs employed for the reduction.

From these facts follows that the shortest hyperpath problem is an NP-hard problem. And, in particular, if the weights on hyperarc are non-negative, since hyperpaths always contain at least one minimal hyperpath, the shortest minimal hyperpath problem is NP-hard too.

The reason why the algorithms commonly used for the shortest path problem on graphs cannot be easily adapted for hypergraphs is that given the costs $W\left(\mathcal{P},{a}_{i}\right)$ for the hyperpaths ${A}_{i}\mathcal{P}$ leading to the vertices *a _{i}*, tails of a hyperarc

In order to define a shortest path problem that can be solved polynomially by a variant of Dijkstra algorithm, the additive cost functions have been introduced in [23] for the *B*-hyperpaths. We adapt below the notion of "additive" cost function for hyperpaths. A cost function $W\left(\mathcal{P},x\right)$ returning the cost for reaching the vertex *x *with the hyperpath $\mathcal{P}$ starting from a source *S *whose elements *s * *S *have *W*(*s*):= 0 is additive if *W *(*x*) is the minimum over all the arcs ${e}_{x}\mathcal{P}$ whose head contains *x *of *e _{x }*+

Consider a 3-SAT instance concerning *n *variables *σ _{i }*and

Given the hypergraph described above (whose size is linear in the size of the underlying 3-SAT problem) consider the minimal constrained hyperpath problem where all the hyperarcs *ε _{i }*are mandatory, and the target is

A solution of this problem gives in linear time a solution for the underlying SAT problem, which makes the problem of minimal constrained hyperpath an NP-complete problem. In fact, given a minimal hyperpath *M*, solution of this problem, for each *i *consider ${v}_{i}^{*}$ the only one of the two head vertices {*v*_{i+}, *v*_{i-}} belonging to the head of one or more of the *μ *arc in $\mathcal{M}$ (only one of the two vertices can belong to the head of a *μ *hyperarc in $\mathcal{M}$ because otherwise the hyperarc *ε _{i }*would be superfluous). The boolean assignments ${\sigma}_{i}={v}_{i}^{*}$ are a solution of the 3-SAT problem and, inversely if a solution of the 3-SAT problem exists then a minimal pathway satisfying the constraints exists and is the one obtained using only one of the hyperarcs for each

In Additional file 5, Figure S8 for simplicity we consider the reduction of a single-clause satisfaction problem to finding if a minimal hyperpath satisfying the constraints exists. There exist seven minimal hyperpaths connecting the target vertices to the source and satisfying the constraint that *ε*_{1}, *ε*_{2}, *ε*_{3 }are parts of the hyperpath. Each solution corresponds to a valid boolean assignment of the variables *σ*_{1}, *σ*_{2}, *σ*_{3}.

On many hypergraphs the algorithm enumerating the pathways only returns minimal hyperpaths, this is the case for the metabolic networks that we analyzed in the main sections of this paper. In this section we give a characterization of the hypergraphs where the algorithm *Minimize *solves the minimal constrained hyperpath problem, characterizing these instances helps to individuate which hypergraphs are expected to give an output only containing minimal hyperpaths.

Let *Y*(*R _{f}*) be the set of all the metabolites produced by reactions in

The well-separation condition holds for every choice of *R _{f }*in a hypergraph whose reactions have one only product, as the hypergraphs defined in [29]. If on the one hand, this condition can appear too constraining, on the other hand it can be generalized to larger sets of hypergraphs. For instance, the algorithm

Examples of hard instances can be found among the ones used for the proof of NP-completeness. In general, hard instances $\mathcal{H}$ of the enumeration problem have to violate the condition of well-separation for same choice of ${R}_{f}\mathcal{H}$, in order that the corresponding minimal constrained hyperpath problem becomes hard. This happens if several compounds are products of more than one reaction producing more than one compound.

This is the case for nested networks as the one in Additional file 6, Figure S9. While the given network is small enough to be solvable by hand, it contains nevertheless the principal ingredients of complexity that would asymptotically make harder the problem as the size of the instances grows.

Finding one minimal hyperpaths leading to the production of *v*_{8 }is a simple problem, but finding new ones gets more and more involved. This is a consequence of the fact that the nodes *v*_{1}, *v*_{2}, *v*_{3}, *v*_{4}, *v*_{5 }can be produced by different choices of the reactions *R*_{1}, *R*_{2}, *R*_{3}, *R*_{4}, *R*_{5 }and each of these reaction has more of one product susceptible to participate to the production of the target.

**Figure S1**. Distribution of graph hierarchies (Butts, C *J Stat Soft*, 24:1-50, 2008) in heterologous metabolic networks (0.169 ± 0.11) in comparison with the graph hierarchy of central (0.032), nucleotide (0.027), lipid (0.051), and amino acid (0.030) metabolic networks in *E. coli*.

Click here for file^{(103K, PDF)}

**Figure S2**. Performance comparisons for `FindPath, ExPA` and `efmtools` for run time per output and memory use in function of size of input and size of output.

Click here for file^{(162K, PDF)}

**An example of pathway enumeration with bootstraps**. An example of pathways enumeration with `Findpath` using bootstraps.

Click here for file^{(450K, PDF)}

**Availability and requirements**. Description of the available MetaHype web server for running the algorithms for KEGG compounds.

Click here for file^{(741K, PDF)}

**Figure S8**. Minimal constrained hyperpath problem reduction of a 3-SAT formula.

Click here for file^{(85K, PDF)}

**Figure S9**. Instance of minimal constrained hyperpath problem.

Click here for file^{(65K, PDF)}

Funding: Genopole^{® }through an ATIGE grant; ANR through a Chair of Excellence.

- Carbonell P, Planson AG, Fichera D, Faulon JL. A retrosynthetic biology approach to metabolic pathway design for therapeutic production. BMC Systems Biology. 2011;5:122+. doi: 10.1186/1752-0509-5-122. [PMC free article] [PubMed] [Cross Ref]
- Planson AG, Carbonell P, Paillard E, Pollet N, Faulon JL. Compound toxicity screening and structure-activity relationship modeling in Escherichia coli. Biotechnol Bioeng. 2011;109(3):846–850. [PubMed]
- Edwards J, Ramakrishna R, Schilling C, Palsson B. Metabolic Engineering, Marcel Dekker. 1999. pp. 13–57.
- Fell D. Metabolic Networks. Complex Systems and Interdisciplinary Science World Scientific. 2007;3:163–198.
- Llaneras F, Picó J. Which metabolic pathways generate and characterize the flux space? A comparison among elementary modes, extreme pathways and minimal generators. J Biomed Biotechnol. 2010;2010 [PMC free article] [PubMed]
- Bell SL, Palsson B. expa: a program for calculating extreme pathways in biochemical reaction networks. Bioinformatics. 2005;21(8):1739–1740. doi: 10.1093/bioinformatics/bti228. [PubMed] [Cross Ref]
- Terzer M, Stelling J. Large-scale computation of elementary flux modes with bit pattern trees. Bioinformatics. 2008;24(19):2229–2235. doi: 10.1093/bioinformatics/btn401. [PubMed] [Cross Ref]
- Motzkin TS, Raiffa H, Thompson GL, Thrall RM. Contributions to the theory of games. Vol. 2. Princenton, NJ: Princeton University Press; 1953. The double description method; pp. 51–73.
- Pharkya P, Burgard AP, Maranas CD. OptStrain: A computational framework for redesign of microbial production systems. Genome Res. 2004;14(11):2367–2376. doi: 10.1101/gr.2872004. [PubMed] [Cross Ref]
- de Figueiredo LF, Podhorski A, Rubio A, Kaleta C, Beasley JE, Schuster S, Planes FJ. Computing the shortest elementary flux modes in genome-scale metabolic networks. Bioinformatics. 2009;25(23):3158–3165. doi: 10.1093/bioinformatics/btp564. [PubMed] [Cross Ref]
- Pey J, Prada J, Beasley J, Planes F. Path finding methods accounting for stoichiometry in metabolic networks. Genome Biol. 2011;12(5):R49+. [PMC free article] [PubMed]
- Hatzimanikatis V, Li C, Ionita JA, Henry CS, Jankowski MD, Broadbelt LJ. Exploring the diversity of complex metabolic networks. Bioinformatics. 2005;21(8):1603–1609. doi: 10.1093/bioinformatics/bti213. [PubMed] [Cross Ref]
- Cho A, Yun H, Park JHH, Lee SYY, Park S. Prediction of novel synthetic pathways for the production of desired chemicals. BMC Systems Biology. 2010;4:35+. doi: 10.1186/1752-0509-4-35. [PMC free article] [PubMed] [Cross Ref]
- Croes D, Couche F, Wodak SJ, van Helden J. Metabolic PathFinding: inferring relevant pathways in biochemical networks. Nucleic Acids Res. 2005;33(suppl 2):W326–W330. [PMC free article] [PubMed]
- Croes D, Couche F, Wodak SJ, van Helden J. Inferring meaningful pathways in weighted metabolic networks. J Mol Biol. 2006;356:222–236. doi: 10.1016/j.jmb.2005.09.079. [PubMed] [Cross Ref]
- Faust K, Croes D, van Helden J. Metabolic Pathfinding Using RPAIR Annotation. J Mol Biol. 2009;388(2):390–414. doi: 10.1016/j.jmb.2009.03.006. [PubMed] [Cross Ref]
- Rahman SA, Advani P, Schunk R, Schrader R, Schomburg D. Metabolic pathway analysis web service (Pathway Hunter Tool at CUBIC) Bioinformatics. 2005;21(7):1189–1193. doi: 10.1093/bioinformatics/bti116. [PubMed] [Cross Ref]
- Kotera M, Hattori M, Oh MA, Yamamoto R, Komeno T, Yabuzaki J, Tonomura K, Goto S, Kanehisa M. RPAIR: a reactant-pair database representing chemical changes in enzymatic reactions. Genome Informatics. 2004;15:P062+.
- Kotera M, Okuno Y, Hattori M, Goto S, Kanehisa M. Computational assignment of the EC numbers for genomic-scale analysis of enzymatic reactions. J Am Chem Soc. 2004;126(50):16487–16498. doi: 10.1021/ja0466457. [PubMed] [Cross Ref]
- Romero P, Karp P. Nutrient-related analysis of pathway genome database. Pac Symp Biocomput. 2001. pp. 471–482. [PubMed]
- Cottret L, Milreu P, Acuna V, Marchetti-Spaccamela A, Viduani-Martinez F, Sagot M, Stougie L. Lecture Notes in Bioinformatics, Volume LNBI 5251. Springer-Verlag; 2008. Enumerating precursor sets of target metabolites in a metabolic network; pp. 233–244.
- Nielsen LR, Andersen KA, Pretolani D. Finding the K shortest hyperpaths. Comput Oper Res. 2005;32(6):1477–1497. doi: 10.1016/j.cor.2003.11.014. [Cross Ref]
- Gallo G, Longo G, Nguyen S, Pallottino S. Directed Hypergraphs and Applications. Discrete Appl Math. 1993;42:177–201. doi: 10.1016/0166-218X(93)90045-P. [Cross Ref]
- Klamt S, Gagneur J, von Kamp A. Algorithmic approaches for computing elementary modes in large biochemical reaction networks. IEE Proc Systems Biology. 2005;152(4):249–255. doi: 10.1049/ip-syb:20050035. [PubMed] [Cross Ref]
- Jevremovic D, Boley D, Sosa CP. Divide-and-Conquer Approach to the Parallel Computation of Elementary Flux Modes in Metabolic Networks. Parallel and Distributed Processing Workshops and Phd Forum (IPDPSW), 2011 IEEE International Symposium on, IEEE 2011. pp. 502–511.
- Schuster S, Fell D, Dandekar T. A general definition of metabolic pathways useful for systematic organization and analysis of complex metabolic network. Nat Biotechnol. 2000;18:326–332. doi: 10.1038/73786. [PubMed] [Cross Ref]
- Kanehisa M, Goto S, Furumichi M, Tanabe M, Hirakawa M. KEGG for representation and analysis of molecular networks involving diseases and drugs. Nucleic Acids Res. 2010;38:D355–D360. doi: 10.1093/nar/gkp896. [PMC free article] [PubMed] [Cross Ref]
- Acuna V, Chierichetti F, Lacroix V, Marchetti-Spaccamela A, Sagot M, Stougie L. Modes and cuts in metabolic networks: Complexity and algorithms. BioSystems. 2009;95:51–60. doi: 10.1016/j.biosystems.2008.06.015. [PubMed] [Cross Ref]
- Nielsen L, Andersen K, Pretolani D. Finding the
*K*shortest hyperpaths. Computers & Operations Research. 2005;32:1477–1497. doi: 10.1016/j.cor.2003.11.014. [PubMed] [Cross Ref] - Ausiello G, Italiano G, Nanni U. Optimal traversal of directed hypergraphs. Berkeley, CA: International Computer Science Institute; 1992.

Articles from BMC Systems Biology are provided here courtesy of **BioMed Central**

PubMed Central Canada is a service of the Canadian Institutes of Health Research (CIHR) working in partnership with the National Research Council's national science library in cooperation with the National Center for Biotechnology Information at the U.S. National Library of Medicine(NCBI/NLM). It includes content provided to the PubMed Central International archive by participating publishers. |