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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

cobra-0.5.0b2-cp35-cp35m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

cobra-0.5.0b2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.5m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m

cobra-0.5.0b2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.4m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

cobra-0.5.0b2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.5 MB view details)

Uploaded CPython 2.7m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 78a3f14fac788f455e9f1edeec97730cafea924a0df093746d54401d73606bcb
MD5 0dcb5290b656a2c37b27a2d19c57d131
BLAKE2b-256 888efc49acd4178ca704c57a6b209e6197824effe46b1bb7bb2234f24070f4a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 9c0ff637b553fa5a2f3376665098e760e0f1b838c34412e368c25f8b65b5d838
MD5 2b3374d57b69cecdab467b01678e6b8d
BLAKE2b-256 e68470233ad708b0bdecfe8f48739786b29b2982588abef9f6b445ba7aca29d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 572efbb11d6a5f53eb42b1bfb9d7dd0b23548ee7d097281e92ae7037120fafe9
MD5 7168fc74c2562819d4527a984fe91b05
BLAKE2b-256 37ce5cc7ff133a81a85f24bbff6f356543da647e3b0493a2beb2c2f72523b293

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win32-py3.5.exe
Algorithm Hash digest
SHA256 64ba5c941f3e7bbf5191f8430dad9769b4373232c37b28e272aa57986280bf71
MD5 dc8ff3c8b368b98013f9cde7e5ad44ed
BLAKE2b-256 fca8f8e865a21bee0cccb85696ec6bb1b75f457140192d5c9b3379d97f1489e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win32-py3.4.exe
Algorithm Hash digest
SHA256 f444c5a3f1842fff1ba0112bac537f4d55cd6163a0208a58271df0ae8820964e
MD5 21f420aa6ff886c5ddbd307a6c0c8dd2
BLAKE2b-256 a2ff41784a336d54d0bb47e1aa7d267c22b46605f16a25e9eca6b89842376197

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2.win32-py2.7.exe
Algorithm Hash digest
SHA256 bc6cd86a52dcab5659d696771b11354624040b14974a25d70a2a51219d01f3ee
MD5 6e0d4a005faa745f720af05839b43d6d
BLAKE2b-256 f78d80e9b5379f507dc23bd300b51caa150c47faf5aac51438610e560f2ee84b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 540d303470b5721b14f3d10af193834c734b79bc56279da2f2687661620bc4b1
MD5 9a17309dbc3e3473bf49d8b4c3b7186f
BLAKE2b-256 ad91172f7eca2b54ce0e92c3d4f976524e02d0421f990d56d21634fc989a8f90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 73bdc2540eb886a3168f0db3a5df9ec8a999a5795c13ec360a5b0e5c9925c3a3
MD5 620b5fd11996745d3d306bcd4a9efde4
BLAKE2b-256 57306813d7b89df04bcb2b5804d8421103e6f56e8a380a1f88474a1cc3dec676

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 975125e2413cf9903548683b43b068f6e4b64248364371c9a64c1752cb6adcd3
MD5 8f170e110720ddcb974defcf824e99a6
BLAKE2b-256 25a5de1c2cb64080e8d00c29c914f63bace1cbc8ad5757da5c9ea1f2e9396f46

See more details on using hashes here.

File details

Details for the file cobra-0.5.0b2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 a098771c534f8c7110c128502fd3f1de557d9a40b75d1cbd0abdd27c650a1f2f
MD5 60339ea4478d31b33b94f1cf5c922ade
BLAKE2b-256 0e6acef5a1a970c6f7a5e49713438a91cb1de7944b5277df01391aaab24b7969

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 a72d510175b5881f22f39230459dd30cb2ee116f5026b86cc133910d3c173795
MD5 6b6d235af865bc4234bf595b9b6d24b5
BLAKE2b-256 efa350ea65d80467fd9cc5e5115e6e412b76387da74ec46133fa8198b0e7f71c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 910b0312efb75a448926df52995e2330ec32a4cf5ad2670afc63347bffe23872
MD5 6d07a06fea25c79518d601d0d4affc2c
BLAKE2b-256 4577552a62fd01adf8d6252f1e3507a8810ea42af7ac23affdc193eca605ea9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eba815816171c27ca4dc1e4f33775f7f7afb3f31300d79dfc80523482cc78ff4
MD5 937e4b3f907cd63ba75550dc02d1eff7
BLAKE2b-256 eda05cf5b8d03b88ff3aa7720f45ab9827b74dab154df132ef391c14013665e6

See more details on using hashes here.

File details

Details for the file cobra-0.5.0b2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 01211acc5439e14e03f142924497ef236312caf51828412629be720cf3deca02
MD5 c62f4fdb2a6ecdf495502779ea7b702b
BLAKE2b-256 9619ff1445f0101d0b37a7b6929cee0f895fecda2a41770f9dc2e6e021c7eaaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0d02075544420de39f782637468ae045cfe788f164efc3fdeb21133c47601607
MD5 98b54188e937157ec4d2bf6642b9fa67
BLAKE2b-256 3017aa866f188cc4d4025bb4f26bc1e955d29993e7040daf390c4ccd07d525d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 061a2f72d110f87b7bb1f20eb5189bcf564a509f24cbe009cf26541a016b2faf
MD5 ca893d212edd89faf12b803d23c61d40
BLAKE2b-256 97ae0244295cfecafcdb553d4dbcb93afb548faa4f951a877dffe8ca60e10146

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 f434137ef87460bae22cb24553cacd302f302983c4b4fc7a8d78482a3f92c4ad
MD5 24f3c0db8711dc9659d5f0b999d43ecf
BLAKE2b-256 15947e1fc6f08b9ea9630bda21e75d848b912c895454c80c342fe711071d2c4d

See more details on using hashes here.

File details

Details for the file cobra-0.5.0b2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.0b2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 bd354d82b150b3b9cfe9d80d43e0751c1cde81e5f74508f5be8b96c1b0bc87a7
MD5 8f8edbb03376b298f1e804810c2fe2f2
BLAKE2b-256 00f5a8e2d5f0990e9415e536f4871b1066f92a47c1432090f29f52c46a840170

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