EPFL-LCSB / pytfa

A Python 3 implementation of Thermodynamics-based Flux Analysis
https://lcsb.epfl.ch/
Apache License 2.0
38 stars 26 forks source link

metabolomics integration #11

Closed svevol closed 6 years ago

svevol commented 6 years ago

Hi,

do you plan to implement the integration of metabolomics (absolute metabolite concentrations) for dG calculation?

psalvy commented 6 years ago

Hi Svetlana, I am not sure what you mean by your question. Concentrations (in log form) are part of the TFA formulation as variables. That means that if you know that your concentration of ATP is, for example, between 5e-3 and 3e-2, you can write (assuming correct ids, variable names etc):

from math import log
mymodel.log_concentration.atp_c.variable.lb = log(5e-3)
mymodel.log_concentration.atp_c.variable.ub = log(3e-2)

This will constrain the dG according to your concentration measurements for cytosolic ATP. As a reminder, the dG (not the dGo) takes activity (here, concentrations) into account for its calculation. You can find a more detailed explanation in those papers:

EDIT: mymodel.log_concentrations <--- mymodel.log_concentration

svevol commented 6 years ago

Hi, this is exactly what I mean, thanks. Correct way would be to run like that, without s in the end. Just for the record if someone will be looking for this function. from math import log mymodel.log_concentration.atp_c.variable.lb = log(5e-3) mymodel.log_concentration.atp_c.variable.ub = log(3e-2)

psalvy commented 6 years ago

Oh yes, my bad. Thank you for your question, I will add this to the documentation :) Cheers, Pierre