:py:mod:`micom.workflows.grow` ============================== .. py:module:: micom.workflows.grow .. autoapi-nested-parse:: Performs growth and exchange analysis for several models. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: micom.workflows.grow._growth micom.workflows.grow.grow Attributes ~~~~~~~~~~ .. autoapisummary:: micom.workflows.grow.DIRECTION micom.workflows.grow.ARGS .. py:data:: DIRECTION .. py:data:: ARGS .. py:function:: _growth(args) .. py:function:: grow(manifest, model_folder, medium, tradeoff, threads=1, weights=None, strategy='minimal imports', atol=None, rtol=None, presolve=False) Simulate growth for a set of community models. .. note:: 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. :param manifest: The manifest as returned by the `build` workflow. :type manifest: pandas.DataFrame :param model_folder: The folder in which to find the files mentioned in the manifest. :type model_folder: str :param medium: A growth medium. Must have columns "reaction" and "flux" denoting exchange reactions and their respective maximum flux. :type medium: pandas.DataFrame :param tradeoff: 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. :type tradeoff: float in (0.0, 1.0] :param threads: 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. :type threads: int >=1 :param strategy: 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. :type strategy: str :param weights: 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. :type weights: str :param atol: Absolute tolerance for the growth rates. If None will use the solver tolerance. :type atol: float :param rtol: Relative tolerqance for the growth rates. If None will use the solver tolerance. :type rtol: float :param presolve: Whether to use the presolver/scaling. Can improve numerical accuracy in some cases. :type presolve: bool :returns: A named tuple containing the growth rates and exchange fluxes for all samples/models. :rtype: GrowthResults