Flux sampling is one of the most powerful techniques to investigate metabolic capabilities of the model (Schellenberger and Palsson, 2009, DOI:10.1074/jbc.R800048200). The great advantage of sampling is that it does not require any objective function to be optimized, so it allows to identify hidden relationships between reactions, genes and metabolites imposed by the physical, chemical and kinetic constraints applied to the metabolic network. This component provide access to the COBRApy flux sampling functionality.
The COBRApy provides two versions of sampling algorithm:
- optgp (Megchelenbrink, et al. 2014, DOI:10.1371/journal.pone.0086587)
- achr: which stands for Artificial Centering Hit-and-Run (Kaufman and Smith, 1998, DOI:10.1287/opre.46.1.84)
Both sampler algorithms require some additional argument. Them most important is the "Thinning factor", which means that if it is set to N, algorithm would only record samples every N iterations. A higher thinning factors mean less correlated samples but also larger computation times. By default the samplers use a thinning factor of 100 which creates roughly uncorrelated samples. The review of influence of thinning factor on sampling and some techniques to estimate convergence is provided in (Herrmann, et al. 2019, DOI:10.1038/s41540-019-0109-0)
Another important parameters are number of samples and number of parallel processes to run.
As sampling is the time consuming process we suggest to run it in batches within a loop with high thinning factor (10000 and more) and relatively small number of samples (around 1000) and append that batches into CSV file. That strategy gives you fail-safe environment and generate data for later analysis without need for repeating time-consuming calculations.
- Type: PythonmodelCobra Model object from other FBA components
- Type: Tablereactionstable of reactions to vary