skip to navigation
skip to content

PyBEL 0.6.2

Parsing, validation, and data exchange of BEL graphs

PyBEL is a Python package for compilation and validation of biological networks encoded in the Biological Expression Language (BEL). It also facilitates data interchange between common formats and databases such as NetworkX, JSON, CSV, Excel, Cytoscape, CX, NDEx, SQL, and Neo4J. Its companion package, PyBEL Tools, contains a suite of functions and workflows for analyzing the resulting biological networks.

This package was developed at Fraunhofer SCAI with support from the IMI projects: AETIONOMY and PHAGO.

Getting Started

In this example, the Selventa Small Corpus is loaded and visualized in a Jupyter Notebook.

>>> import pybel, pybel_tools
>>> graph = pybel.from_url('')
>>> graph.number_of_nodes()  # Will be smaller than expected because we have the most strict settings enabled
>>> pybel_tools.visualization.to_jupyter(graph)

More examples can be found in the documentation and in the PyBEL Notebooks repository.

PyBEL also installs a command line interface with the command pybel for simple utilities such as data conversion. In this example, a BEL file is exported to GraphML for viewing in Cytoscape.

$ pybel convert --path ~/Desktop/example.bel --graphml ~/Desktop/example.graphml

In Cytoscape, open with Import > Network > From File.


PyBEL can be installed easily from PyPI with the following code in your favorite terminal:

$ python3 -m pip install pybel

or from the latest code on GitHub with:

$ python3 -m pip install git+

See the installation documentation for more advanced instructions. Also, check the change log at CHANGELOG.rst.


Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.rst for more information on getting involved. Please add your name to AUTHORS.rst!


File Type Py Version Uploaded on Size
PyBEL-0.6.2.tar.gz (md5) Source 2017-06-29 333KB