Skip to content

Commit 6452684

Browse files
authored
Update README.md
1 parent 66045d3 commit 6452684

File tree

1 file changed

+30
-162
lines changed

1 file changed

+30
-162
lines changed

README.md

Lines changed: 30 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
CBMPy
2-
=====
3-
1+
# CBMPy
42
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
3+
Copyright (C) 2010-2021 Brett G. Olivier, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands
64

75
This program is free software: you can redistribute it and/or modify
86
it under the terms of the GNU General Public License as published by
@@ -17,13 +15,9 @@ GNU General Public License for more details.
1715
You should have received a copy of the GNU General Public License
1816
along with this program. If not, see <http://www.gnu.org/licenses/>
1917

20-
Author: Brett G. Olivier
21-
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBConfig.py 144 2014-01-16 22:27:55Z bgoli $)
23-
24-
Installation
25-
============
18+
Author: Brett G. Olivier (@bgoli)
2619

20+
# About
2721
PySCeS CBMPy (http://cbmpy.sourceforge.net) is a new platform for constraint
2822
based modelling and analysis. It has been designed using principles developed
2923
in the PySCeS simulation software project: usability, flexibility and accessibility.
@@ -41,167 +35,41 @@ needs PySCeS CBMPy supports user interaction via:
4135
- GUI, for quick access to a visual representation of the model, analysis methods and annotation tools
4236
- SOAP based web services: using the Mariner framework much high level functionality is exposed for integration into web tools
4337

44-
For more information on the development and use of PySCeS CBMPy feel free to contact me:
45-
46-
PySCeS-CBMPy has been tested on Windows 7 and 8.1, Mac OSX and Ubuntu Linux 12.04, 14.04, 16.04.
47-
It is compatible with both Python 2.7+ and includes experimental support for Python 3.4+ It is highly recommend to use
48-
Python 2.7 as not all Python package dependencies (extended functionality) are available for Python 3.
49-
50-
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.
51-
52-
To use follow the installation instructions given below and try the following in a Python shell::
53-
54-
import cbmpy
55-
cmod = cbmpy.readSBML3FBC('cbmpy_test_core')
56-
cbmpy.doFBA(cmod)
57-
58-
New Ipython notebook tutorials are available. Happy modelling!
59-
60-
New cross-platform conda support
61-
--------------------------------
62-
63-
CBMPy is now available as a crosss platform Anaconda package available for Win32/64, Linux32/64 and OSX from the Anaconda cloud (https://anaconda.org/bgoli/repo). This is the first
64-
major release using the conda platform and all feedback is welcomed. If you have Anaconda installed (tested with 4.2.0) simply try the following::
65-
66-
conda install -c bgoli -c SBMLTeam cbmpy
67-
68-
which should install CBMPy, libSBML and all the required (non-solver) dependencies. If you do not use Anaconda or would
69-
like to try install things in a semi-automated way carry on reading.
70-
71-
The following installation instructions are for Ubuntu 16.04 but should be adaptable to any
72-
Linux package managment system, OSX, Debian, etc. Except for GLPK (4.47) and SymPy (0.7.4 or newer)
73-
no specific library version is required. For more detailed installation instructions and Windows
74-
please see the online documentation http://cbmpy.sourceforge.net/reference/install_doc.html
75-
76-
Auto-dependency configuration
77-
-----------------------------
78-
79-
I am in the process of creating automated dependency checking and building tools for CBMPy.
80-
81-
Ubuntu support is complete with cross platform conda support now available for testing (https://github.com/bgoli/cbmpy-build.git)::
82-
83-
To start with download the install script that will run the system test::
84-
85-
curl --remote-name https://raw.githubusercontent.com/bgoli/cbmpy-build/master/ubuntu/1_install_cbmpy_dependencies.py
86-
87-
This script will analyse your Python distribution for missing dependencies and generate a shell script that will auto-install them.
88-
89-
For an installation using the native Python supplied with Ubuntu run::
90-
91-
python 1_install_cbmpy_dependencies.py UBUNTU
92-
93-
For a local user installation of Anaconda try the following. This is not strictly necessary if only CBMPy is going to be installed (see above)::
94-
95-
python 1_install_cbmpy_dependencies.py CONDA
96-
97-
in both cases a shell script `metatoolkit_install_dependencies.sh` is generated and printed to the screen. Run this script
98-
or install the relevant packages by hand.
99-
100-
Installing or upgrading CBMPy
101-
-----------------------------
102-
103-
Installing or upgrading CBMPy can easily be done with pip::
104-
105-
sudo pip install cbmpy
106-
sudo pip install --upgrade cbmpy
107-
108-
or try the new CONDA support::
109-
110-
conda install -c bgoli -c SBMLTeam cbmpy
111-
conda update cbmpy
38+
For more information on the development and use of CBMPy (https://github.com/SystemsBioinformatics/cbmpy)
11239

113-
or download the relevant source from SourceForge:
40+
CBMPy has been tested on Windows 7 and 8.1, 10, Mac OSX and Ubuntu Linux 12.04, 14.04, 16.04, 20.04.
41+
CBMPy is currently developed on Python 3.7 and Python 3.6 or newer is highly recommended
11442

115-
https://sourceforge.net/projects/cbmpy/files/release/0.7/
43+
# Install
44+
The best way to get the basic CBMPy running is to install with Pip or create an Anaconda environment. CBMPy is developed on GitHub (https://github.com/SystemsBioinformatics/cbmpy)
11645

117-
and run::
46+
## Install with pip using requirements.txt
47+
From a terrminal or command prompt try:
11848

119-
python setup.py build sdist
120-
sudo python setup.py install
49+
`pip install -r requirements.txt`
12150

122-
Installing glpk/python-glpk
123-
---------------------------
51+
## Install by creating an Anaconda environment using environment.yml
52+
From a terrminal or command prompt try:
12453

125-
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):
54+
`conda env create -f=environment.yml`
12655

127-
Download the install script that will install GLPK/PyGLPK for CBMPy on Ubuntu 14.04 or newer::
56+
This creates an environment **cbmpy** that can be accessed from the command line using `conda activate cbmpy3`
12857

129-
curl --remote-name https://raw.githubusercontent.com/bgoli/cbmpy-glpk/master/install_glpk.sh
58+
## Check the basic installation
59+
To check you installation follow the installation try the following in a Python shell:
13060

131-
Make executable::
132-
133-
chmod 744 install_glpk.sh
134-
135-
and run::
136-
137-
./install_glpk.sh
138-
139-
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.
140-
141-
No warranty of any kind assumed or otherwise, use at own risk!
142-
143-
Legacy installation
144-
===================
145-
146-
Python2
147-
-------
148-
149-
First we create a scientific Python workbench::
150-
151-
sudo apt-get install python-dev python-numpy python-scipy python-matplotlib python-pip
152-
sudo apt-get install python-sympy python-suds python-xlrd python-xlwt python-h5py
153-
sudo apt-get install python-wxgtk2.8
154-
sudo apt-get install ipython ipython-notebook
155-
156-
157-
libSBML
158-
~~~~~~~
159-
160-
Installing libSBML is now easy using Pip::
161-
162-
sudo apt-get install libxml2 libxml2-dev
163-
sudo apt-get install zlib1g zlib1g-dev
164-
sudo apt-get install bzip2 libbz2-dev
165-
166-
sudo pip install --update python-libsbml
167-
168-
Extended functionality
169-
~~~~~~~~~~~~~~~~~~~~~~
170-
171-
sudo pip install biopython docx
172-
173-
Windows
174-
~~~~~~~
175-
176-
Use easy_install, pip or your package manager (e.g. conda) to install the following packages::
177-
178-
numpy scipy matplotlib sympy xlrd xlwt
179-
biopython docx suds wxPython
180-
181-
pip install --update python-libsbml
182-
183-
Python3 (experimental)
184-
----------------------
185-
186-
Not all dependencies are available for Python3::
187-
188-
sudo apt-get install python3-dev python3-numpy python3-scipy python3-matplotlib python3-pip
189-
sudo apt-get install python3-xlrd python3-h5py
190-
191-
# need to find out what is going on with Python3 and xlwt suds
192-
# easy_install3 sympy ???
193-
# wxPython and PyQt4 not in Ubuntu P3 builds yet
194-
195-
sudo apt-get install ipython3 ipython3-notebook
196-
197-
sudo apt-get install libxml2 libxml2-dev
198-
sudo apt-get install zlib1g zlib1g-dev
199-
sudo apt-get install bzip2 libbz2-dev
200-
201-
sudo pip3 install python-libsbml-experimental
61+
```
62+
import cbmpy
63+
cmod = cbmpy.readSBML3FBC('cbmpy_test_core')
64+
cbmpy.doFBA(cmod)
65+
```
66+
# Updating CBMPy
67+
Once you have installed CBMPy it can be easily upgraded.
20268

203-
sudo apt-get install python-sip python-sip-dev build-essential
69+
## Pip update
70+
`pip install --upgrade cbmpy`
20471

205-
More information in the docs/ directory.
72+
## Anaconda update
73+
`conda update cbmpy`
20674

207-
(c) Brett G. Olivier, Amsterdam, 2014-2018
75+
(c) Brett G. Olivier, Amsterdam, 2014-2021

0 commit comments

Comments
 (0)