-
Notifications
You must be signed in to change notification settings - Fork 13
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
Graph representation of biological model #131
Conversation
…aph.py. Minor changes to exec_model.py to make create_graph callable on model object.
for more information, see https://pre-commit.ci
This pull request introduces 1 alert when merging 92640c6 into f7d3484 - view on LGTM.com new alerts:
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This pull request introduces 1 alert when merging cda1212 into f7d3484 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging bce630c into f7d3484 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @formersbach, Thanks a million for implementing a graph visualization method!
Overall, this update is amazing. The code needs minor update before merging into master.
biomass/graph.py
Outdated
import os | ||
import re | ||
import warnings | ||
from ast import Is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@formersbach from ast import Is
Can you please remove this unused import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weirdly this import was not added by me (at least not intentionally). I'll remove it, but do you have any idea where it might've come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is from VScode auto-import when you type "Is". I sometimes face the same problem.
biomass/graph.py
Outdated
def to_graph( | ||
self, | ||
save_path: str, | ||
gviz_prog: str = "dot", | ||
): | ||
""" | ||
Constructs and draws a directed graph of the model using ode.py/reaction_network.py as text files. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@formersbach It would be better to add Parameters and Examples section to docstring. I would like you to follow numpydoc style.
…o pass graphviz arguments
for more information, see https://pre-commit.ci
Thanks @formersbach! I have updated docs and will soon merge your work into master. |
Will add support for graphic representation of biological model.
Requires graphviz program and pygraphviz package.
Minor changes to exec_model.py to make create_graph callable on model object.