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

Enable to tag ReactionRules in a Model #115

Open
kaizu opened this issue Apr 13, 2016 · 1 comment
Open

Enable to tag ReactionRules in a Model #115

kaizu opened this issue Apr 13, 2016 · 1 comment

Comments

@kaizu
Copy link
Member

kaizu commented Apr 13, 2016

For grouping ReactionRules in a Model, the Model class should provide the interface to tag them as something like the followings:

with reaction_rules():
    A > B | 1 | _tag('upstream')
    B > C + D | 2 | _tag('upstream')
    C > ~C | 3 | _tag('downstream', 'degradation')
    D > E | 4 | _tag('downstream')
    E > ~E | 5 | _tag('downstream', 'degradation')

m = get_model()
print(len(m.get_reaction_rules_by_tag('upstream')))  # => 2
@kaizu
Copy link
Member Author

kaizu commented Apr 13, 2016

with reaction_rules_with_tag():
    A > B | 1 | _tag(upstream)
    B > C + D | _tag(upstream)
    C > ~C | 3 | _tag(downstream, degradation)
    D > E | 4 | _tag(downstream)
    E > ~E | 5 | _tag(downstream, degradation)

@kaizu kaizu modified the milestones: v4.0.x, v4.1.x Mar 14, 2017
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

1 participant