2. pyTFA models¶
pyTFA models are based on COBRApy models, with
additional values.
2.1. Compartment data¶
This is the compartments attribute of the model. It is a dict where
each key is the symbol of a compartment, and the value is another dict
with the following keys :
c_min |
|
c_max |
|
ionicStr |
|
membranePot |
Each key is the symbol of another compartment (which is the destination compartment), and the value is the potential (in mV) from the source to the destination. |
name |
|
pH |
|
symbol |
|
Here is an example:
cobra_model.compartments['c'] = {
'c_max': 0.01,
'c_min': 9.9999999999999995e-08,
'ionicStr': 0.25,
'membranePot': {
'c': 0,
'e': 60,
'g': 0,
'm': -180,
'n': 0,
'p': 0,
'r': 0,
't': 0,
'v': 0,
'x': 0
},
'name': 'Cytosol',
'pH': 7.0,
'symbol': 'c'
}
2.2. Metabolites¶
Each metabolite must be annotated with its SeedID, which will be used to get
the thermodynamic values from the Thermodynamic Databases. In order to do this, use the
annotation attribute of each
metabolite. Here is an example:
cobra_model.metabolites[0].annotation = {
'SeedID': 'cpd00018'
}
pyTFA will also define a thermo a thermo attribute for each metabolite,
which is a pytfa.thermo.MetaboliteThermo.
2.3. Reactions¶
pyTFA will define a thermo attribute for each reaction. It is a
dict with the following attributes:
computed |
|
deltaGR |
If the thermodynamic values were not computed, this is
|
deltaGRerr |
If the thermodynamic values were not computed, this is
|
deltaGrxn |
|
isTrans |
|
Here are some examples:
cobra_model.reactions[0].thermo = {
'computed': False,
'deltaGR': 10000000,
'deltaGRerr': 10000000,
'isTrans': False
}
cobra_model.reactions[99].thermo = {
'computed': True,
'deltaGR': 1.161097833014658,
'deltaGRerr': 2,
'deltaGrxn': 0,
'isTrans': True,
}