Skip to content
New issue

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

User defined degradation/creation leads to wrong stoichiometry #192

Closed
formersbach opened this issue Sep 13, 2022 · 0 comments · Fixed by #193
Closed

User defined degradation/creation leads to wrong stoichiometry #192

formersbach opened this issue Sep 13, 2022 · 0 comments · Fixed by #193
Labels
bug Something isn't working text2model Text-to-model conversion

Comments

@formersbach
Copy link
Contributor

Description:

When using '0' or '∅' in a user defined reaction, 0/∅ is added to the list of species and to the stoichiometric matrix.

Reproduce:

Text file containing:

@rxn 0 --> A: p[kf]

Convert to model:

from biomass import Text2Model, create_model
model = Text2Model("test.txt")
model.convert(overwrite=True)
print(model.stoichiometry_matrix.toarray(), model.species)

Expected:

model.stoichiometry : [1]
model.species: A

Observed:

model.stoichiometry : [-1, 1]
model.species: 0, A

@formersbach formersbach added bug Something isn't working text2model Text-to-model conversion labels Sep 13, 2022
@formersbach formersbach linked a pull request Sep 13, 2022 that will close this issue
himoto pushed a commit that referenced this issue Sep 14, 2022
* 0 and ∅ not added as species for user defined function

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change explicit list to self.nothing

* Fix merge conflict of last commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working text2model Text-to-model conversion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant