-
Hello, I am working with MICOM to model a co-culture, but I have doubts on how to define the exchange fluxes. If I use the grow workflow like this:
I have also tried constraining directly some uptakes in the models. com.optimize()
sol = com.optimize()
print(sol)
print(sol.members)
sol = com.optimize(fluxes=True, pfba=False)
for i in sol.fluxes:
print('{}\t{}\t{}\t{}'.format(i,sol.fluxes[i]['auto'],sol.fluxes[i]['kluy'],sol.fluxes[i]['medium'])) But I get weird results. How should I define the exchange reactions? In my models, the reactions are defined like this EX_XX_e => , so uptake is negative, and production is positive. Are the EX_XX_m reactions defined the other way around? Thanks a lot, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You are very close. The flux values in your medium definition have to be numbers not string. So using medium= {'reaction': ['EX_CO_m', 'EX_H2_m'],'flux': [22.0,0],'metabolite':['CO_m','H2_m']} #Use + ub
df_medium=pd.DataFrame(medium) That should run, but you probably will see a growth rate of zero since no organism will be able to grow on CO alone. So you will need a more complete medium. You don't need to worry about the direction of your exchanges. MICOM figures this out by itself. So the fluxes in the medium are always positive when you specify them. |
Beta Was this translation helpful? Give feedback.
-
I have just seen the error as well, thanks a lot! I see some metals, phosphate, etc being uptaken, I get some growth in one of the species, but not in the other one. So, there might be some bounds that don't allow flux. Also, can I change somewhere the total community biomass? Thanks, |
Beta Was this translation helpful? Give feedback.
-
I have figured out what the issue was! |
Beta Was this translation helpful? Give feedback.
I have figured out what the issue was!