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

setFluxBoundsFromDict can only update all reaction bounds. #26

Open
JulLis opened this issue Nov 4, 2020 · 2 comments
Open

setFluxBoundsFromDict can only update all reaction bounds. #26

JulLis opened this issue Nov 4, 2020 · 2 comments
Assignees
Milestone

Comments

@JulLis
Copy link

JulLis commented Nov 4, 2020

If passing a dict with only a subset of all reaction bounds the function fails.
If you change the first line from:
fbids = self.getFluxBoundIds()
to
fbids = bounds.keys()
you can change all bounds if they are included in the bounds dict or only a subset.

@bgoli
Copy link
Member

bgoli commented Nov 4, 2020

Thanks for this, you have brought up something interesting here, this function does not actually do what one thinks it does. It treats every fluxbound (lower and upper, so two per reaction) as an individual object and was meant to work with the getAllFluxBounds method.

This is an artifact of supporting the original FBC specifications and now that I look at it, is not so useful. I will add the functionality to update all the reaction bounds from a (partial) dictionary that looks like this:

fbounds = {'rid1' : (lb1, ub1),
           'rid2' : (lb2, ub2),
            ...
}

would that work for you?

In the meantime I suggest iterating over our reaction id's and use this function

 cmod.setReactionBounds(rid, lower, upper)

@bgoli bgoli self-assigned this Nov 4, 2020
@bgoli bgoli added this to the Release 0.8.0 milestone Nov 4, 2020
@JulLis
Copy link
Author

JulLis commented Nov 4, 2020 via email

@bgoli bgoli modified the milestones: Release 0.8.0, Release 0.8.1 Feb 2, 2021
@bgoli bgoli modified the milestones: Release 0.8.1, Release 0.8.2 Jul 21, 2021
@bgoli bgoli modified the milestones: Release 0.8.3, Release 0.8.5 Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants