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 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. 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 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()

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.5m

cobra-0.4.2b1-cp35-cp35m-macosx_10_6_intel.whl (2.1 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

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

Uploaded CPython 3.4m

cobra-0.4.2b1-cp34-cp34m-macosx_10_6_intel.whl (2.1 MB view details)

Uploaded CPython 3.4m macOS 10.6+ intel

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

Uploaded CPython 3.3m

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m

cobra-0.4.2b1-cp27-cp27m-macosx_10_6_intel.whl (2.1 MB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

Details for the file cobra-0.4.2b1.tar.gz.

File metadata

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

File hashes

Hashes for cobra-0.4.2b1.tar.gz
Algorithm Hash digest
SHA256 3295fe2fe55a13c0481897e23b09a8e80614206001718ea20801ae66087dbc09
MD5 ff4a94bca19b9c77450617bc7e1ef8bd
BLAKE2b-256 8bd02e5ccb6304c213f651091dcb39b695dbf58ab1d95e9f0cd20add73569f4c

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9835bea954f107cc4d689eeaf5a0b8bafd495346ffc668b456a9ae1ee1a3f710
MD5 3ee01e195145f8a4d586cc253047b0cd
BLAKE2b-256 818d250a083ff300f4ee2ba5006311e0787cbd1d3e3de6c39b5108ac7f923470

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 5333dd500aa1d4f129002a96331e0eb6a07f157efa6b1c0102d0b6fa1a0632a2
MD5 a82324bc78d9a6778105e1feaac84d79
BLAKE2b-256 79a36840f75ec0216188cf9d69531cbed8fd123f029c6fa92eb1b401ab339772

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f49a01ced588c2abfdda28a6a3350732041cf541f91f5685991a1370e81188cd
MD5 013331c2657684d65acf5744b601e3c3
BLAKE2b-256 cb3449d171ebf0f9ee12687e83dc381f779fe8459790f9529adeaaaa6eadf3ec

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 5269b598d782568b6ee432f4f669d9eb8f19e5ac45ebb5a039a09134506849df
MD5 68208553fa1086db54e54d54d06ca5ea
BLAKE2b-256 dab8927b926fd0d419cf5e464d31926ed5ba8f28737d22d2b387ff9846df7fa4

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp33-cp33m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 89bac0491c6ee4949c7fdd78eb2b44f497565697e1f21fe4e0974cf3bdb29b2b
MD5 618bd3af189a350061d3458af23c2192
BLAKE2b-256 0f65776db8bfeca1cbee9b39b7acdbf5664188a94685b754c2a4f0a4a00016ec

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 46d53ef995f3deb61e995994355148c0a03d0f5276d19607d849439c3e73f83a
MD5 8c2347b38c6ba267fbdb938785c41c30
BLAKE2b-256 8fb909474589f494f367607142007aa489403776d763281661130cfd137c8c18

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6eed51d98a3e12c5b9f1b220482dd14293633e8dc7275d3eb2315e2f9b07b35e
MD5 a335a50ee4de20e46bdbd1cb57cce8ee
BLAKE2b-256 5778b461bf1a196d3cd04a0310794fe5d05bd994996c2278fc3d77c8847f98dc

See more details on using hashes here.

File details

Details for the file cobra-0.4.2b1-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for cobra-0.4.2b1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 8290461bfa7e12cf05d2be8bed43e80d8a938b148a94e059fad794e3307cbe08
MD5 654b871302590c27ac47338f899ccbb9
BLAKE2b-256 f7c4a4b4062b8e40ede7260e3b93bd93865b75f9c99f5c99eedea4b6c9e57d04

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