Giter Site home page Giter Site logo

syssynbio / pyvipr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lolab-msm/pyvipr

0.0 1.0 0.0 23.01 MB

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

License: MIT License

Python 26.31% JavaScript 5.80% CSS 0.46% Jupyter Notebook 67.43%

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

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

Watchers

James Cloos avatar

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.