Replies: 10 comments
-
Are you reading from the Matlab model? This field does not seem to be part of mat file specification. Maybe you meant the "C" field? That one is not supported by the COBRAPY parser for now. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yep you can certainly do that manually. Coupling constraints are constraint of the form rxn = model.reactions.my_reaction
biomass = model.reactions.biomass_reaction
c = 20000
coupling = model.problem.Constraint(
rxn.flux_expression - c * biomass.flux_expression,
ub=0,
name="coupling_my_reaction"
)
model.add_cons_vars([coupling]) |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer but can't undrestand how can I multiply biomass (which an rxn by an integer) ? I 'm not sure that I undrestand what I will put here in place of my_reaction and biomass_reaction, the id of each one ? and what do you mean by v(flux variable?) please ? |
Beta Was this translation helpful? Give feedback.
-
Sorry, my bad. I fixed the code example. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer : please how to deal with reactions that have an id begins with number like this in cobrapy: |
Beta Was this translation helpful? Give feedback.
-
By using, |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. Can you please how can I check if these constraints are successfully added to the model because I'm trying to |
Beta Was this translation helpful? Give feedback.
-
It would be |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Problem description
Please explain:
Problem description
Hello I'm trying to access to the coupling constraints of the whole body metabolism with cobrapy but I m getting this error . Is that another way to find coupling constraints with cobra py please?
Code Sample
Code Sample
Create a minimal, complete, verifiable example.
Context
Beta Was this translation helpful? Give feedback.
All reactions