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

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m macOS 10.6+ intel

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

Uploaded CPython 2.7 macOS 10.6+ intel

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

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

File hashes

Hashes for cobra-0.4.0b7.tar.gz
Algorithm Hash digest
SHA256 065c4170a09619824ec4c82d2988a9bd39560bb42db2f87d10908a1da1a9306e
MD5 1abf50018240151f782536b5483e0651
BLAKE2b-256 f8973ffad36f619895d2b0dfe7625e3088e419218f98c052e7a1dfee379080cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7.win-amd64-py3.5.exe
Algorithm Hash digest
SHA256 a4b28db5f6afe248afdd8689971f649f74b2ea1aea562000f8eb03c1bfed8175
MD5 c16cc5ea2360078229eed294e90fb135
BLAKE2b-256 0408f3e689de89ccd907e7bec7bf2f61ab82625f51240f78d3570e06fda3d0be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 9859234de9490bce9608e1c9ff4d853469ef3699bbc9f7b755259f1b15b8cda1
MD5 f488bed70c0741c31a74ff706120ef39
BLAKE2b-256 791cfb2935d7bf0eecf690db59c69fc8458d0d939f8c48607b7574ef0da40177

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 6e4aff53b2b33f25b01026691319ebed99ee1ddcaca375d06f9255d04be1d5d5
MD5 1db3f637c37f4b2f98a8eace27069011
BLAKE2b-256 89c96369354b611374aaeab46681761c517fbc57c989c41c05844a8f466fa115

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7.win32-py3.4.exe
Algorithm Hash digest
SHA256 dbcc7bfb7dee96ec07067af009a10a591f9a1b24ca0fd6453b72db99e3015210
MD5 c8ef41f508f9404d8a32df92ecc16e04
BLAKE2b-256 79c4ba91061e13745a0ac2c258a1e1904face2afb570449245535d464059099a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7.win32-py2.7.exe
Algorithm Hash digest
SHA256 8659b79c33ea3b96e01f5dd370561537c8daf7dfb5225ea26038e65e9be8cf9a
MD5 708e071eafcc999c0a6e75e0e781234a
BLAKE2b-256 fadd089b8b4c34ead69981a83ae7de98072d7b3b6f10e886186641b124be000e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 af89497d711b812dfbe156c4a6368ed18fe53e64cc502d921e10715e6769fcfe
MD5 ea2e06a86d0b2749893075504bbe098f
BLAKE2b-256 04a12904b2f284ee6d940f64ead7d41c3d67afd419309be9a7b299968ac82ef5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 5b73f711c7823829504a1857dce2e041003539178dcc1bb24f6aa9be682111c9
MD5 71232dc4e73d6e105fc4f5de6c844ec9
BLAKE2b-256 537e0816b353ba8e8e1bff357f353ac82b4ce69d7b43442ac92ebc4dc7572181

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 ad06d50892c4b2bc5bfe22d15daa56dbed86bdd24a406ea5fcfd874f1111cc5a
MD5 b68dcc65d4b1e8da0b587d89ae776537
BLAKE2b-256 88a3922096060c6a2181a2130accda6ea2bf7be27a6a6d30d309da904ceef9e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 59b8411fe533ce029ca84dec7b0bdfcde46ec53b3ea39a986dc6dcca2d048d5c
MD5 a0fa7d4bd6b05817f65e30bfdf885545
BLAKE2b-256 da32430cb4d50c28cce3ea15d140f18e633663517954b7c3d22bb6cd583791c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp27-none-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 78f71426661874b5c3dfb5ae629da6e70c2c9e48735b08a2980a913d967d6536
MD5 429a39d25f1805e014ac0e5ea36641e3
BLAKE2b-256 de3580b3558ca1e80052824b39c9d76b7454b0468b4392cbd1ad76721dc24000

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 064e571496ea7bd89320ce8ad1de88f25181c77e8809e5c64fa0463b6d627379
MD5 53529253b63cf6f870ca80e3f2ef4e6d
BLAKE2b-256 efba0f6735754be41dc73907eee02b2dedebfba692c7467562f75be651590218

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b7-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 9702f3ccd0ababc2f7c29c92294a0ea977832b0b7dc36988a9c7eb924b391a87
MD5 6784f3dc9a9d91ec40271374d5accdae
BLAKE2b-256 9a6a92a2900d1fcbe5cd3de05a6c963b58e209d6c96797db53f39e95d18a9caa

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