Skip to main content

COBRApy is a package for constraints-based modeling of biological networks

Project description

cobrapy - constraint-based reconstruction and analysis in python

Build Status Coverage Status Build status PyPI Gitter

What is cobrapy?

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.

Our aim with cobrapy is to provide useful, efficient infrastructure for:

  • creating and managing metabolic models

  • accessing popular solvers

  • analyzing models with methods such as FVA, FBA, pFBA, MOMA etc.

  • inspecting models and drawing conclusions on gene essentiality, testing consequences of knock-outs etc.

Our goal with cobrapy is for it to be useful on its own, and for it to be the natural choice of infrastructure for developers that want to build new COBRA related python packages for e.g. visualization, strain-design and data driven analysis. By re-using the same classes and design principles, we can make new methods both easier to implement and easier to use, thereby bringing the power of COBRA to more researchers.

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

Installation

Use pip to install cobrapy from PyPI (we recommend doing this inside a virtual environment):

pip install cobra

In case you downloaded the source code, run:

pip install -e .

In the cobrapy directory. For further information, please follow the detailed installation instructions.

Contributing

Contributions are always welcome! Please read the contributions guideline to get started.

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

We highly recommend updating pip beforehand (pip install pip --upgrade).

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.

Installation for development

Get the detailed contribution instructions for contributing to cobrapy.

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 Distribution

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

Uploaded Source

Built Distributions

cobra-0.5.2.win-amd64-py3.5.exe (2.2 MB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m

cobra-0.5.2-cp33-cp33m-manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.3m

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

Uploaded CPython 2.7mu

cobra-0.5.2-cp27-cp27m-win_amd64.whl (1.7 MB view details)

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

cobra-0.5.2-cp27-cp27m-manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 2.7m

File details

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

File metadata

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

File hashes

Hashes for cobra-0.5.2.tar.gz
Algorithm Hash digest
SHA256 8f6bd5fd322e3f5829d901532c5fa496e7cbec9a80dc23bc82b357d33fb9c8c2
MD5 181b1c9f02154c458f61ead8799c2b07
BLAKE2b-256 6fc82ad3eb391888b0555c02e91fa3d9cafa76204aa8cd41e86802c5cb11ff0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 d53aab0b2f255978ad0821bfd68c8232da3d0ba4e11a52b095ae5402e4a8df2e
MD5 8922f48d480933ab4e8dac18aa1da95b
BLAKE2b-256 31100fdc65bc20cfe6647dc07a0c6fd415f571e7f672d97333b4864cbe7abe96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 fb203fb86fd8fcc9aa23477c31fd81357b6e286a3814f55bbf9b6e1371902fb7
MD5 862fdae8fd3ba28eed36d1f9d9859dd5
BLAKE2b-256 79f9dd0f261207baa89872d795aedd3dc81fb477f5e5bf755ce531c4dbe6a615

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 110f268a48cb44ac7b9ff04a33fc08db90a944998534fd8b6a58ec95635652ac
MD5 31a81e9d6d37f1da3facad62913e764f
BLAKE2b-256 a853082e36d88c71297dfde863f918e4c6adc7e495e13d800bbac5a740ff1219

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win32-py3.5.exe
Algorithm Hash digest
SHA256 e52070604da887f147e9460e0489a2a96e8ea945f69171aa29d8b28eccbecab2
MD5 0126e64042ba8b3b0e7cae3a9bd36d34
BLAKE2b-256 5f06e73976f6f21055290c2d4b87b13b7e8374e392927da7a826409b6601e701

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win32-py3.4.exe
Algorithm Hash digest
SHA256 fa745305751891542859b18ab4f001af2156b3b25b3cc0f277ab6a42cff435e9
MD5 e67dabe22e275e9ce5ae2babcf54e65e
BLAKE2b-256 5d9b0eea984320062f6819feeb4573597a41e31a532f0058a3c971560711bcaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2.win32-py2.7.exe
Algorithm Hash digest
SHA256 10241f5153dd8cebb89561fc3d6a57ef17d19b1b8ad6d63d476cffa052d77b94
MD5 7de10502f160167246bd86c1e7bb53e1
BLAKE2b-256 3dc17c1681994586707c0a962e5ea5b9c93dc0a73a5cb85f3abbfe2a4b38f79e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 4f9dfb52fd70fbd293132f88e042a09782ce57c41a44be477099483c0edc1fdb
MD5 528dfabddff014de1f01945a6c31d261
BLAKE2b-256 8d685363716f5361f4f78627f1a65ac2f45d2fb732ac24e8161865c229cb8b30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 24274e54db3898adb5b102012b78c5f09e4979bab8dfabb4e51d25c65047b083
MD5 39485ea7d536a83290004d97cc2b9fc8
BLAKE2b-256 a1ecd57c3097f49c7d9816f025716402ff2e9a3e7c8bb5165f777d5c4ec23fd3

See more details on using hashes here.

File details

Details for the file cobra-0.5.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7317e8ff5763c786dde11b03894842685a99626240f8be6aca869fb3e19d65e0
MD5 7fe82155c46a48f95517fbd3e874d605
BLAKE2b-256 437b1fe62e2746eae70e14888fd60f79247a5a680aabb9eed703194ea59072d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 df84679a487b072cdb91acb2064c6e135d2f671c50c41cd67ed772e027f24512
MD5 7d218e843cfc0fe3d109bffc69327c5d
BLAKE2b-256 9b139cfee9d94d00b19e0705aa831e2d03e08b147063f90480ffc91ebe1e96d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 d16cae1a44eb42352c4a55ee78266e82913a790a88e31e8199633ac1f497ac75
MD5 c6ccdecd86d3e4398af5e88a9d9a66a2
BLAKE2b-256 a1adc2a041333786db6863db2d61c1225a0880121123b6767055745533473a28

See more details on using hashes here.

File details

Details for the file cobra-0.5.2-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 124a52b532bc8913c452ad3eb0e4da2f2ac2f25b7ab0326ec1e5d55f24a89aba
MD5 d47304cb6075ccc1bcb147e95bc273eb
BLAKE2b-256 ef89e182b0e387325c8812252758107a439e4ae8ba078264a31b873e862ee280

See more details on using hashes here.

File details

Details for the file cobra-0.5.2-cp33-cp33m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.2-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f4e77c63ad4be94b06c786a12ef14308e6e3468aa2068a0abf6410996826887d
MD5 5a615fbd55d71d83cb300de53fefe374
BLAKE2b-256 80133812eb1ecaad487b89359aaba939f1629b91b2c4d7a78c6dbdb0de8ee043

See more details on using hashes here.

File details

Details for the file cobra-0.5.2-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f69d5e7c02fdd0058258f4043f9562b3373538629863f667771e569029fe25e8
MD5 a1480a72e03e9166a5c7c04dd20a1b18
BLAKE2b-256 7ab201b88d89e87d611f098514a66f2ed289a0b2024d308f962754865eefb0a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 455495cf58111cf5a1b2234066cfc8dcb0ce464d0d26c04198c70b49dedbc241
MD5 e9a74c845431aa29c9da08654e062190
BLAKE2b-256 23d60fc3f7d484430fb493df2f9241337c6307d37ecc6b3ff0886425802cb845

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.5.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 45184a5c014045b36f5553062827fad14eae875e15ca186c62ced3479832424a
MD5 da1a4a0a10be324e1f730a1b89187af9
BLAKE2b-256 ef21a75f04dda9c101e4caac78dfcdd2a6b74bed27bb9132de665aec3e71ea43

See more details on using hashes here.

File details

Details for the file cobra-0.5.2-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.5.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6ab426c286f9a5b26f2860264297b13b54bca9f2a793a5189c5a2acd87589e21
MD5 e9ae10e9b6614d2e1eef0f2ae0d7c33a
BLAKE2b-256 24e49227b84dfe26a705cac029437cf75424b104d382af86c8d58cd806ce53a6

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