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.0b6.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5 Windows x86-64

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

Uploaded CPython 3.4 Windows x86-64

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

Uploaded CPython 3.4 Windows x86

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

Uploaded CPython 3.4m macOS 10.6+ intel

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

Uploaded CPython 2.7 Windows x86-64

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

Uploaded CPython 2.7 Windows x86

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

Uploaded CPython 2.7 macOS 10.6+ intel

File details

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

File metadata

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

File hashes

Hashes for cobra-0.4.0b6.tar.gz
Algorithm Hash digest
SHA256 7a8b0e3e3d61a93e162a14b4526342ada6318123d4f0d948e546ac48b0a1720e
MD5 c72837927ce466c4c160c99fcae0e41b
BLAKE2b-256 7000af612284a9ed11f943dc6d19ffa13097ecf8f32fd04f7c3656eea51b9876

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 4989a9a3253284000bfdce1451323eda9907bf2e8641953cb6698acda012c4f4
MD5 a40d6367f207a4d8e7ed53336c2c0ee9
BLAKE2b-256 12ce0533127a5cae1a91d87e022551b3559b24a62218e9988d0ac5de7729dd9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 728d32d939d3c6ae34a964acd647f718b1282aafb14b57a0023477d177791867
MD5 79745f94ca3dce7ee4b63a8cef9c82e5
BLAKE2b-256 d1db1ff809315bf10f8e992da19ff07193b7c6594869e557a8c72c2a01d6f4d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 ed86b32921d38bd8117bd5773391b1b8e355ecb1e7f1f2bda2517e4754c1afbd
MD5 cbca2b0f11c4c3ae7068cd0e0ed83a3b
BLAKE2b-256 13ef7c51eef248d1ee8ad6822270ff8de61d6d1e27d5297a2fa0d5c649997489

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6.win32-py3.4.exe
Algorithm Hash digest
SHA256 de307efb0affadbd00c61df550364c79368db1d05898e5a9892c94d008e72f83
MD5 ddcbfcb401b8270bf2b63f283a120afd
BLAKE2b-256 cc3de4da6242ce7253cc2f6238b0040d47fcd2a81179f5ab8435ee08c7513d74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6.win32-py2.7.exe
Algorithm Hash digest
SHA256 f2356c44396d67d01eae77c9d9f07ae66bf576cf6c004017a48b3e25dd813703
MD5 aad03a98332d8ce1f9f6bac5fac8f23c
BLAKE2b-256 2198b395e098eefdc93fd6e6cb6cb6117624ce88fbd74f6797763815d353adbd

See more details on using hashes here.

File details

Details for the file cobra-0.4.0b6-cp35-none-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp35-none-win_amd64.whl
Algorithm Hash digest
SHA256 1f840fecdbc16d8621bb5773aa9ee0c86943cd1774b792323c738cdc92470ac6
MD5 c0afd5b217787c693887c07184f38824
BLAKE2b-256 6b2f722d9d70d2f3f640319cc3237983c5ef94feb51795f2e83a3e3462964b77

See more details on using hashes here.

File details

Details for the file cobra-0.4.0b6-cp34-none-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp34-none-win_amd64.whl
Algorithm Hash digest
SHA256 9eeab8534bb8712c086766807d12d61ded40d34e1ab9c25e5f1ea62ebe9f38ac
MD5 3c24e461588e1966e1f233ca099ff646
BLAKE2b-256 60eaba3a577104e65c7a3db9613bb490e6d309f704579c59e2c7716ae36c73b4

See more details on using hashes here.

File details

Details for the file cobra-0.4.0b6-cp34-none-win32.whl.

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp34-none-win32.whl
Algorithm Hash digest
SHA256 26a481b5d4aa7cbb04e7e6a477105e3e1b63fe82bf4708209eacb7b4ee5321c5
MD5 7a7c74e3cf788c58e2cd533d0db4e39b
BLAKE2b-256 f6943c98136cc837c0e484daa2ddba496db9fc3e099f5a092ffb36a14b57f7b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 0e9ff3d507b7967e2c553e3de8d8934e0efd1474b64979eb4bd921499e24d98a
MD5 bed7c088f1bd8e369364ed99e30c4af0
BLAKE2b-256 beae2a37dd5bfd5ca4bc21d92b18a6957098839ef178cec0978615a1d676829a

See more details on using hashes here.

File details

Details for the file cobra-0.4.0b6-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 07ed55e9d4345cad3b5490f0a52905c037980df2c36578ae01e86cac217916a2
MD5 2575da3ae614db59b485163031a4675e
BLAKE2b-256 dd1809dcaa323893a3c1c73c3684cd89061095ce65fd67f2a5792b596c30cc38

See more details on using hashes here.

File details

Details for the file cobra-0.4.0b6-cp27-none-win32.whl.

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp27-none-win32.whl
Algorithm Hash digest
SHA256 5fcfb05e6efaed31eca520755d89dc9b96e307f2dcee52800dae6b7742143d4a
MD5 fc4cf92dca8957a73e4020cef8626107
BLAKE2b-256 58c2403ad9218bbc5284c7c2064bc9d0705bbe0dc003fbebc28b9a5a6c085650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b6-cp27-none-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 290b63b29fd2c2060eea0ec03a177a4207dfe0a223d73e7c1031dc35f25704d6
MD5 209659e43bf901ab5aa6cbcceb8e5415
BLAKE2b-256 2fc1fd41cf96c12bfbf4cae85c0ef517cac622ef7aa9c7c0d62d8912d4ad1783

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