sys-bio / tellurium

Python Environment for Modeling and Simulating Biological Systems
http://tellurium.analogmachine.org/
Apache License 2.0
106 stars 36 forks source link

programmatically visualizing Antimony models using Python #194

Open yarden opened 7 years ago

yarden commented 7 years ago

Hello,

Thank you all again for tellurium; it's a fantastic package. In various docs, there are sometimes visualizations of simple models in Antimony/SBML (like this). Is there a way to programmatically plot, ideally from Python, such visualizations of simple Antimony models? I know I can save my Antimony model as SBML and then load it up into an external tool, like CellDesigner, but I'd like to make the visualizations programmatically.

Thanks very much.

0u812 commented 7 years ago

Hi Yarden, there is a network layout tool in the IDE version of Tellurium under View->Panes->Network Viewer, but it wasn't used to produce that particular diagram. If you could let us know what section of the docs it came from, we might be able to figure out what tool was used to produce it.

yarden commented 7 years ago

Thanks very much. Is there a way to use Tellurium to make the visualization from Python without going through the IDE? The diagram I linked to is from this doc page: http://pythonscriptingmanual.readthedocs.io/en/latest/building_sbml_models_using_tellurium.html

Thanks.

kirichoi commented 7 years ago

Hi @yarden, Unfortunately, support for network visualization in native Python in general is relatively lacking. However, if you are using Windows version of Tellurium, or are willing to manually install graphviz, Tellurium does have function called draw() to plot networks. Just make sure that graphviz binaries are accessible from Python. FYI, we intend to extend our network graph plugin in the future so that one can generate network plot without going through IDE or install graphviz.

matthiaskoenig commented 7 years ago

Hi @yarden, you can also use cytoscape, CyREST and cy3sbml for network visualization.

A python workflow is depicted in https://github.com/matthiaskoenig/cyrest-challenge/blob/master/README.md https://github.com/matthiaskoenig/cyrest-challenge/blob/master/cyrest-challenge.ipynb

Best Matthias