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

bug: simplifyModel with irreversible backwards-only reactions #529

Closed
1 task done
edkerk opened this issue Feb 26, 2024 · 0 comments
Closed
1 task done

bug: simplifyModel with irreversible backwards-only reactions #529

edkerk opened this issue Feb 26, 2024 · 0 comments
Labels
fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.

Comments

@edkerk
Copy link
Member

edkerk commented Feb 26, 2024

Description of the issue:

Reactions that are defined backwards-only (so lb<0 and ub=0) could arguably have their rev field as 0. But this raises a problem when simplifyModel is run with deleteInaccessible is set as true. In this line:

revS=[reducedModel.S,reducedModel.S(:,reducedModel.rev~=0)*-1 I(:,in) I(:,out)*-1];

The S-matrix is expanded with inverted versions of reversible reactions (the reducedModel.rev~=0 part), to consider that reactions can have a negative flux. But for the above case (backwards-only & irreversible), these reactions are not included. Arguably, it is not interesting anyway what the value of the rev field is, what is important is whether the reaction can carry a negative flux.

This should therefore be changed to:

revS=[reducedModel.S,reducedModel.S(:,reducedModel.lb<0)*-1 I(:,in) I(:,out)*-1];

I hereby confirm that I have:

@edkerk edkerk mentioned this issue Feb 26, 2024
2 tasks
@edkerk edkerk added the fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch. label Apr 26, 2024
@edkerk edkerk mentioned this issue May 2, 2024
2 tasks
@edkerk edkerk closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.
Projects
None yet
Development

No branches or pull requests

1 participant