BioCRNpyler


NameBioCRNpyler JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://github.com/BuildACell/biocrnpyler/
SummaryA chemical reaction network compiler for generating large biological circuit models
upload_time2024-06-20 10:42:14
maintainerNone
docs_urlNone
authorBuild-A-Cell
requires_python>=3.6
licenseBSD 3-Clause License Copyright (c) 2018, Build-A-Cell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords sbml synthetic biology modeling chemical reaction network crn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # BioCRNPyler — Biomolecular Chemical Reaction Network Compiler
## Python toolbox to create CRN models in SBML for biomolecular mechanisms

[![Build Status](https://github.com/buildacell/biocrnpyler/actions/workflows/deploy.yml/badge.svg)](https://github.com/biocircuits/bioscrape/actions/workflows/deploy_bioscrape.yml)
[![codecov](https://codecov.io/gh/BuildACell/BioCRNPyler/branch/master/graph/badge.svg)](https://codecov.io/gh/BuildACell/BioCRNPyler)
[![PyPI version](https://badge.fury.io/py/biocrnpyler.svg)](https://badge.fury.io/py/biocrnpyler)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/BuildACell/BioCRNPyler/master?filepath=%2Fexamples%2F)

BioCRNPyler (pronounced Bio-Compiler) is a Python package for the creation, manipulation,
and study of the structure, dynamics, and functions
of complex biochemical networks.

- **Mailing list:** [SBTools Google Group](https://groups.google.com/g/sbtools/) Email: sbtools@googlegroups.com
- **Source:** https://github.com/BuildACell/BioCRNPyler
- **Paper:** - [BioCRNpyler: Compiling Chemical Reaction Networks from Biomolecular Parts in Diverse Contexts](https://www.biorxiv.org/content/10.1101/2020.08.02.233478v1)
- **Bug reports:** https://github.com/BuildACell/BioCRNPyler/issues
- **Slack** Join the #biocrnpyler channel on SBTools slack: Ask on the public SBTools Google group to be added or send a message to one of the maintainers. 

# Example 1: Building Simple CRNs by Hand

BioCRNpyler allows for CRNs to be built by hand, adding Species and Reactions manually.

```python
from biocrnpyler import *
# let's build the following CRN
# A -->[k1] 2B
# B -->[k2] C+D
# Species
A = Species("A")
B = Species("B")
C = Species("C")
D = Species("D")

#Reaction Rates
k1 = 3.
k2 = 1.4

#Reaction Objects
R1 = Reaction.from_massaction([A], [B, B], k_forward = k1)
R2 = Reaction.from_massaction([B], [C, D], k_forward = k2)

#Make a CRN
CRN = ChemicalReactionNetwork(species = [A, B, C, D], reactions = [R1, R2])
print(CRN)
```

# Example 2: Compiling Complex CRNs from Specifications

BioCRNpyler also allows for higher level descriptions to be compiled into a CRN. In the below example, a piece of synthetic DNA with two promoters pointing in opposite directions is constructed from a list of DNAparts which are combined together in a DNA_construct and then simulated in a TxTlExtract context, which represents a cell-free bacterial lysate with machinery like Ribosomes and Polymerases modeled explicitly.

![Specification to CRN Illustration](static/SpecificationToCRN.png)

```python
from biocrnpyler import *

#Define a set of DNA parts
ptet = RegulatedPromoter("ptet",["tetr"],leak=True) #this is a promoter repressed by tetR and has a leak reaction
pconst = Promoter("pconst") #constitutive promoter
pcomb = CombinatorialPromoter("pcomb",["arac","laci"], leak=False, tx_capable_list = [["arac"], ["laci"]]) #the Combinations A and B or just A or just B be transcribed
utr1 = RBS("UTR1") #regular RBS
utr2 = RBS("UTR1") #regular RBS
gfp = CDS("GFP","GFP") #a CDS has a name and a protein name. so this one is called GFP and the protein is also called GFP
fusrfp = CDS("fusRFP","RFP",no_stop_codons=["forward"]) #you can say that a protein has no stop codon. This is a little different from a fusion protein, because in this case you are saying that the ribosome reads through two proteins but still produces two distinct proteins, rather than one fused protein. This can happen in the case of the ta peptide which causes a peptide bond not to be formed while making a protein.
rfp = CDS("RFP","RFP") #regular RFP
cfp = CDS("CFP","CFP") #cfp
t16 = Terminator("t16") #a terminator stops transcription

#Combine the parts together in a DNA_construct with their directions
construct = DNA_construct([[ptet,"forward"],[utr1,"forward"],[gfp,"forward"],[t16,"forward"],[t16,"reverse"],[rfp,"reverse"],[utr1,"reverse"],[pconst,"reverse"]])

#some very basic parameters are defined - these are sufficient for the whole model to compile!
parameters={"cooperativity":2,"kb":100, "ku":10, "ktx":.05, "ktl":.2, "kdeg":2,"kint":.05}

#Place the construct in a context (TxTlExtract models a bacterial lysate with machinery like Ribosomes and Polymerases modelled explicitly)
myMixture = TxTlExtract(name = "txtl", parameters = parameters, components = [construct])

#Compile the CRN
myCRN = myMixture.compile_crn()

#plotting not shown - but BioCRNpyler automatically produces interactive reaction network graphs to help visualize and debug complex CRNs!
```


More advanced examples can be found in the [example](https://github.com/BuildACell/BioCRNPyler/tree/master/examples) folder, 
here's the first file in the Tutorial series: [Building CRNs](https://github.com/BuildACell/BioCRNPyler/blob/master/examples/1.%20Building%20CRNs%20Directly.ipynb)

# Installation


Install the latest version of BioCRNPyler::

    $ pip install biocrnpyler

Install with all optional dependencies::

    $ pip install biocrnpyler[all]

(Note that on some operating systems you made need to use "\[all\]" to avoid shell errors.)

Further details about the installation process can be found in the [BioCRNPyler wiki](https://github.com/BuildACell/BioCRNPyler/wiki#installation).

# Bugs

Please report any bugs that you find [here](https://github.com/BuildACell/BioCRNPyler/issues).
Or, even better, fork the repository on [GitHub](https://github.com/BuildACell/BioCRNPyler),
and create a pull request (PR). We welcome all changes, big or small, and we
will help you make the PR if you are new to `git` (just ask on the issue and/or
see [contribution guidelines](https://github.com/BuildACell/BioCRNPyler/blob/master/docs/CONTRIBUTING.md)).

# Versions

BioCRNpyler versions:

* 1.1.2 (latest stable release): To install run `pip install biocrnpyler` 
* 1.1.1 (previous stable release, compatible only with python <= 3.10): To install run `pip install biocrnpyler==1.1.1` 
* 0.9.0 (beta release): To install run `pip install biocrnpyler==0.9.0`
* 0.2.1 (alpha release): To install run `pip install biocrnpyler==0.2.1`

# License
Released under the BSD 3-Clause License (see `LICENSE`)

Copyright (c) 2024, Build-A-Cell. All rights reserved.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BuildACell/biocrnpyler/",
    "name": "BioCRNpyler",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "SBML, synthetic biology, modeling, Chemical Reaction Network, CRN",
    "author": "Build-A-Cell",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c3/a0/fa7d5950f916424deab94d62bc31afdb4ccee945ec057c58de3215b8b53d/biocrnpyler-1.1.2.tar.gz",
    "platform": null,
    "description": "# BioCRNPyler &mdash; Biomolecular Chemical Reaction Network Compiler\n## Python toolbox to create CRN models in SBML for biomolecular mechanisms\n\n[![Build Status](https://github.com/buildacell/biocrnpyler/actions/workflows/deploy.yml/badge.svg)](https://github.com/biocircuits/bioscrape/actions/workflows/deploy_bioscrape.yml)\n[![codecov](https://codecov.io/gh/BuildACell/BioCRNPyler/branch/master/graph/badge.svg)](https://codecov.io/gh/BuildACell/BioCRNPyler)\n[![PyPI version](https://badge.fury.io/py/biocrnpyler.svg)](https://badge.fury.io/py/biocrnpyler)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/BuildACell/BioCRNPyler/master?filepath=%2Fexamples%2F)\n\nBioCRNPyler (pronounced Bio-Compiler) is a Python package for the creation, manipulation,\nand study of the structure, dynamics, and functions\nof complex biochemical networks.\n\n- **Mailing list:** [SBTools Google Group](https://groups.google.com/g/sbtools/) Email: sbtools@googlegroups.com\n- **Source:** https://github.com/BuildACell/BioCRNPyler\n- **Paper:** - [BioCRNpyler: Compiling Chemical Reaction Networks from Biomolecular Parts in Diverse Contexts](https://www.biorxiv.org/content/10.1101/2020.08.02.233478v1)\n- **Bug reports:** https://github.com/BuildACell/BioCRNPyler/issues\n- **Slack** Join the #biocrnpyler channel on SBTools slack: Ask on the public SBTools Google group to be added or send a message to one of the maintainers. \n\n# Example 1: Building Simple CRNs by Hand\n\nBioCRNpyler allows for CRNs to be built by hand, adding Species and Reactions manually.\n\n```python\nfrom biocrnpyler import *\n# let's build the following CRN\n# A -->[k1] 2B\n# B -->[k2] C+D\n# Species\nA = Species(\"A\")\nB = Species(\"B\")\nC = Species(\"C\")\nD = Species(\"D\")\n\n#Reaction Rates\nk1 = 3.\nk2 = 1.4\n\n#Reaction Objects\nR1 = Reaction.from_massaction([A], [B, B], k_forward = k1)\nR2 = Reaction.from_massaction([B], [C, D], k_forward = k2)\n\n#Make a CRN\nCRN = ChemicalReactionNetwork(species = [A, B, C, D], reactions = [R1, R2])\nprint(CRN)\n```\n\n# Example 2: Compiling Complex CRNs from Specifications\n\nBioCRNpyler also allows for higher level descriptions to be compiled into a CRN. In the below example, a piece of synthetic DNA with two promoters pointing in opposite directions is constructed from a list of DNAparts which are combined together in a DNA_construct and then simulated in a TxTlExtract context, which represents a cell-free bacterial lysate with machinery like Ribosomes and Polymerases modeled explicitly.\n\n![Specification to CRN Illustration](static/SpecificationToCRN.png)\n\n```python\nfrom biocrnpyler import *\n\n#Define a set of DNA parts\nptet = RegulatedPromoter(\"ptet\",[\"tetr\"],leak=True) #this is a promoter repressed by tetR and has a leak reaction\npconst = Promoter(\"pconst\") #constitutive promoter\npcomb = CombinatorialPromoter(\"pcomb\",[\"arac\",\"laci\"], leak=False, tx_capable_list = [[\"arac\"], [\"laci\"]]) #the Combinations A and B or just A or just B be transcribed\nutr1 = RBS(\"UTR1\") #regular RBS\nutr2 = RBS(\"UTR1\") #regular RBS\ngfp = CDS(\"GFP\",\"GFP\") #a CDS has a name and a protein name. so this one is called GFP and the protein is also called GFP\nfusrfp = CDS(\"fusRFP\",\"RFP\",no_stop_codons=[\"forward\"]) #you can say that a protein has no stop codon. This is a little different from a fusion protein, because in this case you are saying that the ribosome reads through two proteins but still produces two distinct proteins, rather than one fused protein. This can happen in the case of the ta peptide which causes a peptide bond not to be formed while making a protein.\nrfp = CDS(\"RFP\",\"RFP\") #regular RFP\ncfp = CDS(\"CFP\",\"CFP\") #cfp\nt16 = Terminator(\"t16\") #a terminator stops transcription\n\n#Combine the parts together in a DNA_construct with their directions\nconstruct = DNA_construct([[ptet,\"forward\"],[utr1,\"forward\"],[gfp,\"forward\"],[t16,\"forward\"],[t16,\"reverse\"],[rfp,\"reverse\"],[utr1,\"reverse\"],[pconst,\"reverse\"]])\n\n#some very basic parameters are defined - these are sufficient for the whole model to compile!\nparameters={\"cooperativity\":2,\"kb\":100, \"ku\":10, \"ktx\":.05, \"ktl\":.2, \"kdeg\":2,\"kint\":.05}\n\n#Place the construct in a context (TxTlExtract models a bacterial lysate with machinery like Ribosomes and Polymerases modelled explicitly)\nmyMixture = TxTlExtract(name = \"txtl\", parameters = parameters, components = [construct])\n\n#Compile the CRN\nmyCRN = myMixture.compile_crn()\n\n#plotting not shown - but BioCRNpyler automatically produces interactive reaction network graphs to help visualize and debug complex CRNs!\n```\n\n\nMore advanced examples can be found in the [example](https://github.com/BuildACell/BioCRNPyler/tree/master/examples) folder, \nhere's the first file in the Tutorial series: [Building CRNs](https://github.com/BuildACell/BioCRNPyler/blob/master/examples/1.%20Building%20CRNs%20Directly.ipynb)\n\n# Installation\n\n\nInstall the latest version of BioCRNPyler::\n\n    $ pip install biocrnpyler\n\nInstall with all optional dependencies::\n\n    $ pip install biocrnpyler[all]\n\n(Note that on some operating systems you made need to use \"\\[all\\]\" to avoid shell errors.)\n\nFurther details about the installation process can be found in the [BioCRNPyler wiki](https://github.com/BuildACell/BioCRNPyler/wiki#installation).\n\n# Bugs\n\nPlease report any bugs that you find [here](https://github.com/BuildACell/BioCRNPyler/issues).\nOr, even better, fork the repository on [GitHub](https://github.com/BuildACell/BioCRNPyler),\nand create a pull request (PR). We welcome all changes, big or small, and we\nwill help you make the PR if you are new to `git` (just ask on the issue and/or\nsee [contribution guidelines](https://github.com/BuildACell/BioCRNPyler/blob/master/docs/CONTRIBUTING.md)).\n\n# Versions\n\nBioCRNpyler versions:\n\n* 1.1.2 (latest stable release): To install run `pip install biocrnpyler` \n* 1.1.1 (previous stable release, compatible only with python <= 3.10): To install run `pip install biocrnpyler==1.1.1` \n* 0.9.0 (beta release): To install run `pip install biocrnpyler==0.9.0`\n* 0.2.1 (alpha release): To install run `pip install biocrnpyler==0.2.1`\n\n# License\nReleased under the BSD 3-Clause License (see `LICENSE`)\n\nCopyright (c) 2024, Build-A-Cell. All rights reserved.\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2018, Build-A-Cell All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "A chemical reaction network compiler for generating large biological circuit models",
    "version": "1.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/buildacell/biocrnpyler/issues",
        "Homepage": "https://github.com/buildacell/biocrnpyler/"
    },
    "split_keywords": [
        "sbml",
        " synthetic biology",
        " modeling",
        " chemical reaction network",
        " crn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b71376acf265ab8b1ae6cf586a8300f65e6e4f54ae84035ed50ed283599a59fb",
                "md5": "d7e22412e00dc7d420e8bb46b1b13d66",
                "sha256": "8d4abe7b1c469258ecb034df47e6fb65b333983a4744d09ab4bb3d7502c02650"
            },
            "downloads": -1,
            "filename": "BioCRNpyler-1.1.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7e22412e00dc7d420e8bb46b1b13d66",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 140341,
            "upload_time": "2024-06-20T10:42:09",
            "upload_time_iso_8601": "2024-06-20T10:42:09.562519Z",
            "url": "https://files.pythonhosted.org/packages/b7/13/76acf265ab8b1ae6cf586a8300f65e6e4f54ae84035ed50ed283599a59fb/BioCRNpyler-1.1.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3a0fa7d5950f916424deab94d62bc31afdb4ccee945ec057c58de3215b8b53d",
                "md5": "5ca2dabdc33283e29a7eb06d9efb961d",
                "sha256": "c51cf3afeeb9ede5dfd678e6f00a3921c24d3a3eb3229970e2e53257fc6873de"
            },
            "downloads": -1,
            "filename": "biocrnpyler-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5ca2dabdc33283e29a7eb06d9efb961d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 124238,
            "upload_time": "2024-06-20T10:42:14",
            "upload_time_iso_8601": "2024-06-20T10:42:14.051523Z",
            "url": "https://files.pythonhosted.org/packages/c3/a0/fa7d5950f916424deab94d62bc31afdb4ccee945ec057c58de3215b8b53d/biocrnpyler-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-20 10:42:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BuildACell",
    "github_project": "biocrnpyler",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "lcname": "biocrnpyler"
}
        
Elapsed time: 0.29491s