Who should read this Tutorial.
Additional literature:
Full Version of Software: further optimizers
Begin in directory named "Tutorial/Start". This is the
starting point for this little tutorial tour.
This directory
contains the file PPP.ftbl, which describes the Embden-Meyerhof- and
Pentose-Phosphate-Pathway.
In this file we have hidden some
errors typically made during editing FTBL-Files by the user. In the
following text we will describe the error messages and how to
overcome them.
To find the Errors in this file, there are two typical approaches:
Use the FTBL-Macros for the
StarOffice Suite (see Installation-Instructions for how to access
these). There should be a button called: <FTBL Syntax Test>
that checks the syntax of the FTBL-File.
This Macro is
automatically called, whenever you load a FTBL-File with the <FTBL
Open> button.
So you will see an Error-Popup-Panel, when
trying to load the PPP.ftbl the first time... Don't Panic !-)
Doing it all by hand, within a UNIX Command Shell like bash or csh...
We will show you the second approach, because you needn't have to use StarOffice to make all the things work. At least you should have a Spread Sheet Tool at hand that can load tables with <tabs> as cell-separators.
We have separated the analyzation of the PPP.ftbl into 4 stages:
Find Free Fluxes, that determines the Flux Network, Simulation of Network,
Optimize Free Fluxes to best fit measured data to simulation data,
First copy the PPP.ftbl file in a new directory named Step1.
mkdir
Step1
cd Step1/
cp ../Start/PPP.ftbl .
You have to translate this easy readable file into generic modeling language. This is done by the command
Ftbl2Flx PPP.ftbl
Error
Messages:
SYN_0102:NETWORK:FLUX_NAME#7:Flux name is
missing.
SYN_0504:FLUX_MEASUREMENTS:FLUX_NAME#1=upt:DEVIATION:DEVIATION
must be a floating-point number.
SYN_0102:NETWORK:FLUX_NAME#7:Flux
name is
missing.
SYN_0504:FLUX_MEASUREMENTS:FLUX_NAME#1=upt:DEVIATION:DEVIATION
must be a floating-point number.
Warning Messages:
Debug
Information:
You can see, that there are two syntax errors in your FTBL-sheet.
Edit the file and enter the flux name "emp6" and the
deviation of the upt-flux e.g. 0.05 at the appropriate places. Have a
deeper look at the Error-Line to get an idea where the error
occurred.
After that save the file as an FTBL-file.
All syntax
errors are listed in the Star Office file FTBLSyntax.sdw.
Try again
Ftbl2Flx PPP.ftbl
Error
Messages:
CON_0105:NETWORK:FLUX_NAME#11.ATOMS:PRODUCT_1: Error
occured in flux ppp4. Atom number of GA3P is incorrect, because equal
named metabolites must have the same number of
atoms.
CON_0114:NETWORK:FLUX_NAME#11::Error occured in flux ppp4.
Educt and product atoms are unbalanced.
Warning Messages:
Debug
Information:
Now no syntax but consistency errors have occurred. In the ppp4 of PPP educts and products haven't the same number of atoms. In Product_1: GAP3 "B" is wrong in the carbon transition model so erase it. Save the sheet and next attempt:
Ftbl2Flx PPP.ftbl
Error
Messages:
CON_0301:FLUXES>XCH:NAME#14:NAME: The flux co_out was
not defined in NETWORK. Fluxes used in NAME must be defined in
NETWORK first.
...
A new consistency error is displayed. The flux co_out doesn't exist (look at NETWORK part). Alter it to coOut and save file.
Ftbl2Flx PPP.ftbl
does not find any syntax or consistency errors and creates PPP.ftbl.blk and PPP.ftbl.flx files. You might have a look inside the PPP.ftbl.flx file to see an hierarchically data representation of your model.
cd
..
mkdir Step2
cd Step2
cp ../Step1/* .
We now try to start a cumomer simulation. This is also a test, if the network is over- or underdetermined.
CumoNet PPP.ftbl
XCHFLUXES.FREE Choose ALL of the listed suggested xch-fluxes.
For these fluxes set it F or C in the FLUXES section of your FTBL-file.
Suggested xch-fluxes:
[
ppp2_xch
]
XCHFLUXES.FREE 1 xch flux is absent.
XCHFLUXES.FREE uptU__XCH is redundant free xch flux.
XCHFLUXES.FREE upt1__XCH is redundant free xch flux.
NETFLUXES.FREE Choose ONE of the listed suggested net-fluxes.
For these fluxes set it F or C in the FLUXES section of your FTBL-file.
Suggested net-fluxes:
[
emp1_net
emp2_net
emp3_net
emp4_net
emp5_net
emp6_net
ppp1_net
ppp2_net
ppp3_net
ppp4_net
ppp5_net
ppp6_net
coOut_net
]
NETFLUXES.FREE 1 net flux is absent.
The software can't perform the simulation. You are in the situation that one free xch- and one free net-flux are missing,
and two xch-fluxes are redundant. So you have the right number of free fluxes in your model but the wrong kind of information.
Change the xch-fluxes uptU and upt1 from free (F) to dependent (D) in your ftbl-file. Then select your favorites from the displayed list
and set them F (for <F>ree for variation) or C (for <C>onstrained in simulation) in the ftbl-file.
For example choose (to follow this tutorial in further steps)
NET
emp1 D -> emp1 F 0.5
XCH
ppp2 D -> ppp2 F 0.8
Start Cumomer simulation again.
CumoNet PPP.ftbl > PPP_CumoNet_out.txt
The result is stored (by >) in file PPP_CumoNet_out.txt which can be viewed with any text editor. The file contains information about the fluxes (forward and backward), the simulated isotopomer fractions and the simulated cumomer fractions.
Segment of output:
...
Fluxes
Name
forw back
upt1 0.999 0
uptU 0 0
upt0 0.001 0
upt 1 0
emp1
0.5 0
emp2 0.833333 0
emp3 0.833333 0
emp4 1.83333 0
emp5
1.83333 0
emp6 1.83333 0
ppp1 0.5 0
ppp2 4.33333 4
ppp3
5.39022 5.22355
ppp4 4.92335 4.75669
ppp5 0.3861 0.219433
ppp6
0.436939 0.270272
coOut 0.5 0
IsoFractVect of CumSim
CO2 0
1.097900e-02
CO2 1 9.890210e-01
Ery4P 0000 7.571483e-01
Ery4P
0001 9.734818e-02
Ery4P 0010 9.797845e-03
Ery4P 0011
1.141099e-03
Ery4P 0100 1.965778e-02
...
Xul5P 11011
1.448978e-05
Xul5P 11100 1.867808e-04
Xul5P 11101
1.259436e-04
Xul5P 11110 3.665525e-06
Xul5P 11111
1.610663e-06
CumFractVect of CumSim
CO2 x 1.000000e+00
CO2 1
9.890210e-01
Ery4P xxxx 1.000000e+00
Ery4P xxx1
1.314407e-01
Ery4P xx1x 1.277104e-02
Ery4P xx11
1.548326e-03
Ery4P x1xx 3.552947e-02
...
Xul5P 11x11
1.610045e-05
Xul5P 111xx 3.180005e-04
Xul5P 111x1
1.275542e-04
Xul5P 1111x 5.276188e-06
Xul5P 11111 1.610663e-06
cd
..
mkdir Step3
cd Step3
cp ../Step2/* .
After copying the files the optimizer can be started.
CooolEvoAlpha
PPP.ftbl -nc 5 -vr 0.025 >PPP_Evo_out.txt&
watch "grep
Resi PPP_Evo_out.txt | tail -20"
Watch the Residuum going down and try to get a feeling, when the optimization-prozess settles. Hint: the Residuum should come to a value about 5 or better...? Your optimizer will stop by itself after 10000 generations or if the hard disk is full :-)
If you would like to parametrize the Evolution algorithm, you could call it without any arguments to get a calling help.
To stop the optimization first stop the watching of Residuum by pressing Ctrl+C. This only stops the watching and not the optimization process. To stop the program CooolEvoAlpha submit the command
killall CooolEvoAlpha
in your reusable shell.
Now it's time to find the optimal fluxes found by CooolEvoAlpha. An easy way to do this is using the shell command: less.
First get the best Residuum by calling
grep Resi PPP_Evo_out.txt
which will give you an output like:
...
Residuum:
46.8484 with following values
Residuum: 29.7356 with following
values
Residuum: 23.4821 with following values
Now mark the number 23.4821 with the mouse to have it in the clipboard. Now start less:
less PPP_Evo_out.txt
To look for the best Residuum value in this file press '/' and on the lowest row of your console you will have a prompt to type in 23.4821 by just pressing the middle button of your mouse an press enter. The most usual key command in less are:
'n' for search next occurance
'cursor up/down' for one line up or down
'page up/down' for one screen up or down
'q' quit
'h for help
This could lead to a place where one could read:
Residuum:
23.4821 with following values
upt1__NET: 0.876306
uptU__NET:
1e-14
upt__NET: 0.876645
emp1__NET: 0.704995
ppp2__XCH:
0.847691
ppp3__XCH: 0.670457
ppp4__XCH: 0.757355
ppp5__XCH:
0.219493
ppp6__XCH: 0.163583
cumMeas err var weight_in_SqS
MeasName
0.10631 0.00112314 4e-06 0.315361 Ery4P:$1xxx
0.029539
-0.000311302 4e-06 0.0242273 Ery4P:$x1xx
0.0125954 3.64117e-05
4e-06 0.000331452 Ery4P:$xx1x
0.149116 -0.00536771 4e-06 7.20309
Ery4P:$xxx1
0.0584577 0.00112827 4e-06 0.318246
GA3P:$1xx
0.0150841 0.000265497 4e-06 0.0176222 GA3P:$x1x
0.364562
0.000278839 4e-06 0.0194378 GA3P:$xx1
0.0584577 0.00112827 4e-06
0.318246 PEP:$1xx
0.0150841 0.000265497 4e-06 0.0176222
PEP:$x1x
0.364562 0.000278839 4e-06 0.0194378 PEP:$xx1
0.66
-6.1694e-05 2.5e-05 0.000152246 PEP:$10x
0.01 0.00310643 2.5e-05
0.385996 PEP:$11x
1.09 0.000708153 2.5e-05 0.0200592 PEP:$010
0.07
0.00386326 2.5e-05 0.596993 PEP:$110
0.43 -0.00250826 2.5e-05
0.251655 PEP:$011
0.05 0.00028873 2.5e-05 0.0033346 PEP:$111
4844
-29.9896 4624.68 0.194473 PEP:$000
2832 1.09169 272.415 0.00437492
PEP:$001+$010+$100
331.7 1.78788 30.0304 0.106443
PEP:$011+$101+$110
3.69 0.062672 25.05 0.000156798 PEP:$111
4475
-15.3918 4900.7 0.0483415 PEP:$x00
2651 1.15292 224.4 0.00592344
PEP:$x01+$x10
31.6 0.299213 25.1001 0.00356685 PEP:$x11
0.657432
0.00444768 4e-06 4.94546 Rul5P:$1xxxx
0.022408 0.000575093 4e-06
0.0826831 Rul5P:$x1xxx
0.053444 0.00136398 4e-06 0.465112
Rul5P:$xx1xx
0.0146526 0.000269254 4e-06 0.0181245
Rul5P:$xxx1x
0.327209 0.00283484 4e-06 2.00909
Rul5P:$xxxx1
fluxMeas err var weight_in_SqS
1 -0.123355 0.0025
6.08655 upt=1+-0.05;
You see the Residuum, then the fluxes that where used as free fluxes to obtain this residuum. In the next section information about the individual
measurement
it's delta to the simulated measurement
the error variance of this measurement
the weight in the residuum
a string for the measurement
Analogous information for the flux measurements are given. To have a better sight on this table copy it to sheet of your spreadsheet.
Now make a copy of PPP.ftbl and name it PPP_bestEvo.ftbl with
cp PPP.ftbl PPP_bestEvo.ftbl
and copy the optimal flux values to the appropriate places in the new FTBL-File.
cd
..
mkdir Step4
cd Step4
cp ../Step3/* .
The new ftbl-file PPP_bestEvo.ftbl has to be translated into flx-format before starting the estimation process.
Ftbl2Flx
PPP_bestEvo.ftbl
EstimateStat PPP_bestEvo.ftbl -a 0.00001 >
PPP_EstimateStat_out.txt
Look into the file PPP_EstimateStat_out.txt and search for a heading line 'Flux deviations:'
You might find something like:
Flux
net xch
upt1 0.0566277 0
uptU 0.000132741 0
upt0 0.0265403
0
upt 0.05 0
emp1 0.0472252 0
emp2 0.0474239 0
emp3
0.0474239 0
emp4 0.0970439 0
emp5 0.0970439 0
emp6 0.0970439
0
ppp1 0.0269206 0
ppp2 0.0179471 0.0525003
ppp3 0.00897353
14.7795
ppp4 0.00897353 0.0601498
ppp5 0.00897353 1.17987
ppp6
0.00897353 0.0228291
coOut 0.0269206 0
telling you that the deviation of the flux net flux ppp3 is 0.00897353 and the deviation of its xch flux is 14.7795. Always keep in mind, that the xch values are for the rescaled [0,1] scale, so the xch flux of ppp3 is de facto not measureable by the chosen label measurements. On the other hand the flux ppp2 is determined very well, having deviations of net: 0.0179471 and xch: 0.0525003.
There might be a problem in calculating this deviations, most probably because there are fluxes in your network, that have absolutly no influence on the simulated label measurements. In such a case fluxes have to be set to constraints. A hint which fluxes could be chosen is given in the same file. Look for the word 'rank' and scroll some lines down to get an advice starting with 'For better Derivation of Fluxes 'fix' following free fluxes:'.
What to do, when any problem appears because of an uncalculated clash? You can find the four steps in the RefSol-directory. To check if your solutions are conform with them try e.g.
diff Step2/PPP.ftbl ../RefSol/Step2/PPP.ftbl