TITLE: Introduction to flux balance analysis (FBA)
AUTHORS: Cailean Carter, Dipali Singh, Gemma Langridge

[DESCRIPTION]
Flux balance analysis (FBA) is a mathematical approach to finding an optimal net flow of mass through a metabolic network that follows a set of instructions defined by the user. This protocol covers the mathematical principles behind FBA and provides coding examples that can be followed using Python3. A basic understanding of the following aspects of linear algebra is advantageous: vectors, matrices, transposition, matrix multiplication, and matrix decomposition. 

[STEPS]
SECTION: Background
1. Flux balance analysis (FBA) is a mathematical approach to finding an optimal net flow of mass through a metabolic network that follows a set of instructions defined by the user. This protocol covers the mathematical principles behind FBA and provides coding examples that can be followed using Python3. A basic understanding of the following aspects of linear algebra is advantageous: vectors, matrices, transposition, matrix multiplication, and matrix decomposition. 

 

 

SECTION: Linear programming
2. FBA is built on a mathematical technique called linear programming (LP); a well-established method for solving optimisation problems that is applicable to any discipline (Dantzig, 1963). The main constituents of LP are functional units called “activities” which represent the behaviours being investigated like units of materials or rates of change (Watson, 1986). And it is the proportions of these activities that are optimised to either minimise or maximise the output of one or more activity called the objective function (  ). Activities can have an associated cost coefficient (  ), either literal cost or physical work, included in the objective function which is taken into consideration when calculating an optimum solution. Therefore, the objective function is to either maximise or minimise the equation
  
commonly expressed as
  
where    is a vector of all activities (Dantzig, 1963). While the objective function provides a purpose, the problem being addressed must have a list of requirements (called constraints) which limit the possible combinations of values for the activities (otherwise solutions could be 0 or infinite for all activities). Constraints represent the known or imposed limitations of a system that can be presented in mathematical form and must have linear relationships with the activity value. For example, an activity might have a quota to meet (  ) or cannot exceed a budget (  ). These concepts are called linear equalities and inequalities, respectively. It is plausible that there are none or an almost infinite number of feasible combinations of    that satisfy the constraints, yet the objective function tasks the programme with finding an optimum solution. This step can be performed using the simplex method which jumps between feasible solutions until the optimum solution is found (Dantzig, 1963). An example of how LP can be applied to a real-world scenario is discussed in Box 1.

SECTION: Box 1. Example of linear programming (LP) – the minimising UTI prescribing cost problem.
3. Scenario: A pharmacy wants to minimise its expenditure on first-line treatments for urinary tract infections (UTIs) to keep up with its monthly budget of £10,000. A full dose of trimethoprim costs £0.75 while nitrofurantoin costs £3.43. On average, the pharmacy prescribes 7,300 antibiotics for UTIs each month. However, at least 20% of cases will be prescribed nitrofurantoin due to high incidents of resistance to trimethoprim, thus, trimethoprim should make up at most 80% of the stock order. What is the optimum number of trimethoprim and nitrofurantoin doses the pharmacy should order to minimise cost?

 

 

 

 

The solution to this problem is 5,840 doses of trimethoprim and 1,460 doses of nitrofurantoin.
SECTION: Flux balance analysis
4. FBA uses the same mathematical principles as LP but includes some new concepts for analysing metabolic models. Firstly, the activities in FBA are chemical, enzymatic, and transportation reactions denoted by  . In this context, the activities are irrespective of enzyme and metabolite properties and environmental conditions, instead it is the combination of these factors as an economic process called flux (Orth et al., 2010). For ease of use, all the metabolic information of an organism is stored in a mathematical matrix; where each column represents a reaction containing the stoichiometric coefficients of metabolites in rows and is called the stoichiometry matrix  . 

FBA involves a steady state assumption whereby the quantity of metabolites within the system cannot change. This is to prevent metabolites from having unrealistic quantities particularly when the actual quantity of metabolites present in a sample is unknown (Holzhütter, 2004). This may seem counterintuitive as an organism needs to catabolise metabolites for energy and growth. To address this, some metabolites have external equivalents (denoted by the prefix X) and are not included in the stoichiometry matrix. Instead, the transporters are included with the stoichiometry coefficient for the internal metabolite only, thereby defining the inputs and outputs of the network. Also, steady state provides the first set of constraints for the LP as the rate of change for all internal metabolites must equal zero. Therefore, the flux of all reactions involved in the production/consumption of a metabolite   must equal zero:
  
Thus, if   carried 1 unit of flux then   must carry -1 unit of flux for the equation to be balanced - hence flux balance analysis. Further, the list of equations derived from the steady state assumption is called the mass balance equations. The flux values carried by a reaction represent the net conversion of the metabolites as reactions can be reversible (carrying flux in both directions) and be the amalgamation of several reactions (or pathways) into one activity (Watson, 1986). For simplicity, steady state is represented by   in the LP formulation and all the combinations of   that satisfy this equation is called the null space. It is possible to identify what combinations of reactions can carry flux under steady state by calculating the null space of the stoichiometry matrix; this includes feasible routes from inputs to outputs and cyclical pathways called conserved moieties (Box 2). However, null space analysis is limited by not taking the directionality of reactions into consideration, whereas FBA does take this into account.

The objective function for FBA is to maximise or minimise the absolute total flux through one or more reactions - absolute because reactions can carry negative flux. A weighting attribute (denoted by  ) is used instead of a cost coefficient to better reflect its function in the analysis and is given the default value of 1. Therefore, the objective value in FBA is to minimise or maximise the equation:
  

Whether the choice of objective function is representative of the metabolism within an organism is debatable but does, nonetheless, provide valuable insights into the metabolic processes (Schuetz et al., 2007). Constraints relating to the investigation are added as (in)equality constraints on the flux of a reaction and/or by applying a weighting factor other than 1. LP is then used to find a combination of flux values that most likely represents the metabolism of the organism. A demonstration of this is provided in Box 3. 

 


SECTION: Box 2. Finding the null space of a stoichiometry matrix.
5. (A) Small network map containing internal metabolites  , external metabolites  , and arrows representing the reactions   connecting metabolites. The stoichiometry matrix of this network is
shown in (B) and contains the stoichiometric coefficients of the metabolites involved: a positive value denotes produced, negative consumed, and zero for not involved. Null space can be calculated using a computer directly from the stoichiometry matrix. In the Python code (C), a method called single value
decomposition is used to find the null space which outputs a matrix of fractions. This matrix is then normalised with lower-upper (LU) decomposition and made human readable by removing sign ambiguity and rounding of the numbers. The result is a matrix called the kernel (D) where each column contains a
combination of reactions that can carry flux under steady state. The output in (C) contains fractions for the first column as it envelopes the conserved moiety solution identified in the second solution/column. Therefore, the result in column 1 recognises that R3 can be part of this solution. 

 
B)     

 

D)   

    


 

SECTION: Box 3. Example of flux balance analysis (FBA) on a small metabolic network.
6. (A) The network contains internal metabolites   whose concentration must remain balanced,
external metabolites   whose abundance can be unbalanced (like growth media and biomass components), and arrows representing the reactions    connecting metabolites. (B) The network is
represented in a mathematical grid called the stoichiometry matrix  , with columns of reactions   and rows of internal metabolites  . The contents of the grid denote whether a metabolite is produced (positive), consumed (negative), or not involved (zero) in each reaction. (Eq. 2) An LP formulation is then formed to address the research question, including the objective function of minimising absolute total flux and the steady state constraints. Additional constraints are included that represent the demands imposed by the research question. Also, the steady state mass balance equations represent the rows in the stoichiometry matrix. (C) Python code can be used to solve this equation with an LP function using the simplex method. The output is the optimum solution to the research question.
 
B)   

 

 

 
Solution is   
SECTION: Further reading &amp; applications of FBA
7. The examples in this protocol (Boxes 1 & 3) were intended to provide an introduction into the applications of LP and FBA that could be taken towards understanding the literature and/or pursuing metabolic modelling. As such, we recommend exploring some of the early literature utilising FBA:
Watson (1986) described the reconstruction of metabolic pathways into a computerised format and the interrogation of core metabolic pathways.
Fell & Small (1986) explored how glucose was converted to fat in rat adipose tissues.
Varma & Palsson (1994) investigated a model of E. coli and incorporated experimental data as constraints.

Current applications of metabolic modelling have been covered extensively by others (Gu et al., 2019). But, briefly, metabolic modelling using FBA can be invaluable in identifying drug targets (Hartman et al., 2014), optimising bio-production (Trinh et al., 2008), and there is recent progress towards modelling bacterial communities from metagenomes (Frioux et al., 2020). The breadth of applications is indicative of FBA's effectiveness in helping researchers and industries to understand complex biological networks and tackle wicked problems. 

Ideally, this protocol has explained why and how FBA has been used in the literature and encourages more researchers to try FBA.