Skip to main content

Parsing, validation, and data exchange of BEL graphs

Project description

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('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 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.

Installation Current version on PyPI Stable Supported Python Versions

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

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.

Source Distribution

PyBEL-0.5.1.tar.gz (1.5 MB view details)

Uploaded Source

File details

Details for the file PyBEL-0.5.1.tar.gz.

File metadata

  • Download URL: PyBEL-0.5.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyBEL-0.5.1.tar.gz
Algorithm Hash digest
SHA256 59dc53ee3e1c81299acb81eaf3cbb307d603cb90d424ad77af565f37344f04ba
MD5 b23181c2aa392b983db029ede565f7b8
BLAKE2b-256 ea8c117d5dc1c7071dff44ff2eadd08e96019ac59d8e0eaa05ddcfc770485fc9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page