straindesign.strainDesignSolutions ================================== .. py:module:: straindesign.strainDesignSolutions .. autoapi-nested-parse:: Container for strain design solutions (SDSolutions) Module Contents --------------- .. py:class:: SDSolutions(model, sd, status, sd_setup) Bases: :py:obj:`object` Container for strain design solutions Objects of this class are returned by strain design computations. This class contains the metabolic interventions on the gene, reaction or regulation level alongside with information about the strain design setup, including the model used and the strain design modules. Strain design solutions can be accessed either through the fields or through specific functions that preprocess or reformat strain designs for different purposes. Instances of this class are not meant to be created by StrainDesign users. :param model: A metabolic model that is an instance of the cobra.Model class. :type model: cobra.Model :param sd: A list of dicts every dict represents an intervention set. Keys in each dict are reaction/gene identifiers and the associated value determines if it is added (1), not added (0) or knocked out (-1). For regulatory interventions, (1) means active regulation and (0) means regulatory intervention not added. These will be translated to True and False. :type sd: list of dict :param status: Status string of the computation (e.g.: 'optimal') :type status: str :param sd_setup: A dictionary containing information about the problem setup. This dict can/should contain the keys MODEL_ID, MODULES, MAX_SOLUTIONS, MAX_COST, TIME_LIMIT, SOLVER, KOCOST, KICOST, REGCOST, GKICOST, GKOCOST These entries can be set like this: sd_setup[straindesign.MODEL_ID] = model.id :type sd_setup: dict Returns (SDSolutions): Strain design solutions .. py:method:: get_gene_reac_sd_assoc(i=None) Get reaction and gene-based strain design solutions, and show which reaction-based solution corresponds to which gene-based. Often the association is not 1:1 but n:1. .. py:method:: get_gene_reac_sd_assoc_mark_no_ki(i=None) Get reaction and gene-based strain design solutions, but also tag knock-ins that were not made with a 0 Often the association is not 1:1 but n:1. .. py:method:: get_gene_sd(i=None) Get gene-based strain design solutions .. py:method:: get_gene_sd_mark_no_ki(i=None) Get gene-based strain design solutions, but also tag knock-ins that were not made with a 0 .. py:method:: get_num_sols() Get number of solutions .. py:method:: get_reaction_sd(i=None) Get reaction-based strain design solutions Gene-based intervention sets are translated to the reaction level. This can be helpful to understand the impact of gene interventions. GPR-rules are accounted for automatically. .. py:method:: get_reaction_sd_bnds(i=None) Get reaction-based strain design solutions represented by upper and lower bounds Knocked-out reactions will show as upper and lower bounds of zero. .. py:method:: get_reaction_sd_mark_no_ki(i=None) Get reaction-based strain design solutions, but also tag knock-ins that were not made with a 0 This can be helpful to analyze gene intervention sets in original metabolic models. GPR-rules are accounted for automatically. .. py:method:: get_strain_design_costs(i=None) Get costs of i-th strain design or of all in a list .. py:method:: get_strain_designs(i=None) Get i-th strain design (intervention set) or all in original format .. py:method:: load(filename) :classmethod: Load strain design solutions from a file. .. py:method:: save(filename) Save strain design solutions to a file. .. py:function:: get_subset(sd, i) SDSolutions internal function: getting a subset of solutions .. py:function:: gpr_eval(cj_terms, interv) SDSolutions internal function: evaluate a GPR term .. py:function:: strip_non_ki(sd) SDSolutions internal function: removing non-added reactions or genes