straindesign.strainDesignSolutions
Container for strain design solutions (SDSolutions)
Module Contents
- class straindesign.strainDesignSolutions.SDSolutions(model, sd, status, sd_setup)[source]
Bases:
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.
- Parameters:
model (cobra.Model) – A metabolic model that is an instance of the cobra.Model class.
sd (list of dict) – 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.
status (str) – Status string of the computation (e.g.: ‘optimal’)
sd_setup (dict) –
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
- Returns
(SDSolutions): Strain design solutions
- get_gene_reac_sd_assoc(i=None)[source]
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.
- get_gene_reac_sd_assoc_mark_no_ki(i=None)[source]
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.
- get_gene_sd_mark_no_ki(i=None)[source]
Get gene-based strain design solutions, but also tag knock-ins that were not made with a 0
- get_reaction_sd(i=None)[source]
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.
- get_reaction_sd_bnds(i=None)[source]
Get reaction-based strain design solutions represented by upper and lower bounds
Knocked-out reactions will show as upper and lower bounds of zero.
- get_reaction_sd_mark_no_ki(i=None)[source]
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.
- straindesign.strainDesignSolutions.get_subset(sd, i)[source]
SDSolutions internal function: getting a subset of solutions