We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have noticed some strange behaviour when adding a reaction that contains the same metabolite on both sides:
from cobra import Model, Reaction, Metabolite model = Model("test") A = Metabolite("A", formula="C1", name="Substance A", compartment="c") B = Metabolite("B", formula="C2", name="Substance B", compartment="c") C = Metabolite("C", formula="C3", name="Substance C", compartment="c") reaction = Reaction("new_reaction") reaction.name = "Test reaction" reaction.add_metabolites({A: -1.0, B: -1.0, A: 1.0, C: 1.0}) print reaction.reaction model.add_reaction(reaction)
output is
B --> C + A
instead of
A + B --> C + A
I'm working with cobra 0.3.0.dev.
The text was updated successfully, but these errors were encountered:
A python dict requires unique keys. If you include A twice in the dict as you define it, it will only keep the second definition.
>>> {"a": -1, "a": 1} {'a': 1}
So cobrapy is handling what it is being given correctly.
Sorry, something went wrong.
No branches or pull requests
I have noticed some strange behaviour when adding a reaction that
contains the same metabolite on both sides:
output is
instead of
I'm working with cobra 0.3.0.dev.
The text was updated successfully, but these errors were encountered: