# 2. BOFdat step2¶

## 2.1. Finding coenzymes and inorganic ions¶

[1]:

from BOFdat import step1
from BOFdat import step2
from BOFdat.util import update
import cobra
import pandas as pd


## 2.2. Example using the E.coli genome-scale model iML1515 and the biomass objective function generate in BOFdat step1¶

Coenzymes and inorganic ions double with the cell and should therefore be included in the biomass objective function. Finding what metabolites to add to the BOF can be a daunting task. BOFdat step2 aims to reduce this burden.

### 2.2.1. Steps¶

1. Find coenzymes and inorganic ions
2. Update biomass

### 2.2.2. Find coenzymes and inorganic ions¶

The coenzymes are metabolites that are re-newed after use. The transformed co-enzyme is converted back to the original through another reaction. This definition informs about the promiscous nature of coenzymes: they are used in many reactions. Using this particularity, BOFdat finds the coenzymes in the metabolic network by identifying the number of reactions in which the each metabolite participates and selecting the most promiscous. Metabolites excluded a priori include those that were added in BOFdat step1 (ATP, ADP, Pi,PPi, H+, H2O).

### 2.2.3. Find inorganic ions¶

Few experimental approaches can determine the inorganic ion composition of a cell. Hence, BOFdat defaults to a biased approach based on current knowledge to define the ionic composition of the cell. Xavier et. al.(2017) have studied the biomass composition of 72 published models available in the BiGG database at the time of publication. Their list of universal components is a valuable resource for the modelling community. BOFdat uses the list of inorganic ions identified in this study and compares them with the list of metabolites of the submitted reconstruction.

These two categories are combined into one function call in BOFdat:

[2]:

path_to_model = 'data/iML1515.json'

[3]:

selected_metabolites = step2.find_coenzymes_and_ions(path_to_model)

Generating list of solvable metabolites


### 2.2.4. Determine coefficients¶

[10]:

from BOFdat.util.update import determine_coefficients
WEIGHT_FRACTION = 0.05
bd_step2 = determine_coefficients(selected_metabolites,model,WEIGHT_FRACTION)


### 2.2.5. Update biomass¶

All the dictionaries have been generated. Now it would be fun to start playing with the model. Actually BOFdat allows you to use the generated dictionaries to update and buff your BOF experimental data. Just buff that!

[7]:

#Get the input from the previous step
path_to_biomass = 'data/bofdat_step1.csv'
bd_step1 = update.convert_to_dictionary(path_to_biomass)
bd_step2.update(bd_step1)
update.save_biomass(bd_step2,'data/bofdat_step2.csv')