Skip to content

Commit fded836

Browse files
committed
v 0.4 release
1 parent a843449 commit fded836

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+14496
-2045
lines changed

README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,19 @@ This repository provides the code and result figures with the paper:
1010
Contact: [Marouen Ben Guebila](mailto:[email protected])
1111

1212
### Usage
13-
The supported languages are: C (veryfastFVA.c) with wrappers in MATLAB (VFFVA.m) and Python (VFFVA.py)
13+
The supported languages are: C (veryfastFVA.c) with wrappers in MATLAB (VFFVA.m) and Python (VFFVA.py). IBM CPLEX has stopped its support for MATLAB since version 12.10, therefore VFFVA can be an alternative to access new CPLEX versions through its C API.
1414

1515
Please refer to the [documentation](https://vffva.readthedocs.io/en/latest/) and the [UserGuide](UserGuide.md) for veryfastFVA (VFFVA) usage.
1616

1717
In MATLAB, add the project folder to your MATLAB path and save it, then use `VFFVA()`. In Python, `import VFFA` to use `VFFVA()`.
1818

1919
For the comparison with fastFVA (FFVA), you can install FFVA [here](http://wwwen.uni.lu/lcsb/research/mol_systems_physiology/fastfva).
2020

21-
### Quick installation
22-
This is a standard installation recipe, if this does not work, please install each dependency separately as specified in the [documentation](https://vffva.readthedocs.io/en/latest/).
23-
```
24-
cd lib
25-
source ./install.sh
26-
make
27-
```
21+
### Installation
22+
Please install each of the 3 dependencies separately as specified in the [documentation](https://vffva.readthedocs.io/en/latest/).
23+
- IBM ILOG CPLEX [free academic version](https://www.ibm.com/products/ilog-cplex-optimization-studio)
24+
- [MPI](www.open-mpi.org)
25+
- OpenMP is installed by default on most platforms except recent MacOS versions that require a dedicated installation.
2826

2927
### Motivation
3028
FVA³ is the workhorse of metabolic modeling. It allows to characterize the boundaries of the solution space of a metabolic model and delineates the bounds
1.06 KB
Binary file not shown.
4.4 KB
Binary file not shown.
23.2 KB
Binary file not shown.

docs/_build/doctrees/index.doctree

185 Bytes
Binary file not shown.
11 KB
Binary file not shown.
130 Bytes
Binary file not shown.
4.98 KB
Binary file not shown.

docs/_build/html/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 7868f3b166d9a1bbcb9c2a8bce9907a6
3+
config: c3e19f027ad9948957f36f9429d67c92
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_build/html/_sources/changelog.rst.txt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Changelog
33
==========
44

5+
* :feature:`-` Support for Cv <= d constraints
6+
* :release:`0.4.0 <2022.08.10>`
57
* :feature:`-` Changelog added to the doc
68
* :feature:`-` Improve the docs
79
* :release:`0.1.0 <2018.10.01>`

docs/_build/html/_sources/guide/index.md.txt

+64-32
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ After installing the dependencies of `VFFVA`, you can build the binaries at the
88

99
Then call `VFFVA` as follows:
1010

11-
`mpirun -np nCores --bind-to none -x OMP_NUM_THREADS=nThreads veryfastFVA model.mps OPTPERC SCAIND`
11+
`mpirun -np nCores --bind-to none -x OMP_NUM_THREADS=nThreads veryfastFVA model.mps OPTPERC SCAIND ex`
1212

1313
Replace the following variables with your own parameters:
1414

@@ -18,13 +18,14 @@ Replace the following variables with your own parameters:
1818

1919
+ model.mps: the metabolic model in `.mps` format. To convert a model in `.mat` format to `.mps`, you can use the provided converter `convertProblem.m`
2020

21-
+ OPTPERC: Optimization percentage of the objective value (0-100). The default is 90, where VFFVa will be computed with the objective value set to 90% of the optimal
21+
+ OPTPERC: Optimization percentage of the objective value (0-100). The default is 90, where VFFVA will be computed with the objective value set to 90% of the optimal
2222
objective.
2323

24-
25-
+ SCAIND: (optional) corresponds to the scaling CPLEX parameter SCAIND and can take the values 0 (equilibration scaling: default), 1(aggressive scaling), -1 (no scaling).
24+
+ SCAIND: (optional) corresponds to the scaling CPLEX parameter SCAIND and can take the values 0 (equilibration scaling: default), 1 (aggressive scaling), -1 (no scaling).
2625
scaling is usually desactivated with tightly constrained metabolic model such as coupled models to avoid numerical instabilities and large solution times.
2726

27+
+ ex: .csv file containing 0-based indices of reactions to optimize e.g., 0,1,2,3,4,5 or check `rxns.csv` in the repository.
28+
2829
Example: `mpirun -np 2 --bind-to none -x OMP_NUM_THREADS=4 veryfastFVA ecoli_core.mps`
2930

3031
`VFFVA` will perform 2n Linear Programs (LP), where n is the number of reactions in a metabolic model, corresponding to
@@ -34,37 +35,68 @@ The ouput file is saved as `modeloutput.csv`, with model is the name of the meta
3435

3536
## MATLAB version
3637

37-
The MATLAB version VFFVA.m is a wrapper around the C versiobn, which means that the previous installation steps of the C version have to be performed.
38+
The MATLAB version VFFVA.m is a wrapper around the C version, which means that the previous installation steps of the C version have to be performed.
3839

3940
Then VFFVA.m can be called from MATLAB using the following function description:
4041

4142
```
4243

43-
USAGE:
44-
45-
[minFlux,maxFlux]=VFFVA(nCores, nThreads, model, scaling, memAff, schedule, nChunk)
46-
47-
INPUT:
48-
nCores: Number of non-shared memory cores/machines.
49-
nThreads: Number of shared memory threads in each core/machine.
50-
model: .mps format: path to metabolic model in .mps format.
51-
COBRA format: will be automatically formatted to .mps format. Make sure to add VFFVA folder to
52-
your MATLAB path to access the conversion script.
53-
54-
OPTIONAL INPUTS:
55-
scaling: CPLEX parameter. It corresponds to SCAIND parameter (Default = 0).
56-
-1: no scaling; 0: equilibration scaling; 1: more aggressive scaling.
57-
more information here: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/ScaInd.html.
58-
optPerc: Percentage of the optimal objective used in FVA. Float between 0 and 100. For example, when set to 90
59-
FVA will be computed on 90% of the optimal objective.
60-
memAff: none, core, or socket. (Default = none). This an OpenMPI parameter, more
61-
information here: https://www.open-mpi.org/faq/?category=tuning#using-paffinity-v1.4.
62-
schedule: Dynamic, static, or guided. (Default = dynamic). This is an OpenMP parameter, more
63-
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
64-
nChunk: Number of reactions in each chunk (Default = 50). This is an OpenMO parameter, more
65-
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
66-
67-
OUTPUTS:
68-
minFlux: (n,1) vector of minimal flux values for each reaction.
69-
maxFlux: (n,1) vector of maximal flux values for each reaction.
44+
USAGE:
45+
46+
[minFlux,maxFlux]=VFFVA(nCores, nThreads, model, scaling, memAff, schedule, nChunk, optPerc)
47+
48+
INPUT:
49+
nCores: Number of non-shared memory cores/machines.
50+
nThreads: Number of shared memory threads in each core/machine.
51+
model: .mps format: path to metabolic model in .mps format.
52+
COBRA format: will be automatically formatted to .mps format. Make sure to add VFFVA folder to
53+
your MATLAB path to access the conversion script.
54+
55+
OPTIONAL INPUTS:
56+
scaling: CPLEX parameter. It corresponds to SCAIND parameter (Default = 0).
57+
-1: no scaling; 0: equilibration scaling; 1: more aggressive scaling.
58+
more information here: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/ScaInd.html.
59+
optPerc: Percentage of the optimal objective used in FVA. Integer between 0 and 100. For example, when set to 90
60+
FVA will be computed on 90% of the optimal objective.
61+
memAff: 'none', 'core', or 'socket'. (Default = 'none'). This an OpenMPI parameter, more
62+
information here: https://www.open-mpi.org/faq/?category=tuning#using-paffinity-v1.4.
63+
schedule: 'dynamic', 'static', or 'guided'. (Default = 'dynamic'). This is an OpenMP parameter, more
64+
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
65+
nChunk: Number of reactions in each chunk (Default = 50). This is an OpenMP parameter, more
66+
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
67+
ex: 0-based indices of reactions to optimize. (Default, all reactions)
68+
69+
OUTPUTS:
70+
minFlux: (n,1) vector of minimal flux values for each reaction.
71+
maxFlux: (n,1) vector of maximal flux values for each reaction.
72+
```
73+
## Python version
74+
75+
The Python version VFFVA.py is a wrapper around the C version, which means that the previous installation steps of the C version have to be performed.
76+
77+
Then VFFVA.py can be imported into a Python 3 script using the following function description:
78+
79+
```
80+
81+
USAGE:
82+
minFlux,maxFlux=VFFVA(nCores, nThreads, model, scaling, memAff, schedule, nChunk, optPerc, ex)
83+
84+
:param nCores: Number of non-shared memory cores/machines.
85+
:param nThreads: Number of shared memory threads in each core/machine.
86+
:param model: .mps format: path to metabolic model in .mps format.
87+
:param scaling: CPLEX parameter. It corresponds to SCAIND parameter (Default = 0).
88+
-1: no scaling; 0: equilibration scaling; 1: more aggressive scaling.
89+
more information here: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/ScaInd.html.
90+
:param memAff: 'none', 'core', or 'socket'. (Default = 'none'). This an OpenMPI parameter, more
91+
information here: https://www.open-mpi.org/faq/?category=tuning#using-paffinity-v1.4.
92+
:param schedule: 'dynamic', 'static', or 'guided'. (Default = 'dynamic'). This is an OpenMP parameter, more
93+
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
94+
:param nChunk: Number of reactions in each chunk (Default = 50). This is an OpenMP parameter, more
95+
information here: https://software.intel.com/en-us/articles/openmp-loop-scheduling
96+
:param optPerc: Percentage of the optimal objective used in FVA. Integer between 0 and 100. For example, when set to 90
97+
FVA will be computed on 90% of the optimal objective.
98+
:param ex: Indices of reactions to optimize as a numpy array. (Default, all reactions)
99+
:return:
100+
minFlux: (n,1) vector of minimal flux values for each reaction.
101+
maxFlux: (n,1) vector of maximal flux values for each reaction.
70102
```

docs/_build/html/_sources/install/index.md.txt

+70-30
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,16 @@ The C implementation is a hybrid MPI/OpenMP code that has two levels of parallel
88
and non-shared memory systems.
99

1010
### Requirements
11-
+ Linux-based system (tested on Ubuntu 16.04 and 18.04).
11+
+ Linux-based system (tested on Ubuntu 16.04, 18.04, and 22.04).
1212

13-
+ IBM CPLEX 12.6.3. (tested on 12.6.3 and 12.10) and above [Free academic version.](http://www.ibm.com/academic)
13+
+ IBM CPLEX 12.6.3. (tested on 12.6.3, 12.10, and 22.1.0) and above [Free academic version.](http://www.ibm.com/academic)
1414

1515
+ OpenMP comes be default in the latest gcc version (For macOs, OpenMp has to be installed separately)
1616

1717
+ MPI through the OpenMPI 1.10.3 implementation.
1818

19-
### Quick install
20-
21-
This will install OpenMPI, IBM ILOG CPLEX 12.10 (Make sure you register at IBM Academic Initiative), and will set the environment variables.
22-
```
23-
cd lib
24-
source ./install.sh
25-
make
26-
```
27-
### Troubleshooting
28-
Quick install downloads and installs 1) OpenMPI and 2) IBM CPLEX for 64-bit machines.
19+
### Installation
20+
You need to download and install 1) OpenMPI and 2) IBM CPLEX for 64-bit machines.
2921

3022
+ MPI: You can use the following code snippet to install MPI
3123
```
@@ -35,19 +27,19 @@ tar -xzf openmpi-$VERSION.tar.gz
3527
cd openmpi-$VERSION
3628
mkdir build && cd build
3729
../configure CFLAGS="-w" --prefix=$HOME/open-mpi \
38-
--without-verbs --without-fca --without-mxm --without-ucx \
39-
--without-portals4 --without-psm --without-psm2 \
40-
--without-libfabric --without-usnic \
41-
--without-udreg --without-ugni --without-xpmem \
42-
--without-alps --without-munge \
43-
--without-sge --without-loadleveler --without-tm \
44-
--without-lsf --without-slurm \
45-
--without-pvfs2 --without-plfs \
46-
--without-cuda --disable-oshmem \
47-
--disable-mpi-fortran --disable-oshmem-fortran \
48-
--disable-libompitrace \
49-
--disable-mpi-io --disable-io-romio \
50-
--disable-static #--enable-mpi-thread-multiple
30+
--without-verbs --without-fca --without-mxm --without-ucx \
31+
--without-portals4 --without-psm --without-psm2 \
32+
--without-libfabric --without-usnic \
33+
--without-udreg --without-ugni --without-xpmem \
34+
--without-alps --without-munge \
35+
--without-sge --without-loadleveler --without-tm \
36+
--without-lsf --without-slurm \
37+
--without-pvfs2 --without-plfs \
38+
--without-cuda --disable-oshmem \
39+
--disable-mpi-fortran --disable-oshmem-fortran \
40+
--disable-libompitrace \
41+
--disable-mpi-io --disable-io-romio \
42+
--disable-static #--enable-mpi-thread-multiple
5143
make -j2
5244
make install
5345
```
@@ -58,7 +50,28 @@ export PATH=$HOME/open-mpi/bin:$PATH
5850
```
5951
+ IBM CPLEX: The recommended approach is to download [IBM CPLEX](http://www.ibm.com/academic) and register for the free academic version.
6052

61-
Make sure that the CPLEXDIR path in `lib/Makefile` corresponds to the installation folder of CPLEX.
53+
Here is a code snippet for installing CPLEX for Ubunutu, this is only an example and you need to get your installation file after creating an IBMid.
54+
In this example, CPLEX will be installed in ~/CPLEX_Studio1210.
55+
56+
```
57+
VERSION_CPLEX=1210
58+
wget "https://ak-dsw-mul.dhe.ibm.com/sdfdl/v2/fulfill/CC439ML/Xa.2/Xb.XwdHXGdhWvrm/Xc.CC439ML/cplex_studio1210.linux-x86-64.bin/Xd./Xf.lPr.D1VC/Xg.10736638/Xi./XY.scholars/XZ.UBs6UV1K_zA_5uS6T9I81YuWNmI/cplex_studio1210.linux-x86-64.bin#anchor"
59+
chmod +x cplex_studio$VERSION_CPLEX.linux-x86-64.bin
60+
61+
#specify install options
62+
echo "INSTALLER_UI=silent\n
63+
INSTALLER_LOCALE=en\n
64+
LICENSE_ACCEPTED=true\n
65+
USER_INSTALL_DIR=$HOME/CPLEX_Studio$VERSION_CPLEX"> myresponse.properties
66+
67+
#work around installation bug
68+
export PS1=">"
69+
70+
#install
71+
./cplex_studio$VERSION_CPLEX.linux-x86-64.bin -f "./myresponse.properties"
72+
73+
```
74+
Then, make sure that the CPLEXDIR path in `lib/Makefile` corresponds to the installation folder of CPLEX (~/CPLEX_Studio1210 in the previous example).
6275

6376
+ Once the required dependencies installed, `cd VFFVA/lib` then `make` at the root of `lib`.
6477

@@ -79,11 +92,38 @@ VFFVA.m is the MATLAB implementation that consists of a wrapper around the C ver
7992

8093
+ MPI through the OpenMPI 1.10.3 implementation.
8194

82-
### Quick install
95+
### Installation
96+
97+
First, istall the C version, then add the path of the installed C version to your MATLAB path.
8398

8499
```
85-
cd lib
86-
source ./install.sh
87-
make
100+
addpath(genpath('VFFVA'))
88101
```
89102

103+
## Python
104+
105+
VFFVA.py is the Python3 implementation that consists of a wrapper around the C version.
106+
107+
### Requirements
108+
+ Linux-based system.
109+
110+
+ Python 3
111+
112+
+ IBM CPLEX 12.6.3. and above [Free academic version.](http://www.ibm.com/academic)
113+
114+
+ OpenMP comes be default in the latest gcc version.
115+
116+
+ MPI through the OpenMPI 1.10.3 implementation.
117+
118+
### Installation
119+
120+
First, istall the C version, then add the path of the installed C version to your Python path.
121+
122+
## FAQ
123+
124+
- In MacOS, I get the error “Clang: Error: Unsupported Option ‘-Fopenmp’” Error
125+
-> In MacOS, OpenMP is not provided by default, therefore you need to install it by updating to the latest version of llvm.
126+
127+
- Too many output arguments with function BuildMPS
128+
-> The version of BuildMPS function provided with VFFVA gives 2 outputs, if you have the COBRAtoolbox in your path, you might be using another version that gives 1 output.
129+
Therefore, make sure that VFFVA path supersedes COBRAtoolbox path in MATLAB path.

0 commit comments

Comments
 (0)