Skip to main content

CBMPy: PySCeS Constraint Based Modelling

Project description

PySCeS-CBMPy
============

PySCeS CBMPy (http://cbmpy.sourceforge.net) is a new platform for constraint
based modelling and analysis. It has been designed using principles developed
in the PySCeS simulation software project: usability, flexibility and accessibility. Its architecture is both extensible and flexible using data structures that are intuitive to the biologist (metabolites, reactions, compartments) while transparently translating these into the underlying mathematical structures used in advanced analysis (LP's, MILP's).

PySCeS CBMPy implements popular analyses such as FBA, FVA, element/charge
balancing, network analysis and model editing as well as advanced methods
developed specifically for the ecosystem modelling: minimal distance methods,
flux minimization and input selection. To cater for a diverse range of modelling
needs PySCeS CBMPy supports user interaction via:

- interactive console, scripting for advanced use or as a library for software development
- GUI, for quick access to a visual representation of the model, analysis methods and annotation tools
- SOAP based web services: using the Mariner framework much high level functionality is exposed for integration into web tools

For more information on the development and use of PySCeS CBMPy feel free to contact me:

PySCeS-CBMPy has been tested on Windows 7 and 8.1, Mac OSX and Ubuntu Linux 12.04, 14.04, 16.04. It is compatible with both Python 2.7+ and includes experimental support for Python 3.4+ It is highly recommend to use
Python 2.7 as not all Python package dependencies (extended functionality) are available for Python 3.

PySCeS CBMPy is now accessible as a Python module **cbmpy** in place of the the previously used **pyscescbm** which is no longer supported. CBMPy includes support for reading/writing models in SBML3 FBC versions 1 and 2 as well as COBRA dialect, Excel spreadsheets and Python.

To use follow the installation instructions given below and try the following in a Python shell::

import cbmpy
cmod = cbmpy.readSBML3FBC('cbmpy_test_core')
cbmpy.doFBA(cmod)

New Ipython notebook tutorials are available. Happy modelling!

The following installation instructions are for Ubuntu 16.04 but should be adaptable to any
Linux package managment system, OSX, Debian, etc. Except for GLPK (4.47) and SymPy (0.7.4 or newer)
no specific library version is required. For more detailed installation instructions and Windows
please see the online documentation http://cbmpy.sourceforge.net/reference/install_doc.html

New! auto-dependency configuration
----------------------------------

I am in the process of creating automated dependency checking and building tools for CBMPy. These can be found at::

https://github.com/bgoli/cbmpy-build

Ubuntu support is almost complete with Windows/Conda support in development, grab form GitHub::

https://github.com/bgoli/cbmpy-build.git

Manual dependency configuration is provided below. For Windows users most of these utilities are included in
Python distributions like Anaconda (recomended)

Python2
-------

First we create a scientific Python workbench::

sudo apt-get install python-dev python-numpy python-scipy python-matplotlib python-pip
sudo apt-get install python-sympy python-suds python-xlrd python-xlwt python-h5py
sudo apt-get install python-wxgtk2.8
sudo apt-get install ipython ipython-notebook


libSBML
~~~~~~~

Installing libSBML is now easy using Pip::

sudo apt-get install libxml2 libxml2-dev
sudo apt-get install zlib1g zlib1g-dev
sudo apt-get install bzip2 libbz2-dev

sudo pip install --update python-libsbml

Extended functionality
~~~~~~~~~~~~~~~~~~~~~~

sudo pip install biopython docx

Windows
~~~~~~~

Use easy_install, pip or your package manager (e.g. conda) to install the following packages::

numpy scipy matplotlib sympy xlrd xlwt
biopython docx suds wxPython

pip install --update python-libsbml


glpk/python-glpk
~~~~~~~~~~~~~~~~

CBMPy requires a linear solver for numerical analysis, the open source (glpk) solver can be automatically built and installed as follows (requires git to be installed and accessible):

Download the install script that will install GLPK/PyGLPK for CBMPy on Ubuntu 14.04 or newer::

curl --remote-name https://raw.githubusercontent.com/bgoli/cbmpy-glpk/master/install_glpk.sh

Make executable::

chmod 744 install_glpk.sh

and run::

./install_glpk.sh

Note this script is designed to be used for building containers and will remove any installed version of GLPK and build and install the correct version needed for PyGLPK.

No warranty of any kind assumed or otherwise, use at own risk!

CBMPy
~~~~~

Finally, install CBMPy::

sudo easy_install cbmpy

or

sudo pip install cbmpy

or try the new experimental CONDA support::

conda install -c bgoli cbmpy

or download the source and run::

python setup.py build sdist
sudo python setup.py install

Python3 (experimental)
----------------------

Not all dependencies are available for Python3::

sudo apt-get install python3-dev python3-numpy python3-scipy python3-matplotlib python3-pip
sudo apt-get install python3-xlrd python3-h5py

# need to find out what is going on with Python3 and xlwt suds
# easy_install3 sympy ???
# wxPython and PyQt4 not in Ubuntu P3 builds yet

sudo apt-get install ipython3 ipython3-notebook

sudo apt-get install libxml2 libxml2-dev
sudo apt-get install zlib1g zlib1g-dev
sudo apt-get install bzip2 libbz2-dev

sudo pip3 install python-libsbml-experimental

sudo apt-get install python-sip python-sip-dev build-essential

More information in the docs/ directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

cbmpy-0.7.7.zip (4.6 MB view details)

Uploaded Source

cbmpy-0.7.7.tar.gz (4.5 MB view details)

Uploaded Source

Built Distributions

cbmpy-0.7.7.win-amd64.msi (1.8 MB view details)

Uploaded Source

cbmpy-0.7.7.win-amd64.exe (1.8 MB view details)

Uploaded Source

File details

Details for the file cbmpy-0.7.7.zip.

File metadata

  • Download URL: cbmpy-0.7.7.zip
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cbmpy-0.7.7.zip
Algorithm Hash digest
SHA256 37db44c8d0f193c9a81f75b757a466ae4ba64855b6721ed6d6d2e35499496697
MD5 5911891c1626ab15667b161f42c2e3a5
BLAKE2b-256 904eafbf7f8bedc9fb807299092bdc19abf7c2fcd5d922f25bf6386039b712e9

See more details on using hashes here.

File details

Details for the file cbmpy-0.7.7.tar.gz.

File metadata

  • Download URL: cbmpy-0.7.7.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cbmpy-0.7.7.tar.gz
Algorithm Hash digest
SHA256 c9abc5943df7dda6b82a094eef72d361d33a20896b4423fe39ecb756b5eb73c8
MD5 db17d25b89777238a3f9e584f3064436
BLAKE2b-256 a816bafddbe7124bd7ee4c94ee8160a27ddc07367924f0e57b8a283518e7fa1c

See more details on using hashes here.

File details

Details for the file cbmpy-0.7.7.win-amd64.msi.

File metadata

File hashes

Hashes for cbmpy-0.7.7.win-amd64.msi
Algorithm Hash digest
SHA256 3db335632e29c7544d06d76a4ea31e1a056f0797199545ba68d380ca2d164417
MD5 b5d765cf525a476635b8f9232f7b5541
BLAKE2b-256 457075021070a1f80329439a1f78b328bd196cffa088bf809d10eb9a41f127ca

See more details on using hashes here.

File details

Details for the file cbmpy-0.7.7.win-amd64.exe.

File metadata

File hashes

Hashes for cbmpy-0.7.7.win-amd64.exe
Algorithm Hash digest
SHA256 9a6112f54b953400a9137e5bba7fc587bfdc99960d93b493f03ff0ed65919675
MD5 72081acb06b519c5edff631df7e56900
BLAKE2b-256 0180e025ecb4c51987cffd2df054ca27ad15dc643f53ac092ae2f0cc9546202c

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