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

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 accomodate 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. 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 for Windows and Mac OS X 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

  1. install pip.

  2. In a terminal, run sudo pip install cobra

Ubuntu or Debian Linux

  1. install pip.

  2. Install the python and glpk development libraries. On debian-based systems (including Ubuntu and Mint), this can be done with sudo apt-get install python-dev libglpk-dev

  3. 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 robsut 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()

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 Distribution

cobra-0.4.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

cobra-0.4.0.win-amd64-py3.5.exe (1.8 MB view details)

Uploaded Source

cobra-0.4.0.win-amd64-py3.4.exe (1.8 MB view details)

Uploaded Source

cobra-0.4.0.win-amd64-py2.7.exe (1.8 MB view details)

Uploaded Source

cobra-0.4.0.win32-py3.5.exe (1.7 MB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

cobra-0.4.0-cp35-cp35m-macosx_10_6_intel.whl (2.0 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

cobra-0.4.0-cp34-cp34m-macosx_10_6_intel.whl (2.5 MB view details)

Uploaded CPython 3.4m macOS 10.6+ intel

cobra-0.4.0-cp27-none-macosx_10_6_intel.whl (2.5 MB view details)

Uploaded CPython 2.7 macOS 10.6+ intel

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

File details

Details for the file cobra-0.4.0.tar.gz.

File metadata

  • Download URL: cobra-0.4.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cobra-0.4.0.tar.gz
Algorithm Hash digest
SHA256 104e1f73f78d463849161143e8f2b98fcd7cb5ce8ee2c5b0c704ce3153036e30
MD5 7f0cf30b03d0b297ecb80dc0bc9acc93
BLAKE2b-256 00d9c129d61759a19219c0710aa502a1bcde4bb5bd4ff7f94e8561739783ff02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 57ca2f070a11beadd99d8bcef9d427bf7554fd21c27b34a9accf3beb50c2d1da
MD5 9cfac09b898598b3d55625c7ca1863b3
BLAKE2b-256 12cc21f6d7c68aafae842ec3a6ef8a8682b22a78274b9956929515b1819315aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 93ba8fbe47638dcc30dec1b63e7b27efb8d02626b8032dae1bef0ea905c576c3
MD5 a8584870c41e30d1c7230a0b1bff5ed2
BLAKE2b-256 f7a73791f4d862e2a83dac42b6c3e2234d0d985dd7ec265c81bab15d70a49b58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 c48c8406616f2b1b5b2fbf4a36d98a3e72aa980a298a91c3868b3172d312be80
MD5 53feb25f11314256dba280de3fd2c10c
BLAKE2b-256 cfdfd9787a9c532767f8116cfad250a5df8cce2846a0803512939ae510202ebf

See more details on using hashes here.

File details

Details for the file cobra-0.4.0.win32-py3.5.exe.

File metadata

File hashes

Hashes for cobra-0.4.0.win32-py3.5.exe
Algorithm Hash digest
SHA256 b80361e3236f6a350e78ecf70c8ad14db05eecb94377571a7fe2429fb0f57399
MD5 ddc9ba42dc5a6182afe0559cebcd3ffe
BLAKE2b-256 e9e596b38ab305778479a42ec8243d3c461840e7bbb4e7f8600599def5435df6

See more details on using hashes here.

File details

Details for the file cobra-0.4.0.win32-py3.4.exe.

File metadata

File hashes

Hashes for cobra-0.4.0.win32-py3.4.exe
Algorithm Hash digest
SHA256 cee52402eacf6dc9dfb562e6de217473dc2e6635d6157955a01f7f2167c864bd
MD5 8713091fa9685532f0180ef9a4e6d97a
BLAKE2b-256 1561caf06647bfec2e9da91e7aee58870d1233ec63d53ed3714a570c76f02584

See more details on using hashes here.

File details

Details for the file cobra-0.4.0.win32-py2.7.exe.

File metadata

File hashes

Hashes for cobra-0.4.0.win32-py2.7.exe
Algorithm Hash digest
SHA256 28aec19c0394c1fd8208d282e48e0d91bee83d1130bedd9efdcc03b1e7ebc195
MD5 3d75caf585c541e4dc38024d30b73b8b
BLAKE2b-256 7911bcd0ca380ab289184691b986e92be5e9cc42688edd69ad04497c0fd32367

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 6a1cfa3b4487804ff02f9a8ec3a16433be9ee83dcfffe1821960f4bd61229c0f
MD5 c262b8e00d5d552302d3e4c0ecd19805
BLAKE2b-256 1f0ee88de82976db94e283a933e58cba2cdd0d3a0440f018fc0404888bbb45cf

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 63caae848c68b9ddb60bfb4def5dfdc4b3708391fc1880955b78633393bd0972
MD5 847e2ab89005bae34c47d508f8b4a6f4
BLAKE2b-256 d944e80d79889a833ca79a4608ed753e9815d14b2641a1b36a0e84e4e6d20454

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 4ad2dd9246dc230a5d850dc085e07c3db2ac215afac37acbe62d0c681d7f8b1a
MD5 88a8fdaec67cedc774c040537d253e36
BLAKE2b-256 e0eff1d2b892899b71b9cb808d8df515dca977d728f20a30b2cdeb5b6dfc0803

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 c1cb8511084890a24dbb6bc23af6764709588060d0350978d3865ef2a0e1d7df
MD5 b428ab9380c1369c6674a95db666ccad
BLAKE2b-256 7619af7b83c2412af0ce68513b04aa2590819d5346b0f609f7ffc51e6584400c

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 387beb50515cfe5994933bf2ea97a5c4e8f2c10fa7c03c5336f3bd429a39d364
MD5 43809cd8c2a219b253687913ead91359
BLAKE2b-256 4a2619a47ff405020f4758253c10aaf5baa4692956f5578fd9a0163970120658

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 602386c63a1eb74a14d01e135930f7f77cc60d9aa13bf476ab12a3b12bf97322
MD5 4af3baaa78d3d3b62c264c3438582b16
BLAKE2b-256 ac7dabaf3019f72e965dcc7636080e4c9c1d84050032f5fbbc76cef1026b142a

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp27-none-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp27-none-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 e2798b48fbf54f66465bd4c6e92e6824de7a1cf58ad88a2cc164cd61ce82fde2
MD5 c76e9011f2962cd0bf79f9bfb2319d9d
BLAKE2b-256 9115624a79f81bc7c0bc97bceb586f16404d344a3eb02516becf14b41d4019e5

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 59947ac8b350582fd4d60badfa9f412667d50559dae290bb982933caeb370efd
MD5 1c597a79afc6ed48b1721e52be2da654
BLAKE2b-256 70db737da4b63f70fab89436909090b8b0918987db08af27d1d6e0f20ce3494a

See more details on using hashes here.

File details

Details for the file cobra-0.4.0-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for cobra-0.4.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a08b13d6831a5eb84f2f0cc6a3b4b59aac80e3610648aa5f95500a399d9fcd3f
MD5 16888510cf65f7684a7b2a6b15a6d5e6
BLAKE2b-256 776d20e64d4680f7455583780b89522940044cbea30c099e204867a69621909e

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