Skip to main content

COBRApy is a package for constraints-based modeling of biological networks

Project description

cobrapy

Build Status Coverage Status Build status PyPI Gitter

COnstraint-Based Reconstruction and Analysis (COBRA) methods are widely used for genome-scale modeling of metabolic networks in both prokaryotes and eukaryotes. COBRApy is a constraint-based modeling package that is designed to accommodate the biological complexity of the next generation of COBRA models and provides access to commonly used COBRA methods, such as flux balance analysis, flux variability analysis, and gene deletion analyses.

To install, please follow the instructions.

The documentation is browseable online at readthedocs and can also be downloaded.

Please use the Google Group for help. Alternatively, you can use gitter.im for quick questions and discussions about cobrapy (faster response times).

More information about opencobra is available at the website.

If you use cobrapy in a scientific publication, please cite doi:10.1186/1752-0509-7-74

License

The cobrapy source is released under both the GPL and LGPL licenses. You may choose which license you choose to use the software under. However, please note that binary packages which include GLPK (such as the binary wheels distributed at https://pypi.python.org/pypi/cobra) will be bound by its license as well.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License or the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Installation of cobrapy

For installation help, please use the Google Group. For usage instructions, please see the documentation.


All releases require Python 2.7+ or 3.4+ to be installed before proceeding. Mac OS X (10.7+) and Ubuntu ship with Python. Windows users without python can download and install python from the python website. Please note that though Anaconda and other python distributions may work with cobrapy, they are not explicitly supported (yet!).

Stable version installation

cobrapy can be installed with any recent installation of pip. Instructions for several operating systems are below:

Mac OS X or Linux

  1. install pip.

  2. In a terminal, run sudo pip install cobra

Microsoft Windows

The preferred installation method on Windows is also to use pip. The latest Windows installers for Python 2.7 and 3.4 include pip, so if you use those you will already have pip.

  1. In a terminal, run C:\Python27\Scripts\pip.exe install cobra (you may need to adjust the path accordingly).

To install without pip, you will need to download and use the appropriate installer for your version of python from the python package index.

Hacking version installation

Use pip to install Cython. Install libglpk using your package manger. This would be brew install homebrew/science/glpk on a Mac and sudo apt-get install libglpk-dev on debian-based systems (including Ubuntu and Mint). GLPK can also be compiled from the released source.

Clone the git repository using your preferred mothod. Cloning from your own github fork is recommended! Afterwards, open a terminal, enter the cobrapy repository and run the following command:

python setup.py develop --user

Installation of optional dependencies

Optional Dependencies

On windows, these can downloaded from [this site] (http://www.lfd.uci.edu/~gohlke/pythonlibs/). On Mac/Linux, they can be installed using pip, or from the OS package manager (e.g brew, apt, yum).

  1. libsbml >= 5.10 to read/write SBML level 2 files

  2. lxml to speed up read/write of SBML level 3 files.

  3. numpy >= 1.6.1 for double deletions

  4. scipy >= 0.11 for ArrayBasedModel and saving to *.mat files.

Other solvers

cobrapy comes with bindings to the GNU Linear Programming Kit ([glpk] (http://www.gnu.org/software/glpk/)) using its own bindings called “cglpk” in cobrapy. In addition, cobrapy currently supports these linear programming solvers:

ILOG/CPLEX, MOSEK, and Gurobi are commercial software packages that currently provide free licenses for academics and support both linear and quadratic programming. GLPK and clp are open source linear programming solvers; however, they may not be as robust as the commercial solvers for mixed-integer and quadratic programming. QSopt_ex esolver is also open source, and can solve linear programs using rational operations, giving exact solutions.

Testing your installation

  1. Start python

  2. Type the following into the Python shell

from cobra.test import test_all
test_all()

You should see some skipped tests and expected failures, and the function should return False.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

cobra-0.5.1b1.win-amd64-py3.5.exe (2.2 MB view details)

Uploaded Source

cobra-0.5.1b1.win-amd64-py3.4.exe (1.9 MB view details)

Uploaded Source

cobra-0.5.1b1.win-amd64-py2.7.exe (1.9 MB view details)

Uploaded Source

cobra-0.5.1b1.win32-py3.5.exe (2.1 MB view details)

Uploaded Source

cobra-0.5.1b1.win32-py3.4.exe (1.8 MB view details)

Uploaded Source

cobra-0.5.1b1.win32-py2.7.exe (1.8 MB view details)

Uploaded Source

cobra-0.5.1b1-cp35-cp35m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.5m Windows x86-64

cobra-0.5.1b1-cp35-cp35m-win32.whl (1.6 MB view details)

Uploaded CPython 3.5m Windows x86

cobra-0.5.1b1-cp35-cp35m-manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.5m

cobra-0.5.1b1-cp34-cp34m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.4m Windows x86-64

cobra-0.5.1b1-cp34-cp34m-win32.whl (1.6 MB view details)

Uploaded CPython 3.4m Windows x86

cobra-0.5.1b1-cp34-cp34m-manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.4m

cobra-0.5.1b1-cp27-cp27mu-manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 2.7mu

cobra-0.5.1b1-cp27-cp27m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 2.7m Windows x86-64

cobra-0.5.1b1-cp27-cp27m-win32.whl (1.6 MB view details)

Uploaded CPython 2.7m Windows x86

File details

Details for the file cobra-0.5.1b1.win-amd64-py3.5.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 d08abeaf8be40d447860d223477a640443f84d56fac3d5f8bca2871036e1be8f
MD5 10531f533761cf52ae71b577b7a13d20
BLAKE2b-256 6784bef5dc8513481dd5b3bdb8275df5a280446e03700b3a83e82833661e1f10

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1.win-amd64-py3.4.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 17991854b63e06df5247d8b8a68990c27d470a03fa102cdc3d9cfac477e9db2e
MD5 4bd5930e129d917ba897cf49b2187331
BLAKE2b-256 b5d15babadc37cbe3c2e69006fd7a16a0d54d7362df8cb50c82d4a409483764b

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 c41ec01f158fdabe0ff255c406573661c78af3b7852f56e97bcc75ac2abfc688
MD5 90d7f0d99f4252a44bec13f9b3505fe7
BLAKE2b-256 81d58203bf9b47fcfe8f199f1ee412ef4e304d06e73687b604f77ac3cdb5dedb

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1.win32-py3.5.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win32-py3.5.exe
Algorithm Hash digest
SHA256 b47b91581f6b3f12f69803e53287933ad0043bc99d490701f25e954a73f44076
MD5 f74767befdf69dbb0183f2b1266ab40c
BLAKE2b-256 159fc35ae95774fdb8828b85d7dfa265d0ad30269a417b2bdcb2bf9087bdac8e

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1.win32-py3.4.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win32-py3.4.exe
Algorithm Hash digest
SHA256 19874973832fceff1df98480611732485abac142a2ea035205c6c1cf0ebbe534
MD5 c2d3aa6fe50312fa0bfca858ae1fcedd
BLAKE2b-256 76fbdd97e0e723178eac6b757a7a3ff3e574c24442c440e9d6995c91fd28d051

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1.win32-py2.7.exe.

File metadata

File hashes

Hashes for cobra-0.5.1b1.win32-py2.7.exe
Algorithm Hash digest
SHA256 5ae5d2eb7a692b750374eb401c8b3dbe1b16c37abc3ed68fcd18d4f86d3c5b29
MD5 8ccd070ea20d964d891f0cda09e93d05
BLAKE2b-256 463c09ea69e42fc6f8d6435d1a8dd106df4a9be5e768f16e6991a366ac0bee04

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 6c74ac5f59323c174c875ddcdf185c3c2e47f2c2b753cfbc1765cd72c9d1437e
MD5 7e7a91621817bb5f3d0e506125ce8148
BLAKE2b-256 d70b1d1c1db2ad7dd53d23e2ac2008969188d3da091a5e3a83252da6d49a0ee8

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 4c22bb543bd26d3f17a1e8e043c8c04f392a973ac59f6aa6de5cd2597dc61bb6
MD5 0b9c1ac44c08b98924bdd55c2606ca91
BLAKE2b-256 9abee50a0542b74d5e2c7922aaeac146876f81f77d216cfc0346b22d6273d904

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 699b813d5fe911e8c2bc62f19b5d0a91634a09f5c2cf9fb60bd4b63231c0ad30
MD5 46682358912fa18246d72e7f4cb81298
BLAKE2b-256 9b7577c305746f245243079bbe69066b974a0741792bfd5c3f5873fdc47c54a2

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 df2f9e908a9ada25232505f831b79e281c14a800579c751bb73a456a4ce08d76
MD5 dec31ec81955e519d9ba366c8350f0c9
BLAKE2b-256 f7556be9efee432039dfd252a31a56d9bb021b7f9679aafccbf251ddad9371ce

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 7280c6bc6d8fbac62be13309c9840d8fd7c94a66bbf1b6523efbf0d68372e533
MD5 ba783a85fbb362648e47b61e872ec5fd
BLAKE2b-256 7c9b7925ff86d7bfc08c5f56187a9a7387d7f353de324ba84881b6e159dcef7b

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 abce9c8f55de3326e49ecdeedefce9ceb82ca8e354e9d856e14cace558339547
MD5 8c970a9444a45dc6de4af228e1ddbac5
BLAKE2b-256 a6ebf10e46daa5aebd563772afc9a9f593818032f0ab51680709133dd8d587f6

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b1fe98619e9f5290bb6610abf23a8d7344158bc2831019e5b2c5efcded22346d
MD5 328657828bb6f9c702a90c67bdc80766
BLAKE2b-256 d10b7d110a82f69d44ee9b62eaf60a542653826b673f2c9088e745cc9bd5fe77

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 a52c393138fc511dd09fd7145274a7a017be947e63b4578ab7a401729e75dad6
MD5 cf549f3b8366852fc3af6a94beda5124
BLAKE2b-256 5620849d5074b57e724c96de45346ac925319b40f1de142e240c61208ae5733e

See more details on using hashes here.

File details

Details for the file cobra-0.5.1b1-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.5.1b1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 c22b1047c470a2338d2c51db90344ad9aaa555ed4ad73fa860f733f5a7ae965a
MD5 b0ca2b574ff935f4a25722e5235e1c40
BLAKE2b-256 02b5aee81247980255669ef58832f533cb7397d41cafd6c1c70de41e1eb48cbf

See more details on using hashes here.

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