pybiopax


Namepybiopax JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/indralab/pybiopax
SummaryA Python implementation of the BioPAX object model, and parts of PaxTools.
upload_time2023-07-11 21:29:21
maintainer
docs_urlNone
authorBenjamin M. Gyori, Harvard Medical School
requires_python
license
keywords biology pathway
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PyBioPAX: A python implementation of the BioPAX object model
------------------------------------------------------------
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.04136/status.svg)](https://doi.org/10.21105/joss.04136)
[![Build](https://github.com/indralab/pybiopax/workflows/Tests/badge.svg)](https://github.com/indralab/pybiopax/actions)
[![Documentation](https://readthedocs.org/projects/pybiopax/badge/?version=latest)](https://pybiopax.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/pybiopax.svg)](https://badge.fury.io/py/pybiopax)
[![Python 3](https://img.shields.io/pypi/pyversions/pybiopax.svg)](https://www.python.org/downloads/release/python-357/)

PyBioPAX implements the BioPAX level 3 object model (http://www.biopax.org/release/biopax-level3-documentation.pdf) as a set of
Python classes. It exposes API functions to read OWL files into this
object model, and to dump OWL files from this object model.
This allows for the processing and creation of BioPAX models natively in
Python.

Gyori BM, Hoyt CT (2022). PyBioPAX: biological pathway exchange in Python. Journal of Open Source Software, 7(71), 4136, [https://doi.org/10.21105/joss.04136](https://doi.org/10.21105/joss.04136)

Installation
------------
PyBioPAX can be installed from PyPI as a package:

```bash
$ pip install pybiopax
```

Usage
-----
Reading an OWL file into a BioPaxModel object:

```python
import pybiopax
model = pybiopax.model_from_owl_file('test.owl')
```


Writing a BioPaxModel into an OWL file:

```python
import pybiopax
pybiopax.model_to_owl_file(model, 'test.owl')
```

Querying Pathway Commons to get a BioPaxModel object:

```python
import pybiopax
model = pybiopax.model_from_pc_query('pathsfromto', ['MAP2K1'], ['MAPK1'])
```

Working with the elements of the Python object model:

```python
import pybiopax
model = pybiopax.model_from_pc_query('pathsfromto', ['MAP2K1'], ['MAPK1'])

# Each BioPaxModel instance has an objects attribute which is a dict
# whose keys are object URIs (strings) and values are BioPaxObject instances.
assert isinstance(model.objects, dict)
assert all(isinstance(obj, pybiopax.biopax.BioPaxObject)
           for obj in model.objects.values())

# Let's look at a specific object
bcr = model.objects['BiochemicalReaction_4f689747397d98089c551022a3ae2d88']

# This is a BiochemicalReaction which has a left and a right side. All list/set
# types per the BioPAX specification are represented as lists in the Python
# object model
# Both left and right consist of a single protein
left = bcr.left[0]
assert isinstance(left, pybiopax.biopax.Protein)
assert left.display_name == 'ERK1-2'
right = bcr.right[0]
assert isinstance(right, pybiopax.biopax.Protein)
assert right.display_name == 'ERK1-2-active'
```

We can also use the `pybiopax.paths` module to construct iterators over
objects based on a string specification from a given starting point.
Continuing from the block of code above, we take the BiochemicalReaction
`bcr` and link to reactants on its left hand side, then linking to their
entity references, and finally linking back to all the physical entities
that those are references of.

```python
from pybiopax.paths import find_objects

erks = find_objects(bcr, 'left/entity_reference/entity_reference_of')
```

Contribution and support
------------------------
To contribute to the code, please submit a pull request after
reading the [contribution guidelines](https://github.com/indralab/pybiopax/blob/master/CONTRIBUTING.md).
To report bugs and issues, or ask questions related to PyBioPAX, please
submit an [issue](https://github.com/indralab/pybiopax/issues).

Funding
-------
Development of this software was supported by the Defense Advanced Research
Projects Agency under award W911NF-15-1-0544 and the National Cancer Institute
under award U54-CA225088.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/indralab/pybiopax",
    "name": "pybiopax",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "biology,pathway",
    "author": "Benjamin M. Gyori, Harvard Medical School",
    "author_email": "benjamin_gyori@hms.harvard.edu",
    "download_url": "https://files.pythonhosted.org/packages/26/bd/91d6b9a5feb32bcd554d9c4333500569785a045e142f0c5f44a0e1880152/pybiopax-0.1.4.tar.gz",
    "platform": null,
    "description": "PyBioPAX: A python implementation of the BioPAX object model\n------------------------------------------------------------\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.04136/status.svg)](https://doi.org/10.21105/joss.04136)\n[![Build](https://github.com/indralab/pybiopax/workflows/Tests/badge.svg)](https://github.com/indralab/pybiopax/actions)\n[![Documentation](https://readthedocs.org/projects/pybiopax/badge/?version=latest)](https://pybiopax.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/pybiopax.svg)](https://badge.fury.io/py/pybiopax)\n[![Python 3](https://img.shields.io/pypi/pyversions/pybiopax.svg)](https://www.python.org/downloads/release/python-357/)\n\nPyBioPAX implements the BioPAX level 3 object model (http://www.biopax.org/release/biopax-level3-documentation.pdf) as a set of\nPython classes. It exposes API functions to read OWL files into this\nobject model, and to dump OWL files from this object model.\nThis allows for the processing and creation of BioPAX models natively in\nPython.\n\nGyori BM, Hoyt CT (2022). PyBioPAX: biological pathway exchange in Python. Journal of Open Source Software, 7(71), 4136, [https://doi.org/10.21105/joss.04136](https://doi.org/10.21105/joss.04136)\n\nInstallation\n------------\nPyBioPAX can be installed from PyPI as a package:\n\n```bash\n$ pip install pybiopax\n```\n\nUsage\n-----\nReading an OWL file into a BioPaxModel object:\n\n```python\nimport pybiopax\nmodel = pybiopax.model_from_owl_file('test.owl')\n```\n\n\nWriting a BioPaxModel into an OWL file:\n\n```python\nimport pybiopax\npybiopax.model_to_owl_file(model, 'test.owl')\n```\n\nQuerying Pathway Commons to get a BioPaxModel object:\n\n```python\nimport pybiopax\nmodel = pybiopax.model_from_pc_query('pathsfromto', ['MAP2K1'], ['MAPK1'])\n```\n\nWorking with the elements of the Python object model:\n\n```python\nimport pybiopax\nmodel = pybiopax.model_from_pc_query('pathsfromto', ['MAP2K1'], ['MAPK1'])\n\n# Each BioPaxModel instance has an objects attribute which is a dict\n# whose keys are object URIs (strings) and values are BioPaxObject instances.\nassert isinstance(model.objects, dict)\nassert all(isinstance(obj, pybiopax.biopax.BioPaxObject)\n           for obj in model.objects.values())\n\n# Let's look at a specific object\nbcr = model.objects['BiochemicalReaction_4f689747397d98089c551022a3ae2d88']\n\n# This is a BiochemicalReaction which has a left and a right side. All list/set\n# types per the BioPAX specification are represented as lists in the Python\n# object model\n# Both left and right consist of a single protein\nleft = bcr.left[0]\nassert isinstance(left, pybiopax.biopax.Protein)\nassert left.display_name == 'ERK1-2'\nright = bcr.right[0]\nassert isinstance(right, pybiopax.biopax.Protein)\nassert right.display_name == 'ERK1-2-active'\n```\n\nWe can also use the `pybiopax.paths` module to construct iterators over\nobjects based on a string specification from a given starting point.\nContinuing from the block of code above, we take the BiochemicalReaction\n`bcr` and link to reactants on its left hand side, then linking to their\nentity references, and finally linking back to all the physical entities\nthat those are references of.\n\n```python\nfrom pybiopax.paths import find_objects\n\nerks = find_objects(bcr, 'left/entity_reference/entity_reference_of')\n```\n\nContribution and support\n------------------------\nTo contribute to the code, please submit a pull request after\nreading the [contribution guidelines](https://github.com/indralab/pybiopax/blob/master/CONTRIBUTING.md).\nTo report bugs and issues, or ask questions related to PyBioPAX, please\nsubmit an [issue](https://github.com/indralab/pybiopax/issues).\n\nFunding\n-------\nDevelopment of this software was supported by the Defense Advanced Research\nProjects Agency under award W911NF-15-1-0544 and the National Cancer Institute\nunder award U54-CA225088.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python implementation of the BioPAX object model, and parts of PaxTools.",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/indralab/pybiopax"
    },
    "split_keywords": [
        "biology",
        "pathway"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12093cdf86a4b4d5c8daff6d40235d282dc65bc6d984dd7f3dfae38c48895359",
                "md5": "8b467cb9dc1f01ffb6bc418429c2044a",
                "sha256": "6eefc38c6df22de583e6ecffb7552ff51b439f251d63947152560a7cbd8ce0a0"
            },
            "downloads": -1,
            "filename": "pybiopax-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8b467cb9dc1f01ffb6bc418429c2044a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23969,
            "upload_time": "2023-07-11T21:29:19",
            "upload_time_iso_8601": "2023-07-11T21:29:19.316878Z",
            "url": "https://files.pythonhosted.org/packages/12/09/3cdf86a4b4d5c8daff6d40235d282dc65bc6d984dd7f3dfae38c48895359/pybiopax-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26bd91d6b9a5feb32bcd554d9c4333500569785a045e142f0c5f44a0e1880152",
                "md5": "c301237cef2de33e508ac991f5e3d977",
                "sha256": "1f51c34f675fa6565e8082868a0bcb35f55f5dea302eb466ef2cf7132b67899e"
            },
            "downloads": -1,
            "filename": "pybiopax-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "c301237cef2de33e508ac991f5e3d977",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3651248,
            "upload_time": "2023-07-11T21:29:21",
            "upload_time_iso_8601": "2023-07-11T21:29:21.470775Z",
            "url": "https://files.pythonhosted.org/packages/26/bd/91d6b9a5feb32bcd554d9c4333500569785a045e142f0c5f44a0e1880152/pybiopax-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-11 21:29:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "indralab",
    "github_project": "pybiopax",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pybiopax"
}
        
Elapsed time: 0.10751s