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

How to write GeneralODERule to SBML? #110

Closed
ayush9pandey opened this issue Jun 24, 2021 · 5 comments · Fixed by #108
Closed

How to write GeneralODERule to SBML? #110

ayush9pandey opened this issue Jun 24, 2021 · 5 comments · Fixed by #108
Assignees

Comments

@ayush9pandey
Copy link
Collaborator

SBML has a rule type called the "rate rule" which can have variables rates be specified (see here: http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_rate_rule.html). This seems the right kind of rule to write Bioscrape GeneralODERule with. However, SBML needs a rule_variable and a rule_formula object for a rule to be successfully created. I am not sure how to get these for the GeneralODERule. In particular, this line needs a fix :

assert(len(split_eqn) == 2) # Checking rule_dict equation structure.

Uncomment the SBML writing line number 72 in test_rules.py to recreate this error.

@ayush9pandey
Copy link
Collaborator Author

In hindsight, this issue should have been a comment on #107

@WilliamIX
Copy link
Collaborator

That looks correct to me. Rule_Variable should be the LHS and rule_formula the RHS of rule_dict['equation'].

One potential difference between SBML and Bioscrape is that rules can be applied to parameters OR species in Bioscrape. Can the SBML Rule Variable be a Species?

@ayush9pandey
Copy link
Collaborator Author

ayush9pandey commented Jun 24, 2021 via email

@WilliamIX
Copy link
Collaborator

I see - I misremembered how the ODE rule works. For an ODE dX/dt = f(x), target = 'X' and equation = f(x) is the proper way to do this.

@ayush9pandey
Copy link
Collaborator Author

The issue is fixed now.

@ayush9pandey ayush9pandey linked a pull request Jun 25, 2021 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants