How to …¶
-
... choose free fluxes? You can define in FTBL all not constrained fluxes as dependent (put a letter
Din the columnFCDof the FTBL sectionsFLUXES/NETandFLUXES/XCH), runinflux_siand see an error message that will suggest some candidates for free fluxes. For these fluxes, put a letterFin the columnFCDand some numeric value in the next columnVALUE(F/C)to provide a starting value for the fitting. Don’t use 0 as starting value as it might lead to singular matrices in cumomer balances.If you want to create an FTBL de novo, consider using application
txt2ftbl.pyincluded ininflux_sipackage. Not only it translates an easily readable/writable text format into FTBL one, but it also automatically assigns some fluxes to be free.
-
... get statistical information for a given set of free fluxes without -
fitting measurements? Put these values in the corresponding FTBL file as starting values for free fluxes and use
influx_siwith--nooptoption.
-
... accelerate calculations? You can relax stopping criterion and pass from 1.e-5 (by default) to, for example, 1.e-2 if this precision is sufficient for you. Use
optctrl_errxoption in FTBL file (sectionOPTIONS) for this.If you mean to accelerate Monte-Carlo simulations in Unix environment, you can use a hardware with many cores. In this case, the wall clock time can be reduced significantly. Note that distant nodes, even inside of the same cluster, are not used in the such kind of Monte-Carlo simulations.
Check that your system is not using swap (disk) memory. If it is the case, stop other applications running in parallel with
influx_si. If possible extend the RAM on your hardware.
-
... extend upper limit for non linear iterations? By default, this value is 50 which should be largely sufficient for most cases. If not, you can set another value via
optctrl_maxitoption in the FTBL file (sectionOPTIONS). But most probably, you would like to check your network definition or to add some data or to change a substrate labeling, anyway to do something to get a well defined network instead of trying to make converge the fitting on some biologically almost meaningless situation.
-
... make FTBL file with synthetic data? - Follow for example steps outlined hereafter:
edit FTBL file(s) with
NAin measurements and realistic SD, name it e.g.new_NA.ftblsimulate data:
$ influx_s.py --noopt --addnoise new_NA
prepare FTBL sections with simulated data:
$ res2ftbl_meas.py new_NA_res.kvh
It will create file (or files if there are parallel experiments) with synthetic data formatted for inclusion in FTBL file:
new_NA_sim1.ftbl,new_NA_sim2.ftbl, etc.)copy/paste simulated data to a new file
new.ftblwith numeric data instead ofNA.use FTBL with synthetic data:
$ influx_s.py new.ftbl
-
... do custom post-treatment of Monte-Carlo iterations? Let suppose that you want to filter some of Monte-Carlo (MC) iterations based on their cost values. In
OPTIONS/psottreat_Rof your FTBL file addsave_all.R. The filesave_all.Rcan be found intestdirectory ofinflux_sidistribution and must be copied to the directory where your FTBL file resides. Execution ofsave_all.Rat the end of calculations will simply save all session variables inmynetwork.RDatafile (supposing that your FTBL file is namesmynetwork.ftbl). In particular, you needfree_mcmatrix which contains free parameters (each column results from a given MC iteration). After that you can open an interactive R session in your working directory and run something similar to:# preparations load("mynetwork.RData") source(file.path(dirx, "libs.R")) source(file.path(dirx, "opt_cumo_tools.R")) #source(file.path(dirx, "opt_icumo_tools.R")) # uncoment for influx_i use tmp=sparse2spa(spa) # doing something useful # here, we calculate a vector of cost values, one per MC iteration cost_mc=apply(free_mc, 2, function(p) cumo_cost(p, labargs)) # do something else ...
If, instead of cost values, you need for example a full set of net-xch fluxes then do
allflux_mc=apply(free_mc, 2, function(p) param2fl(p, labargs)$fallnx)
for residuals, do:
resid_mc=apply(free_mc, 2, function(p) lab_resid(p, FALSE, labargs)$res)
After that, you can filter or do whatever needed with obtained vectors and matrices.