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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded Source

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

Uploaded CPython 3.4Windows x86-64

cobra-0.4.0b4-cp34-none-win32.whl (1.5 MB view details)

Uploaded CPython 3.4Windows x86

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

Uploaded CPython 3.4mmacOS 10.6+ Intel (x86-64, i386)

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

Uploaded CPython 2.7Windows x86-64

cobra-0.4.0b4-cp27-none-win32.whl (1.5 MB view details)

Uploaded CPython 2.7Windows x86

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

Uploaded CPython 2.7macOS 10.6+ Intel (x86-64, i386)

File details

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

File metadata

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

File hashes

Hashes for cobra-0.4.0b4.tar.gz
Algorithm Hash digest
SHA256 0a3b13c955422c9ff63287cfad66897185c748a49af889f62b12655f906a8e24
MD5 705cd8091af260ca806dc74090cf2673
BLAKE2b-256 aea04f3530834ef98e471462109e896c7545e2fe4b44c8d39697d3272a84f49d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 0cc1494290e272b562f9fa50a85e98158122dde27a4419b9d70333b672471abf
MD5 f30fb4bf8467202f43ed8f81494b4455
BLAKE2b-256 7ecff1ac96821e954e277923a5d4c225de7f45a61836495ae2931593a7f90b7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 a181fff4aeec56f48b5c33cf102c1455740b80753b7852264b95fec68054feb1
MD5 05798682433d1cead63c0851e0cf7c07
BLAKE2b-256 21f2a4ba3590c96ccce6da09db1157fd4dba0ae2cd7d76aaac53288daedb3f1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4.win32-py3.4.exe
Algorithm Hash digest
SHA256 ccdd2bde2f34b0a0b91529c2a49eb8b91b337751ff8d275c11fe1a192b4ab71b
MD5 a3772ccfd4bbcd74d9227a6126558b0b
BLAKE2b-256 961f3ea82bbc966071aa12b0451a16c4509a5481187509088951e1098000bd51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4.win32-py2.7.exe
Algorithm Hash digest
SHA256 c7b6f6c50aef01b1decc6d5af2e51af2eb50c5bd057a445ea6317a25f2f0bc83
MD5 6bf140a9914f95d59fe8906a812a5806
BLAKE2b-256 6375d042e5f35835dba691575d41aa11f5e26387101f63987eb569150319208a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp34-none-win_amd64.whl
Algorithm Hash digest
SHA256 750a7f9ec1be1e9f88005a758473ab8ff7b0a442f4cad06f6079234c3221d3d1
MD5 484640cde371430958f3891b728c07fa
BLAKE2b-256 c005b34c9765b3c8dcc02e4c4deaaa3a1d6fe5e4cd806fad049a98342ff6a02e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp34-none-win32.whl
Algorithm Hash digest
SHA256 af80022c09b4f96e22a7b00bc592d17d8ac9b1cffb581606404c296f885e9131
MD5 122d97164e2f2a65def96154664dea9e
BLAKE2b-256 5b79c02920bfd8a85f3077be387663bd1ac5ff30a1d16abfcbf1757333f45128

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 fe4056b43692a4d86c54293092ee1f1e16702ae464b0c7ad24e349161f751cd0
MD5 ad310686e292c0d78f46b057193b8e5c
BLAKE2b-256 398a3e2a3dcd6fa2cccd2b5a76699397a39961a906e89a27383663ea61bc40d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 20ad9a10fdf3aa0771a6d21c336fb4c1e1e8d352896f63c9abacd63ec8524eee
MD5 a6b852b6f63345c5a7996e5a396b1fad
BLAKE2b-256 91977efa10837ffc9a0498e9163e5ec339363bd4cd7a6db8b3fbe136a7a6e5d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp27-none-win32.whl
Algorithm Hash digest
SHA256 0215de5b0f577767248201e53e5deb3114168f587c1f40900be66d23b44f166f
MD5 902be8866e5d8852dbf4dc76b1e31463
BLAKE2b-256 685c3f9bd1350710e8504acb046203324711e3e75b9a7d978c8bbcbdb980281b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cobra-0.4.0b4-cp27-none-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 c4febf3152ce09a16044f90242bd0c3a646d4f3d6fa697ecf4f9311cba323a3e
MD5 711715e86da84f077f87426fa3cc81db
BLAKE2b-256 b040017f5ab73265583921cf8532dce2c79c1ecb532d1ab8640b256e4a5dffe7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page