Skip to content

Commit 86825af

Browse files
committed
updated for release 0.7.21
1 parent 6ea8a78 commit 86825af

34 files changed

+301
-97
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CBMPy
22
=====
33

44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2010-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66

77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -204,4 +204,4 @@ sudo apt-get install python-sip python-sip-dev build-essential
204204

205205
More information in the docs/ directory.
206206

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

README.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CBMPy
22
=====
33

44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2010-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66

77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -26,9 +26,9 @@ Installation
2626

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

3434
PySCeS CBMPy implements popular analyses such as FBA, FVA, element/charge
@@ -43,7 +43,7 @@ needs PySCeS CBMPy supports user interaction via:
4343

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

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

@@ -64,7 +64,7 @@ CBMPy is now available as a crosss platform Anaconda package available for Win32
6464
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::
6565

6666
conda install -c bgoli -c SBMLTeam cbmpy
67-
67+
6868
which should install CBMPy, libSBML and all the required (non-solver) dependencies. If you do not use Anaconda or would
6969
like to try install things in a semi-automated way carry on reading.
7070

@@ -76,25 +76,25 @@ please see the online documentation http://cbmpy.sourceforge.net/reference/insta
7676
Auto-dependency configuration
7777
-----------------------------
7878

79-
I am in the process of creating automated dependency checking and building tools for CBMPy.
79+
I am in the process of creating automated dependency checking and building tools for CBMPy.
8080

8181
Ubuntu support is complete with cross platform conda support now available for testing (https://github.com/bgoli/cbmpy-build.git)::
8282

8383
To start with download the install script that will run the system test::
8484

85-
curl --remote-name https://raw.githubusercontent.com/bgoli/cbmpy-build/master/ubuntu/1_install_cbmpy_dependencies.py
85+
curl --remote-name https://raw.githubusercontent.com/bgoli/cbmpy-build/master/ubuntu/1_install_cbmpy_dependencies.py
8686

8787
This script will analyse your Python distribution for missing dependencies and generate a shell script that will auto-install them.
8888

8989
For an installation using the native Python supplied with Ubuntu run::
9090

9191
python 1_install_cbmpy_dependencies.py UBUNTU
92-
92+
9393
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)::
9494

9595
python 1_install_cbmpy_dependencies.py CONDA
9696

97-
in both cases a shell script `metatoolkit_install_dependencies.sh` is generated and printed to the screen. Run this script
97+
in both cases a shell script `metatoolkit_install_dependencies.sh` is generated and printed to the screen. Run this script
9898
or install the relevant packages by hand.
9999

100100
Installing or upgrading CBMPy

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: setup.py
33
===============
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2010-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: setup.py 646 2018-05-02 13:55:59Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: setup.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525

@@ -44,7 +44,7 @@
4444

4545
# release
4646
try:
47-
STATUS = 'r'+'$Rev: 646 $'.replace('Rev: ','').replace('$','').strip()
47+
STATUS = 'r'+'$Rev: 660 $'.replace('Rev: ','').replace('$','').strip()
4848
except:
4949
STATUS = 'beta'
5050

@@ -56,8 +56,8 @@
5656
data_files = mydata_files,
5757
name = "cbmpy",
5858
summary = "CBMPy: Constraint Based Modelling in Python",
59-
version = "0.7.20.{}".format(STATUS),
60-
#version = "0.7.20",
59+
#version = "0.7.22.{}".format(STATUS),
60+
version = "0.7.21",
6161
maintainer = 'Brett G. Olivier',
6262
author = 'Brett G. Olivier',
6363
author_email = '[email protected]',

setupegg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
CBMPy: Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm)
33
============
4-
Copyright (C) 2010-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
4+
Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
55
66
This program is free software: you can redistribute it and/or modify
77
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
1818
1919
Author: Brett G. Olivier
2020
Contact email: [email protected]
21-
Last edit: $Author: bgoli $ ($Id: setupegg.py 574 2017-04-13 12:18:15Z bgoli $)
21+
Last edit: $Author: bgoli $ ($Id: setupegg.py 660 2018-09-24 14:57:04Z bgoli $)
2222
2323
"""
2424

src/CBCPLEX.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBCPLEX module
33
=====================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBCPLEX.py 629 2017-10-24 22:01:14Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBCPLEX.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525
## gets rid of "invalid variable name" info
@@ -837,8 +837,11 @@ def cplx_getSolutionStatus(c):
837837
"""
838838
# solution.get_status() returns an integer code
839839
if c.solution.get_solution_type() == c.solution.type.none:
840-
print("\nNo solution available\n")
840+
print("No solution available (status={}) type: {}".format(c.solution.get_status_string(), c.solution.get_solution_type()))
841841
return 'LPS_NONE'
842+
else:
843+
print("Solution available (status={}) type: {}".format(c.solution.get_status_string(), c.solution.get_solution_type()))
844+
842845
status = c.solution.get_status()
843846
if status == c.solution.status.optimal:
844847
if not CPLX_SILENT_MODE:
@@ -859,13 +862,14 @@ def cplx_getSolutionStatus(c):
859862
elif status == c.solution.status.MIP_optimal:
860863
print('MILP optimal')
861864
return 'MILP_OPT'
862-
elif status == c.solution.status.MIP_optimal:
863-
print('MILP optimal')
864-
return 'MILP_OPT'
865+
#elif status == c.solution.status.MIP_optimal:
866+
#print('MILP optimal')
867+
#return 'MILP_OPT'
865868
elif status == c.solution.status.optimal_tolerance:
866869
print('MILP optimal within gap tolerance')
867870
return 'MILP_OPTTOL'
868871
else:
872+
print('Unknown solution status ({}): \"{}\"'.format(c.solution.get_status(), c.solution.get_status_string()))
869873
return 'LPS_NONE'
870874

871875
def cplx_setObjective(c, pid, expr=None, sense='maximize', reset=True):
@@ -1100,10 +1104,12 @@ def cplx_func_GetCPXandPresolve(fba, pre_opt, objF2constr, quiet=False, oldlpgen
11001104
Returns: pre_sol, pre_oid, pre_oval, OPTIMAL_PRESOLUTION, REDUCED_COSTS
11011105
11021106
"""
1107+
# debug write out lp file
1108+
fname = None
11031109
if oldlpgen:
11041110
cpx = cplx_getModelFromObj(fba)
11051111
else:
1106-
cpx = cplx_constructLPfromFBA(fba, fname=None)
1112+
cpx = cplx_constructLPfromFBA(fba, fname=fname)
11071113
if quiet:
11081114
cplx_setOutputStreams(cpx, mode=None)
11091115
OPTIMAL_PRESOLUTION = None
@@ -1353,7 +1359,11 @@ def cplx_MinimizeSumOfAbsFluxes(fba, selected_reactions=None, pre_opt=True, tol=
13531359
cplx_writeLPtoLPTfile(cpx, 'MSAF_base_(%s)' % time.time(), title=None, Dir=debug_dir)
13541360
## cplx_writeLPtoLPTfile(cpx, 'MSAF_base_%s' % time.time() , title=None, Dir=debug_dir)
13551361

1362+
# debug write out lp file
1363+
#cpx.write('debug_minabssum_{}.lp'.format(str(time.time()).split('.')[0]), filetype='lp')
1364+
13561365
cplx_Solve(cpx, method=method)
1366+
13571367
cplx_setFBAsolutionToModel(fba, cpx, with_reduced_costs=with_reduced_costs)
13581368
cplx_setSolutionStatusToModel(fba, cpx)
13591369

src/CBCommon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBCommon module
33
======================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBCommon.py 644 2018-03-14 21:40:47Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBCommon.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525
## gets rid of "invalid variable name" info

src/CBConfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBConfig module
33
======================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBConfig.py 637 2017-12-15 11:34:59Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBConfig.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525
## gets rid of "invalid variable name" info
@@ -37,13 +37,13 @@
3737
# release
3838

3939
try:
40-
STATUS = '$Rev: 637 $'.replace('Rev: ', '').replace('$', '').strip()
40+
STATUS = '$Rev: 660 $'.replace('Rev: ', '').replace('$', '').strip()
4141
except Exception:
4242
STATUS = ''
4343

4444
__CBCONFIG__ = {'VERSION_MAJOR' : 0,
4545
'VERSION_MINOR' : 7,
46-
'VERSION_MICRO' : 20,
46+
'VERSION_MICRO' : 21,
4747
'VERSION_STATUS' : STATUS,
4848
'VERSION' : None,
4949
'DEBUG' : False,

src/CBDataStruct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBDataStruct module
33
==========================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBDataStruct.py 575 2017-04-13 12:18:44Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBDataStruct.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525

src/CBGLPK.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBGLPK module
33
====================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBGLPK.py 645 2018-04-23 22:38:14Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBGLPK.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525

src/CBGUI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CBMPy: CBGUI module
33
===================
44
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
5-
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
5+
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
66
77
This program is free software: you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBGUI.py 575 2017-04-13 12:18:44Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBGUI.py 660 2018-09-24 14:57:04Z bgoli $)
2323
2424
"""
2525

0 commit comments

Comments
 (0)