PyBEL is a Python package for parsing and handling biological networks encoded in the Biological Expression Language (BEL). It also facilitates data interchange between common formats and databases such as NetworkX, JSON, CSV, SIF, Cytoscape, CX, NDEx, SQL, and Neo4J.
Its companion package, PyBEL Tools, contains a suite of functions and workflows for analyzing the resulting biological networks.
Citation
If you use PyBEL in your work, we ask that you please cite:
Hoyt et al., 2017. PyBEL: a computational framework for Biological Expression Language. Bioinformatics, btx660, https://doi.org/10.1093/bioinformatics/btx660
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('http://resources.openbel.org/belframework/20150611/knowledge/small_corpus.bel')
>>> graph.number_of_nodes() # Will be smaller than expected because we have the most strict settings enabled
1207
>>> 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 Script 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.
Installation

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+https://github.com/pybel/pybel.git@develop
See the installation documentation for more advanced
instructions. Also, check the change log at CHANGELOG.rst.
Contributing
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!
Acknowledgements
This package was originally developed as part of the master’s work of Charles Tapley Hoyt at Fraunhofer SCAI with partial support from the IMI projects: AETIONOMY and PHAGO.
This software is proudly built with Paul McGuire’s PyParsing package.
Scott Colby designed our logo and provided sage advice
Christian Ebeling for supervision and consultation
Links
Metadata
Release files for pybel 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| PyBEL-0.10.0.tar.gz | 404.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyBEL-0.10.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 569.7 kB
Release files / PyBEL-0.10.0.tar.gz
| Download URL | PyBEL-0.10.0.tar.gz |
|---|---|
| Size | 404.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2d34c9832d49a68688689f766df388121d1179f524bffccd99a4d41c5538ff4
|
|
BLAKE2b-256 checksum How to use checksums |
c0722f0f1b760058ff38e2c9f53b1af989d5143a7538dfdb2b7b5cb915b67b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyBEL-0.10.0-py2.py3-none-any.whl
| Download URL | PyBEL-0.10.0-py2.py3-none-any.whl |
|---|---|
| Size | 165.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a26d2522de094b754355b25c34b43a6345414f1359ac9e6f4bfea48896c21156
|
|
BLAKE2b-256 checksum How to use checksums |
32ed1712bd25e24271ae855bb4c2deb497db1bbd5b8f154a77efef53cdb69eff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |