Question about Max-min Driving Force(MDF) Calculation

86 views
Skip to first unread message

wentong yu

unread,
Jun 2, 2020, 3:20:16 AM6/2/20
to eQuilibrator Users
Hello,

I'm trying to calculate MDF using equilibrator_api.I run the code
bounds = equilibrator_api.Bounds(default_lb=Q_("1 uM"), default_ub=Q_("10 mM"))
pp = equilibrator_api.Pathway(reactions, fluxes_np, bounds=bounds,
                              p_h=p_h, ionic_strength=ionic_strength, temperature=temperature)

mdf_data = pp.calc_mdf()
.But I find the cofactors bounds also changed.I check the bounds.py file and find the cofactors concentration bounds were considered by the cofactors.csv file.I wonder if it's possible to ensure the cofactors concentration bounds set by the cofactors.csv file when calculating the pathway MDF?Maybe,Could you please tell me which step I set was wrong?

Thank you,
Wentong

Elad Noor

unread,
Jun 2, 2020, 7:41:36 AM6/2/20
to eQuilibrator Users
Dear Wentong,

First, there was a recent change to the repository. Now, the MDF function has been moved to a new package called `equilibrator-pathway`. Latest version is 0.3.1
Nothing else has changed, essentially, but I still recommend using that instead to get the latest updates.

Regarding the bounds. You can try this:
from equilibrator_api import ComponentContribution, Q_
from equilibrator_pathway import Bounds, Pathway

bounds
= Bounds.GetDefaultBounds()
bounds
.default_lb = Q_("1 uM")
bounds.default_ub = Q_("10 mM")

comp_contrib = ComponentContribution()
comp_contrib.p_h = p_h
comp_contrib.ionic_strength = ionic_strength
comp_contrib.temperature = temperature
pp = Pathway(reactions, fluxes_np, bounds=bounds, comp_contrib=comp_contrib)
mdf_data = pp.calc_mdf()


I hope this is helpful. Best,
Elad

wentong yu

unread,
Jun 2, 2020, 9:53:04 PM6/2/20
to eQuilibrator Users
Dear Elad,

Thank you for getting back to me. Unfortunately, the code you provided didn't work.It remind me that 
TypeError: GetDefaultBounds() missing 1 required positional argument: 'cc'
.At the same time,an error happend when run the code calculating the single reaction deltaG after the equilibrator-pathway package installation.I don't know whether the equilibrator-pathway package will influence the equilibrator_api package.It sounds inconceivable but is the naked truth.I supply my code file and inputfile below, I hope you can give me some suggestions.

Best,
Wentong

在 2020年6月2日星期二 UTC+8下午7:41:36,Elad Noor写道:
eQuilibrator_calculate.ipynb
example_pathway_ethanol_fermentation.xlsx

Elad Noor

unread,
Jun 3, 2020, 4:04:51 AM6/3/20
to eQuilibrator Users
Actually, when you install the latest version of equilibrator-pathway, it also will update your equilibrator-api version and therefore some syntax has changed.

I made the necessary changes to your script and now it is working (see the attached notebook).

eQuilibrator_calculate.ipynb

wentong yu

unread,
Jun 3, 2020, 4:27:56 AM6/3/20
to eQuilibrator Users
Hi Elad,

Thank you for your help,it works now.

Wentong

在 2020年6月3日星期三 UTC+8下午4:04:51,Elad Noor写道:
Reply all
Reply to author
Forward
0 new messages