micom-dev / micom

Python package to study microbial communities using metabolic modeling.
https://micom-dev.github.io/micom
Apache License 2.0
82 stars 17 forks source link

Export optcom results #10

Closed arianccbasile closed 3 years ago

arianccbasile commented 4 years ago

Hello, I am running optcom on different communities with sol=com.optcom(strategy='original', min_growth=0.0, fluxes=False, pfba=True) and I would like to export automatically the growth rates of all microbial models in the community. I tried sol.growth_rate and sol.objective_value but in both cases I get the growth rates of the community and not of each single metabolic model. How can I solve this issue?

Best, Arianna

cdiener commented 4 years ago

That info is contained in sol.members. I would recommend using com.cooperative_tradeoff over com.optcom. The implementation of OptCom here is not the original method that uses a "real" multi-objective, so it usually does not give you a unique solution even though strategy="original" implies the opposite (sorry).

arianccbasile commented 4 years ago

Thank you for answering. I would like to be free to choose but unfortunately a reviewer asked me to use OptCom. :( Thank you for your honesty, btw.