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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 06f26f2e18cf6113fea8f9338cf96dcf5f95891cc41957d03e692f7b5d30bb75
MD5 1c994c5b393ce184edc9ab048cf007e5
BLAKE2b-256 92007eecdd26f957dc4b6379df52286f08b70deca266410f40427835c4e9645a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 69b8c82716c0b94a9ec253f39a0a0c44fc0c8ceaa6bd1f24fc87ebe9108e76f8
MD5 6795b8dbd3a4b240494cae37de7183ae
BLAKE2b-256 bc251d8ad5ab3eaac2a78b9900114aaeb1170c19148a425a88a4794f06795d50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 85109fd32b40143ede7cf04d4573ccde4a35783841870e0df8aa131e6a1aa90d
MD5 6d86c55fc94111bf4490f2c25fe3ec4b
BLAKE2b-256 14a79f6cbe36a8733d868c3becddfe4cf723fc31dcf72ae675d7e6f375107328

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win32-py3.5.exe
Algorithm Hash digest
SHA256 2128a175aae8240714d9e881b41a955e245de620f3a1914e7c4980ee2cb571a6
MD5 94d32441aa95f9e93acbd81589b11367
BLAKE2b-256 1169b6e9298560dc5eb43501080531144eae3b0b5be6c58427d04918864a008b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win32-py3.4.exe
Algorithm Hash digest
SHA256 8d311a6c37f9711ea21398209701e970c1ccb9640ca80031844804eca3e61bbe
MD5 66b6251bea70886841fe6e110086f15f
BLAKE2b-256 dd60d7be244a38cc6eec59d639d889c72a03bca80fa5820c192b6442a77231db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3.win32-py2.7.exe
Algorithm Hash digest
SHA256 967998e146b0e5d42e425cbefab969f4634f3db0c33ff1bec7e899ffd9f4b165
MD5 f68f761629756a166e41025b3e48f2b5
BLAKE2b-256 5a7953ba60ff862172d169bca79a755cb8fd2174c6ce28933e2ade28149c61fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 dcc2f3a2f31b6d1a62a6761a5c4aea6c4250f8ff82f88c8656ff53c3af642d99
MD5 adf6ced8d819aec79b254e85a148a4ea
BLAKE2b-256 f78f91eb3d2dff6195015a6591195915efefb8ad9cbf86b8e660b008be9b0e0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 47fb868598c884b943ad0ea403cbadda37f54a58ef515490f6867ec7958c9aca
MD5 9e439470839ebc15bcbccbb4f4ee4d50
BLAKE2b-256 689cc1b4f8f11612554d95a0b6ca2a99c0409472d478ada2fdacb31d08531b0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a8f1826a1727c1051f9a4c880553b512642232d3b840e133962ab131b5b25847
MD5 d33473e82b3f1ba7c16d2ecd6664dd82
BLAKE2b-256 c21a8354c6a818afe24999476bdfde4300cc78dc24501cc86fa785a238dffd4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 d45981505a1c0a9ad60ec4a4a0f75f86ddbb2b726b4ddef0b68433c3db0cda24
MD5 d20f58920ffcbb113b21748eecee560e
BLAKE2b-256 4043b01cc726aef3902685e02e4a3db1ce74f63b17b671f7bc8fad22e55982e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 1cd47b4a57ffabfdbfdcebdaf143ad0b8a066a15baa1700cbe181c040e76eb28
MD5 7a12305eb699566688c9906013c0b201
BLAKE2b-256 5288afaa564e47a3a008fab655cf845a7444c5fff0bc64040bc24f7bd029c986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8a860ccddb1dfe4dc979be53814503bf1e5d1b75021a48b1bb702cf8f50c16ca
MD5 d2f576ae18f48c4e89da8280981d922a
BLAKE2b-256 ebf87320ec529d9d53f0cca6584f76590c3800b889c647ea01e6c2380a7f37d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8e368f132e8cdb6f0efa797d547e5bd6612ec768431374253cb316356fc10d08
MD5 faf3e8ac354952ca20f1e42e39b630d6
BLAKE2b-256 bcf72086152ed5c01c42d8249ada178a83732e8f1df2f8b5cae3ce1f9e2c5587

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 51cd99920d45ddde49371d1a347fcb6273931397c821cae3536a7b143b9564da
MD5 c8f42e907a36565dd3a8a1729e1346b9
BLAKE2b-256 d5a3309994705c537ffa0b79eda040ba589536b6567e8fc7590711e59e962fef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.1b3-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a84990c9975fd8249e3c7e6c5532af68e4da03f4d384377759055f867c9b4aa5
MD5 41c537c12261b3e050333b9738061a1d
BLAKE2b-256 ac82e525b5124a744f7f32264fa121e651966447f11cc51d3b935efa35a93ee6

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