Parsing, validation, and data exchange of BEL graphs
Project description
pybel
is a Python software package that parses BEL scripts, validates their semantics, and facilitates data
interchange between common formats and database systems like JSON, CSV, Excel, SQL, CX, and Neo4J. Its companion
package, PyBEL Tools, contains a library of functions for analysis of
biological networks.
Stable |
|||
Development |
Biological Expression Language (BEL) is a domain-specific language that enables the expression of complex molecular relationships and their context in a machine-readable form. Its simple grammar and expressive power have led to its successful use in the IMI project, AETIONOMY, to describe complex disease networks with several thousands of relationships.
pybel
provides a simple API so bioinformaticians and scientists with limited programming knowledge can easily
use it to interface with BEL graphs, but is built on a rich framework that can be extended to develop new algorithms.
>>> import pybel, networkx
>>> g = pybel.from_url('http://resource.belframework.org/belframework/1.0/knowledge/small_corpus.bel')
>>> networkx.draw(g) # NOTE: requires matplotlib as a dependency, which isn't automatically installed
PyBEL also installs a command line interface with the command pybel
for simple utilities such as data
conversion. Need help? All logs go to ~/.pybel
or add -v
for verbose output to the standard error
stream. 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
.
More examples can be found in the PyBEL Notebooks repository.
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 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.