COBRApy is a package for constraint-based modeling of metabolic networks.
Project description
COBRApy - Constraint-Based Reconstruction and Analysis in Python
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. By writing a well formulated question, with sufficient detail, you are much more likely to quickly receive a good answer! Please refer to these StackOverflow guidelines on how to ask questions. Alternatively, you can use gitter.im for quick questions and discussions about COBRApy (faster response times). Please keep in mind that answers are provided on a volunteer basis.
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
If you want to load MATLAB models, you will need additional dependencies. Please install:
pip install cobra[array]
For further information, please follow the detailed installation instructions.
Contributing
Contributions are always welcome! Please read the contributing guidelines to get started.
License
The COBRApy source is released under both the GPL and LGPL licenses version 2 or later. You may choose which license you choose to use the software under.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License or the GNU Lesser 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.
We only test against Python 3.6+, however, Python 3.4 or higher and even 2.7 should work mostly. For Windows users and possibly also Mac OS users, we recommend using the Anaconda Python distribution.
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
We highly recommend that you create a Python virtual environment.
Install COBRApy when an environment is active by running pip install cobra in the terminal.
Microsoft Windows
If you heed our recommendation to use Anaconda, you can open an Anaconda shell and install COBRApy from the bioconda channel. Soon it should also be available from the conda-forge channel.
conda install -c bioconda cobra
Installation for development
Get the detailed contribution instructions for contributing to COBRApy.
Solvers
COBRApy uses optlang to interface the mathematical solvers used to optimize the created COBRA models. At the time of writing the supported solvers are:
ILOG/CPLEX (available with Academic and Commercial licenses)
GLPK which is automatically installed as swiglpk
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
Built Distribution
File details
Details for the file cobra-0.23.0.tar.gz
.
File metadata
- Download URL: cobra-0.23.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5ff00fe53e1cda92ca03535f249b005627b910cddf49fbc5d57f6ebe8633e4c |
|
MD5 | 130a71b38c4c822d0c9a9a827b86707c |
|
BLAKE2b-256 | 14429b50b2423f7069d7057cb91385db7e42fe9dcf42bf6d389fd5b25bf74275 |
File details
Details for the file cobra-0.23.0-py2.py3-none-any.whl
.
File metadata
- Download URL: cobra-0.23.0-py2.py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65acd7e55cb7abaca6c4f7105c37ecffd2e39ea5edf0c2b80641a339f1fad3a5 |
|
MD5 | b7e970eb191eecb8e0928aece3f1ec42 |
|
BLAKE2b-256 | 8f311e45611016e3b4064c567225345ef262fc73c0bf7edb92553565b9bb488a |