Performs growth and exchange analysis for several models.

Module Contents



grow(manifest, model_folder, medium, tradeoff[, ...])

Simulate growth for a set of community models.


micom.workflows.grow.grow(manifest, model_folder, medium, tradeoff, threads=1, weights=None, strategy='minimal imports', atol=None, rtol=None, presolve=False)[source]

Simulate growth for a set of community models.


The strategy mimimal imports can become unstable for common carbon sources since it will add in infeasible imports that are very small but import some high-C molecules. If you use it check that only components from your medium have been used and molecules that should be essential are indeed consumed.

  • manifest (pandas.DataFrame) – The manifest as returned by the build workflow.

  • model_folder (str) – The folder in which to find the files mentioned in the manifest.

  • medium (pandas.DataFrame) – A growth medium. Must have columns “reaction” and “flux” denoting exchange reactions and their respective maximum flux.

  • tradeoff (float in (0.0, 1.0]) – A tradeoff value. Can be chosen by running the tradeoff workflow or by experince. Tradeoff values of 0.5 for metagenomcis data and 0.3 for 16S data seem to work well.

  • threads (int >=1) – The number of parallel workers to use when building models. As a rule of thumb you will need around 1GB of RAM for each thread.

  • strategy (str) – Computational strategy used to reduce the flux space. Default “minimal imports” uses the solution with the smallest total import flux from the environment, “pFBA” uses parsimonious FBA, and “none” returns an arbitrary feasible flux distribution.

  • weights (str) – Only used during the calculaton of the minimal import rates. Will scale the fluxes by a weight factor. Can either be “mass” which will scale by molecular mass, a single element which will scale by the elemental content (for instance “C” to scale by carbon content). If None every metabolite will receive the same weight. Will be ignored if minimize_components is True.

  • atol (float) – Absolute tolerance for the growth rates. If None will use the solver tolerance.

  • rtol (float) – Relative tolerqance for the growth rates. If None will use the solver tolerance.

  • presolve (bool) – Whether to use the presolver/scaling. Can improve numerical accuracy in some cases.


A named tuple containing the growth rates and exchange fluxes for all samples/models.

Return type: