GithubHelp home page GithubHelp logo

lolab-msm / pyvipr Goto Github PK

View Code? Open in Web Editor NEW
27.0 7.0 4.0 24.04 MB

Jupyter widget for the dynamic and static visualizations of systems biology models written in PySB, BNGL, and SBML

License: MIT License

Python 26.44% JavaScript 5.79% CSS 0.47% Jupyter Notebook 67.30%
jupyter-widget pysb systems-biology cytoscapejs visualization network-visualization networkx sbml bionetgen sbgn

pyvipr's Introduction

pyViPR

Documentation Status Binder

Gitter

PyViPR

PyViPR is a Jupyter widget that generates network dynamic and static visualizations of PySB, Tellurium, BNGL, SBML, and Ecell4 models using Cytoscape.js. Additionally, it can be used to visualize networks encoded in the graphml, sif, sbgn xml, cytoscape json, gexf, gml and yaml formats.

Trying it online

To try out PyViPR interactively in your web browser, just click on the binder link below:

Binder

Installation

From conda

To use with Jupyter Notebooks:

> conda install pyvipr -c ortegas

To use with JupyterLab:

> conda install pyvipr -c ortegas
> jupyter labextension install @jupyter-widgets/jupyterlab-manager
> jupyter labextension install pyvipr

From PyPI

To use with Jupyter Notebooks:

> pip install pyvipr

To use with JupyterLab:

> pip install pyvipr
> jupyter labextension install @jupyter-widgets/jupyterlab-manager
> jupyter labextension install pyvipr

From git (requires npm)

$ git clone https://github.com/LoLab-VU/pyvipr.git
$ cd pyvipr
$ pip install .

How to use the widget

After installing the widget, it can be used by importing it in the Jupyter notebook. The widget is simple to use with PySB models, SimulationResult objects, Tellurium models and BNGL & SBML files.

PyViPR has three main interfaces: Graph formats, PySB, and a Tellurium.

Graph formats interface

This interface leverages NetworkX and Cytoscape.js to generate network visualizations of graphs encoded in different file formats.

Graphml example:

import pyvipr.network_viz as nviz

nviz.graphml_view('path_to_file/mygraph.graphml', layout_name='fcose')

graphml_view

PySB interface

PySB is needed to visualize PySB models and it is needed if you want to use the pyvipr.pysb_viz module:

Installing PySB from pip:

> pip install pysb

When using pip the installation of PySB requires to manually install BioNetGen into the default path for your platform (/usr/local/share/BioNetGen on Mac and Linux, c:\Program Files\BioNetGen on Windows), or set the BNGPATH environment variable to the BioNetGen path on your machine.

Installing PySB from conda:

> conda install pysb -c alubbock

PySB static example:

import pyvipr.pysb_viz as pviz
from pyvipr.examples_models.lopez_embedded import model

pviz.sp_comm_louvain_view(model, random_state=1, layout_name='klay')

species_view_pysb

PySB Dynamic Example:

import pyvipr.pysb_viz as pviz
from pyvipr.examples_models.mm_two_paths_model import model
from pysb.simulator import ScipyOdeSimulator
import numpy as np

tspan = np.linspace(0, 1000, 100)
sim = ScipyOdeSimulator(model, tspan).run()
pviz.sp_dyn_view(sim)

enzymatic_reaction

Tellurium interface

Tellurium is needed to visualize Tellurium models and it is needed if you want to use the pyvipr.tellurium_viz module:

Installing Tellurium from pip:

> pip install tellurium
import tellurium as te
import pyvipr.tellurium_viz as tviz

model = te.loadSBMLModel("https://www.ebi.ac.uk/biomodels-main/download?mid=BIOMD0000000001")

tviz.sp_view(model)

species_view_tellurium

Documentation

To get started with using PyViPR, check out the full documentation

https://pyvipr.readthedocs.io/

Citation

To cite PyViPR, please cite the iScience paper:

Interactive Multiresolution Visualization of Cellular Network Processes

Ortega O and Lopez C

License

MIT

pyvipr's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar ooo-abm avatar ortega2247 avatar pyup-bot avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyvipr's Issues

An in-range update of rimraf is breaking the build 🚨

The devDependency rimraf was updated from 3.0.0 to 3.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rimraf is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… pyup.io/safety-ci: No dependencies with known security vulnerabilities. (Details).
  • ❌ build (macOS-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (windows-latest, 3.6): There are 1 failures, 0 warnings, and 0 notices.
  • βœ… build (ubuntu-latest, 3.6): null

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Failed to load model class 'CytoscapeModel' from module 'pyvipr' on a fresh install

Hey there,

following the the example found on https://pyvipr.readthedocs.io/en/latest/tellurium_examples.html

import tellurium as te
import pyvipr.tellurium_viz as tviz

r = te.loada("""
    J1:S1 -> S2; k1*S1;
    J2:S2 -> S3; k2*S2;
    J3:S4 -> S3; k2*S4;

    k1= 0.1; k2 = 0.2;
    S1 = 10; S2 = 0; S3 = 0; S4 = 20;
""")

tviz.sp_view(r)

I get the following error:

Failed to load model class 'CytoscapeModel' from module 'pyvipr'
loadClass@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.40eaa5b8e976096d50b2.js?v=40eaa5b8e976096d50b2:1:74856
loadModelClass@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.b0e841b75317744a7595.js?v=b0e841b75317744a7595:1:10729
_make_model@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.b0e841b75317744a7595.js?v=b0e841b75317744a7595:1:7517
new_model@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.b0e841b75317744a7595.js?v=b0e841b75317744a7595:1:5137
handle_comm_open@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.b0e841b75317744a7595.js?v=b0e841b75317744a7595:1:3894
134/v/this._handleCommOpen@http://localhost:8890/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.40eaa5b8e976096d50b2.js?v=40eaa5b8e976096d50b2:1:73393
_handleCommOpen@http://localhost:8890/static/lab/jlab_core.a10b9b009324ae53c035.js?v=a10b9b009324ae53c035:2:1001314

pyvipr 1.0.7
tellurium 2.2.7
jupyterlab 3.5.3

And the jupyerlab plugin was installed yesterday via:

conda install pyvipr -c ortegas
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install pyvipr

User-defined normalizations

Development suggestion: It might be good to give users the option to specify their own normalizations. I'm thinking of a case where you might want to compare dynamic visualizations from two simulation conditions. In that case, you may want a common normalization so that the visualizations retain information about the relative scale. Thanks for the suggestion @blakeaw

can't get it to work from Google Colab

I was trying to use vipr fro colab (https://colab.research.google.com/) but I am stuck at:

import pyvipr.tellurium_viz as tviz
tviz.sp_view(r)

I tried to install community but it say that is already there.

/usr/local/lib/python3.7/dist-packages/pyvipr/util.py in ()
4 import networkx as nx
5 import networkx.algorithms.community as nx_community
----> 6 from community import best_partition, generate_dendrogram
7
8

ImportError: cannot import name 'best_partition' from 'community' (/usr/local/lib/python3.7/dist-packages/community/init.py)

Use pysb model compartments to create new networks

Create new networks using the pysb model compartments. The idea would be to obtain the compartments to which the species belong and create new networks with compound nodes to represent the model compartments

Create Tippy instances on demand

From cytoscape.js-popper: "N.B. the creation of many Tippy instances at once has performance implications, especially for large graphs. Create each instance on demand, e.g. on tap. Use destroy() instead of hide() where possible."

Deprecation warning when adding pyvipr to version 4 of JupyterLab

Hi,

This is just a heads up for the following jupyter labextension install deprecation warning I got when adding pyvipr to JupyterLab 4.0.1:

(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages

I got the warning for both commands:

jupyter labextension install @jupyter-widgets/jupyterlab-manager
and
jupyter labextension install pyvipr

An in-range update of cytoscape is breaking the build 🚨

The dependency cytoscape was updated from 3.13.0 to 3.13.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

cytoscape is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… pyup.io/safety-ci: No dependencies with known security vulnerabilities. (Details).
  • ❌ build (windows-latest, 3.7): null
  • ❌ build (windows-latest, 3.6): null
  • ❌ build (macos-latest, 3.7): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (macos-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (ubuntu-latest, 3.7): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (ubuntu-latest, 3.6): There are 1 failures, 0 warnings, and 0 notices.

Commits

The new version differs by 6 commits.

  • faf43b0 Disable building the docs for 3.13.x releases
  • 8adb03f 3.13.1
  • bb9bc0b Build 3.13.1
  • ec05963 Patch buildComponent in eles.htbc()
  • e8062ec In src/define/animation.js, properties.zoom may have a value like { level: 1 } if an invalid zoom level is specified. The application of a zoom animation to the current zoom level is invalid. For example, animating from zoom:1 to zoom:1 doesn't make sense.
  • 3bf1652 Renderer-calculated style values for an edge may not be fresh on call to getter #2608

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of style-loader is breaking the build 🚨

The devDependency style-loader was updated from 1.1.1 to 1.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

style-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… pyup.io/safety-ci: No dependencies with known security vulnerabilities. (Details).
  • ❌ build (macOS-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (windows-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (ubuntu-latest, 3.6): There are 1 failures, 0 warnings, and 0 notices.

Release Notes for v1.1.2

1.1.2 (2019-12-25)

Bug Fixes

  • algorithm for importing modules (#449) (91ceaf2)
  • checking that the list of modules is an array (#448) (1138ed7)
Commits

The new version differs by 3 commits.

  • de38c39 chore(release): 1.1.2
  • 91ceaf2 fix: algorithm for importing modules (#449)
  • 1138ed7 fix: checking that the list of modules is an array (#448)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error displaying widget: model not found

Hi,

I tried to install pyvipr and run the provided example code, but ran into some trouble:

I installed pyvipr:

pip install pyvipr jupyterlab pysb
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install pyvipr

on Ubuntu 20.04

and tried to run

import pyvipr.pysb_viz as pviz
from pyvipr.examples_models.lopez_embedded import model

pviz.sp_comm_louvain_view(model, random_state=1, layout_name='klay')

which resulted in

Error displaying widget: model not found

Any ideas on what might be going wrong there?

Installed packages:

Package            Version   
------------------ ----------
attrs              19.3.0    
backcall           0.1.0     
bleach             3.1.5     
certifi            2020.4.5.1
chardet            3.0.4     
cycler             0.10.0    
decorator          4.4.2     
defusedxml         0.6.0     
entrypoints        0.3       
idna               2.9       
ipykernel          5.2.1     
ipython            7.14.0    
ipython-genutils   0.2.0     
ipywidgets         7.5.1     
jedi               0.17.0    
Jinja2             2.11.2    
json5              0.9.4     
jsonschema         3.2.0     
jupyter-client     6.1.3     
jupyter-core       4.6.3     
jupyterlab         2.1.2     
jupyterlab-server  1.1.1     
kiwisolver         1.2.0     
MarkupSafe         1.1.1     
matplotlib         3.2.1     
mistune            0.8.4     
mpmath             1.1.0     
nbconvert          5.6.1     
nbformat           5.0.6     
networkx           2.4       
notebook           6.0.3     
numpy              1.18.4    
packaging          20.3      
pandocfilters      1.4.2     
parso              0.7.0     
pexpect            4.8.0     
pickleshare        0.7.5     
pip                20.0.2    
pkg-resources      0.0.0     
prometheus-client  0.7.1     
prompt-toolkit     3.0.5     
ptyprocess         0.6.0     
Pygments           2.6.1     
pyparsing          2.4.7     
pyrsistent         0.16.0    
pysb               1.11.0    
python-dateutil    2.8.1     
python-louvain     0.14      
pyvipr             1.0.2     
pyzmq              19.0.0    
requests           2.23.0    
scipy              1.4.1     
Send2Trash         1.5.0     
setuptools         44.0.0    
six                1.14.0    
sympy              1.5.1     
terminado          0.8.3     
testpath           0.4.4     
tornado            6.0.4     
traitlets          4.3.3     
urllib3            1.25.9    
wcwidth            0.1.9     
webencodings       0.5.1     
widgetsnbextension 3.5.1     

An in-range update of webpack is breaking the build 🚨

The devDependency webpack was updated from 4.41.4 to 4.41.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… pyup.io/safety-ci: No dependencies with known security vulnerabilities. (Details).
  • ❌ build (macOS-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (windows-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (ubuntu-latest, 3.6): There are 1 failures, 0 warnings, and 0 notices.

Release Notes for v4.41.5

Bugfixes

  • handle relative paths with webpack:// prefix in SourceMaps correctly
  • fixes a non-determinism about providedExports with export * which caused changing module hashes and unnecessary HMR invalidation
Commits

The new version differs by 7 commits.

  • 45ecebc 4.41.5
  • 8a0dac1 Merge pull request #10185 from webpack/bugfix/non-deterministic-provided-exports
  • 4e31587 Merge pull request #10183 from webpack/deps/update
  • 3ec952f update dependencies in-range
  • 8e4749e make order of exports in providedExports deterministic
  • 0e5e8d9 Merge pull request #10181 from webpack/backport/webpack-source-map-prefix
  • 6b9884e handle webpack:// prefix in SourceMap sources

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Errors when calling atom_rules_view

I tried calling the atom_rules_view with some of the different type options to visualize_args but some are returning errors:

1. reaction network
viz.atom_rules_view(model, {'type':'reaction_network','background':1})


UnboundLocalError Traceback (most recent call last)
in
----> 1 viz.atom_rules_view(model, {'type':'reaction_network','background':1})

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/views.py in atom_rules_view(model, visualize_args, rule_name, verbose, cleanup, layout_name)
520 else:
521 raise TypeError('Only PySB and bngl models are supported')
--> 522 data = pviz.atom_rules_view(visualize_args, rule_name, verbose, cleanup)
523 return Viz(data=data, type_of_viz='', layout_name=layout_name)
524

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/static_viz.py in atom_rules_view(self, visualize_args, rule_name, verbose, cleanup)
536 g = nx.read_gml(output, label='id')
537
--> 538 g.graph['name'] = self.model.name
539 g.graph['style'] = 'atom'
540 data = from_networkx(g, map_node_data=map_node_data_gml, map_edge_data=map_edge_data_gml)

UnboundLocalError: local variable 'g' referenced before assignment

2. contact map
viz.atom_rules_view(model, {'type':'contactmap','background':1})


KeyError Traceback (most recent call last)
in
----> 1 viz.atom_rules_view(model, {'type':'contactmap','background':1})

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/views.py in atom_rules_view(model, visualize_args, rule_name, verbose, cleanup, layout_name)
520 else:
521 raise TypeError('Only PySB and bngl models are supported')
--> 522 data = pviz.atom_rules_view(visualize_args, rule_name, verbose, cleanup)
523 return Viz(data=data, type_of_viz='', layout_name=layout_name)
524

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/static_viz.py in atom_rules_view(self, visualize_args, rule_name, verbose, cleanup)
538 g.graph['name'] = self.model.name
539 g.graph['style'] = 'atom'
--> 540 data = from_networkx(g, map_node_data=map_node_data_gml, map_edge_data=map_edge_data_gml)
541 return data
542

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/util_networkx.py in from_networkx(g, layout, scale, map_node_data, map_edge_data)
141
142 for i, node_id in enumerate(nodes):
--> 143 new_node = __create_node(g.nodes[node_id], node_id, map_node_data)
144 if layout is not None:
145 new_node['position'] = pos[i]

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/util_networkx.py in __create_node(node, node_id, map_data)
67 new_node = {}
68 node_columns = node.keys()
---> 69 data = map_data(node_columns, node)
70 # Override special keys
71 data[ID] = str(node_id)

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/util_networkx.py in map_node_data_gml(columns, graph_obj)
41 data = {}
42
---> 43 if graph_obj['gid'] != '':
44 data['parent'] = graph_obj['gid']
45

KeyError: 'gid'

3. opts
viz.atom_rules_view(model, {'type':'opts','background':1})

FileNotFoundError Traceback (most recent call last)
in
----> 1 viz.atom_rules_view(model, {'type':'opts','background':1})

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/views.py in atom_rules_view(model, visualize_args, rule_name, verbose, cleanup, layout_name)
520 else:
521 raise TypeError('Only PySB and bngl models are supported')
--> 522 data = pviz.atom_rules_view(visualize_args, rule_name, verbose, cleanup)
523 return Viz(data=data, type_of_viz='', layout_name=layout_name)
524

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/static_viz.py in atom_rules_view(self, visualize_args, rule_name, verbose, cleanup)
526 output = bngfile.base_filename + file_name
527 try:
--> 528 g = nx.read_gml(output, label='id')
529 except nx.NetworkXError as e:
530 if 'multigraph' in str(e):

in read_gml(path, label, destringizer)

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/networkx/utils/decorators.py in _open_file(func_to_be_decorated, *args, **kwargs)
212 if is_string_like(path):
213 ext = splitext(path)[1]
--> 214 fobj = _dispatch_dict[ext](path, mode=mode)
215 close_fobj = True
216 elif hasattr(path, 'read'):

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpBNGtdp_y5xi/pysb_opts.gml'

An in-range update of cytoscape-popper is breaking the build 🚨

The dependency cytoscape-popper was updated from 1.0.5 to 1.0.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

cytoscape-popper is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… pyup.io/safety-ci: No dependencies with known security vulnerabilities. (Details).
  • ❌ build (macOS-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (windows-latest, 3.6): There are 2 failures, 0 warnings, and 0 notices.
  • ❌ build (ubuntu-latest, 3.6): There are 1 failures, 0 warnings, and 0 notices.

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error when calling Compartment View

Hi Oscar,

I tried to use the compartment view for my PARM model with the command
viz.sp_comp_view(model)
but I got the error copied below. The sp_view and sp_comm_louvain_view functions work fine. Maybe there something it doesn't like about my model and how I defined the compartments?

Error Traceback:


TypeError Traceback (most recent call last)
in
----> 1 viz.sp_comp_view(model)

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/views.py in sp_comp_view(model, layout_name)
64
65 """
---> 66 return Viz(data=model, type_of_viz='sp_comp_view', layout_name=layout_name)
67
68

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/ipywidgets/widgets/widget.py in init(self, **kwargs)
413
414 Widget._call_widget_constructed(self)
--> 415 self.open()
416
417 def del(self):

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/ipywidgets/widgets/widget.py in open(self)
426 """Open a comm to the frontend if one isn't already open."""
427 if self.comm is None:
--> 428 state, buffer_paths, buffers = _remove_buffers(self.get_state())
429
430 args = dict(target_name='jupyter.widget',

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/ipywidgets/widgets/widget.py in get_state(self, key, drop_defaults)
516 for k in keys:
517 to_json = self.trait_metadata(k, 'to_json', self._trait_to_json)
--> 518 value = to_json(getattr(self, k), self)
519 if not PY3 and isinstance(traits[k], Bytes) and isinstance(value, bytes):
520 value = memoryview(value)

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/model_simresult_to_json.py in data_to_json(value, widget)
23
24 viz = PysbStaticViz(value)
---> 25 jsondata = static_data(viz, widget)
26 return jsondata
27

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/model_simresult_to_json.py in static_data(viz_obj, w)
151 jsondata = getattr(viz_obj, w.type_of_viz)(random_state=rs)
152 else:
--> 153 jsondata = getattr(viz_obj, w.type_of_viz)()
154 except AttributeError:
155 raise AttributeError('Type of static visualization not defined')

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/static_viz.py in sp_comp_view(self)
143 generate a cytoscapejs network.
144 """
--> 145 graph = self.compartments_data_graph()
146 data = from_networkx(graph)
147 return data

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/pyvipr/pysb_viz/static_viz.py in compartments_data_graph(self)
653 monomers = sp.monomer_patterns
654 monomers_comp = {m.compartment.name: m.compartment.size for m in monomers}
--> 655 smallest_comp = min(monomers_comp, key=monomers_comp.get)
656 sp_compartment['s{0}'.format(idx)] = smallest_comp
657 nx.set_node_attributes(graph, sp_compartment, 'parent')

~/miniconda3/envs/detail_data/lib/python3.6/site-packages/sympy/core/relational.py in nonzero(self)
374
375 def nonzero(self):
--> 376 raise TypeError("cannot determine truth value of Relational")
377
378 bool = nonzero

TypeError: cannot determine truth value of Relational

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Apply layout to compound nodes

When a compound node has too many child nodes it would be a good idea to have an option to apply a layout to those nodes to improve readability

Node-centric dynamics

Development suggestion: It might be cool to add in a feature for node-centric dynamic visualization that shows how a single species/group is both produced and consumed over time. I'm thinking of your earlier work with Bid-centric dynamic signatures. Plus, if I remember right, you implemented something like this a while back to make a movie to that effect

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.