Closed aabversteeg closed 7 years ago
Thanks for your interest in cobrapy and cameo. You are raising a topic that has become something of a pet-peeve here. That ice cream example is actually not very well corresponding to models of metabolic flux since it assigns a variable to the stoichiometry of products/reactants in a reaction, but those are of course more commonly thought of a fixed, i.e. it takes six CO2 to create one C6H12O6 and that is fixed, not something that one needs to model, hence rarely any need for the attribute ._constraint_sense
of a Metabolite (the little underscore also indicates that it is private and not really meant to be fully supported)..
For what that documentation is trying to convey, the possibility to easily formulate problems and solve these using dedicated optimisers, please have a look at optlang instead and the basic example in the readme there which shows how to solve problems like the ice cream example without contrived analogies to metabolism.
The difference cameo/cobrapy is that cameo never implemented this as it directly uses optlang and thereby (intentionally) doesn't support for ._constraint_sense
.
In the near future, that part of cobrapy documentation will be removed as cobrapy also makes the switch to optlang and the functionality will thereby be dropped so please just ignore that chapter, but cheers for pointing it out and yes you are right we should update the docs in cameo.
Thank you for the clarification as well as for referring me to the optlang example. It is indeed a better example of imposing constraints on the model. I do not consider the docs lacking much. Just this one point seemed missing, but after all was only due to my misunderstanding.
Hello,
I have been trying to perform the cobrapy's Ice Cream example (https://cobrapy.readthedocs.io/en/latest/milp.html) in cameo:
For cameo this results in the following:
And for cobrapy in (I was not sure how to display the expression of the objective function, there are however both maximized):
First of the fluxes differ, secondly the y-value correspond to metabolites and reactions for cobrapy and cameo, respectively. Clearly, I'm missing something here. I would greatly appreciate any explanation on this matter. Also I believe it would be good to state information explaining these differences on the cameo vs cobrapy page (http://cameo.bio/development.html#cameo-vs-cobrapy).
Thank you in advance