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.1b2.win-amd64-py3.5.exe (2.2 MB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 8bd6192aac01b85938cd07e1a643e05fd287d0a0b37bc27641cfd1d6552bd5a2
MD5 476074e97517247c2d822b35f57333dd
BLAKE2b-256 9d5294189c645a8442c6acf6cb036e4697cc5c5cc925069ff2a3695a62028c23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 cf3cdc83336614643173101355403fe55afccaef88a67865274a23d6fec4ce23
MD5 ce4d3545a11fc654963b9ada7261eefb
BLAKE2b-256 6c79bd364ddeb3d5eb6ecae357e61f98db6a687ea4d691e3c670636ee2ef8dfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 ff9c4b69e57fe5ee8fe72a580b3304cb2160caf45a29000609bfe8bf1eab25cd
MD5 50be867dc3e293b72482ab068899a491
BLAKE2b-256 ecf3de78f5d96f193c8bdc33d4e69d44e6fdbd0b18dca56da70fc88b0eed229c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win32-py3.5.exe
Algorithm Hash digest
SHA256 759fa00771fc407ccd033f41474226e4b640744df6a5fe530606b5863e5a2782
MD5 55d42de61151cc30b349e3f069b5c65f
BLAKE2b-256 c3e5b7f9e2a04b79a5b4752272a3139fca6c8b8e3c09fce46ceeed62a6c0c90e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win32-py3.4.exe
Algorithm Hash digest
SHA256 5fa9beec5e28a08381dd2b6803b9a08b89f3c72458f45ef30e24f89173e97604
MD5 de1d86a1803c9708534e51975a00791a
BLAKE2b-256 8a1b0f6e4644f639b230d8db8e81f9167c1469931e3688f3cce8f806fd1f7728

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2.win32-py2.7.exe
Algorithm Hash digest
SHA256 b93d208ec2f81e8f6db2cf90f16c4d41834323280219781404a884b9f83cf84c
MD5 71cb05590e5af5ae7a4c5e5c218ca839
BLAKE2b-256 e935d25d6a10dd78a208362fc7b576f7905ee190c2986602c5503e976701ee26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 7442010889de8cad9d08d23293082329b5528816f5be7f3e406af0355567f067
MD5 eba2d2d8038da1a593385862d72f400e
BLAKE2b-256 959b67f1c6874a8395c0f366af4dc636d54b4e568352e60eda46362350128aaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 e4b81fe5f23beffc39b493ca972196cd239d98ef5f6e42f67aff4e17c89eea77
MD5 4a1c2d38570dc67395b97ce5d8af922a
BLAKE2b-256 5a6f2952e2bb3b41f998cb4157048617fb5df9c2dc16ac1a281eac312e0742af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 95c107d0977e67fdc6c93ff5942fe3f3ee7b308204603ee9da60be6617f4163e
MD5 ed50e6b2e49856b212ffa08750a83af5
BLAKE2b-256 69713817fe7cefbd88f622def45747cfd72b88da7f78340d1cd246400b8ee0ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 c0295ba47e78d09b325b86f4f2a803efad7ab597081c8f36b0f191b71c199659
MD5 44392128fb89c0a1c1bf807f941e9ef1
BLAKE2b-256 c45c8a20319cd308a0c0ca4e78f97c670829f037814358497d7b268dc99cfbb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 c6ccfc3ec833d386b8f56fd4be27e07de58d3a0ad48763914cf00e6bc8d6ad80
MD5 0d3e90e0b6c6816f74c40ba6d74f0daf
BLAKE2b-256 4319869d7f67e4d8f24e00dfffd74449e316fcdbe526523870dc12cca69e744d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 822d0c1fcd19aaf6e4ac71ba033fe1e62c5f4ea69f39a0f6d24de4d09638425a
MD5 9a926c1beb68261c0534f8cd0e60fb46
BLAKE2b-256 0f536ca23b264c85b0f31fa9289f1ca9b2e283b5cc75ed63cefb4fb2e107946e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9b094877809347ac0b3f8f0d5a723830a29281045b8992eee7058b884b2e402f
MD5 1a9c05e0af71f43b6a9dc4d0c4c71b72
BLAKE2b-256 dea8ca167b2af5c0e981fc03876c7308b8e516181951f209580d4270be339b76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 38c639c2305a09220798f8e258c7affbe337dfaf47686a9f2ec34f0f32f41d23
MD5 b1c901df27488c306377b03cd0df9925
BLAKE2b-256 5bfd799effe96e23c03145b4d54af6ed2ed5b0659cc4b41596dcd9cf1484948c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a09a442890890414b87691aacbae0398dffb5248b32f2c6af659b216f450a1fe
MD5 cb30872e1fc15a4ef907eaddf73a0f31
BLAKE2b-256 5df282f35ce294330598937bd929a1cd72f9f0dd9533a5f1dab748b8f782fa09

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