dfba
¶
Create top level imports.
Subpackages¶
Submodules¶
Package Contents¶
Classes¶
Holds information regarding a control parameter in a DfbaModel object. |
|
Class for holding information for an exchange flux in a DfbaModel object. |
|
Class for holding information for a kinetic variable in a DfbaModel object. |
|
Class representation for a dynamic FBA model. |
Functions¶
Get version information or return default if unable to do so. |
|
|
Print dependency information. |
Attributes¶
- dfba.__author__ = Multiline-String[source]¶
Show Value
1David S. Tourigny, Columbia University Irving Medical Center, New York, USA 2Moritz E. Beber, Novo Nordisk Foundation Center for Biocustainability, Technical University of Denmark
- dfba.__email__ = Multiline-String[source]¶
Show Value
1dst2156@cumc.columbia.edu 2morbeb@biosustain.dtu.dk
- class dfba.ControlParameter(name: str, change_point: str = None, values: List = None, change_points: List = None, *args, **kwargs)[source]¶
Bases:
optlang.symbolics.Symbol
Holds information regarding a control parameter in a DfbaModel object.
- id¶
The identifier to associate with this control parameter.
- Type
string
- property change_points(self) → List¶
Time points at which this control parameter changes value.
- property values(self) → List¶
Actual values of the control parameter.
- class dfba.ExchangeFlux(name: str, *args, **kwargs)[source]¶
Bases:
optlang.symbolics.Symbol
Class for holding information for an exchange flux in a DfbaModel object.
- id¶
The identifier to associate with this exchange flux.
- Type
string
- lower_bound_expression¶
The symbolic expression for calculating the lower bound of this exchange flux.
- Type
optlang.symbolics expression
- upper_bound_expression¶
The Symbolic expression for calculating the upper bound of this exchange flux.
- Type
optlang.symbolics expression
- property lower_bound_expression(self) → dfba.types.Expression¶
Relate the exchange rate to some symbolic expression.
- property upper_bound_expression(self) → dfba.types.Expression¶
Relate the exchange rate to some symbolic expression.
- class dfba.KineticVariable(name: str, initial_condition: numbers.Number = 0.0, *args, **kwargs)[source]¶
Bases:
optlang.symbolics.Symbol
Class for holding information for a kinetic variable in a DfbaModel object.
- id¶
The identifier to associate with this kinetic variable.
- Type
string
- rhs_expression¶
The symbolic expression for calculating derivative of this kinetic variable wrt time.
- Type
optlang.symbolics expression
- initital_condition¶
The initial value of this kinetic variable to be used at start of simulation.
- property rhs_expression(self) → Union[dfba.types.Expression, None]¶
Relate the rhs expression to some symbolic expression.
- property initial_condition(self) → numbers.Number¶
Relate the ininital condition to some int or float value.
- class dfba.DfbaModel(cobra_object: cobra.Model)[source]¶
Bases:
cobra.Object
Class representation for a dynamic FBA model.
- Parameters
cobra_object (cobra.Model) – Existing cobra.Model object representing FBA model.
- cobra_model¶
Existing cobra.Model object containing FBA model (reactions, metabolites, objective).
- Type
cobra.Model
- reactions¶
A DictList object where the key is the reaction identifier and the value a cobra.Reaction object in cobra_model attribute.
- Type
DictList
- objectives¶
A list containing identifiers of reactions to be used as objectives in lexicographic optimization (currently not supported)
- Type
- directions¶
A list containing directions (max or min) of each objective in lexicographic optimization (currently not supported)
- Type
- kinetic_variables¶
A DictList object where the key is the kinetic variable identifier and the value a KineticVariable object.
- Type
DictList
- exchange_fluxes¶
A DictList object where the key is the reaction identifier and the value an ExchangeFlux object.
- Type
DictList
- user_data¶
A read only attribute containing user data of the model to be passed to algorithm prior to simulation.
- Type
dfba_utils.UserData
- solver_data¶
An attribute containing data for the solver to be used for simulation of the model.
- Type
dfba_utils.SolverData
- add_kinetic_variables(self, kinetic_variable_list: List) → None¶
Add kinetic variables.
- Parameters
kinetic_variable_list (list) – The list of indetifiers of kinetic variables to be added to the model.
- add_exchange_fluxes(self, exchange_flux_list: List) → None¶
Add exchange fluxes.
- Parameters
exchange_flux_list (list) – list of identifiers of exchange fluxes to be added to the model.
- add_initial_conditions(self, initial_conditions: Dict) → None¶
Add initial conditions.
- Parameters
initial_conditions (dict) – A dict where the key is the kinetic variable identifier and the value an initial condition.
- add_rhs_expression(self, kinetic_variable_id: str, expression: dfba.types.Expression, control_parameters: Optional[List[dfba.control.ControlParameter]] = None) → None¶
Add rhs expression.
- Parameters
kinetic_variable_id (string) – Identifier of the kinetic variable to be supplied with rhs expression for calculating its derivative wrt time.
expression (optlang.symbolics expression) – The symbolic expression for calculating derivative of kinetic variable wrt time.
control_parameters (list) – A list of ControlParameter objects (if any) appearing in the supplied symbolic expression.
- add_exchange_flux_lb(self, exchange_flux_id: str, expression: dfba.types.Expression, condition: Optional[dfba.types.Expression] = None, control_parameters: Optional[List[dfba.control.ControlParameter]] = None) → None¶
Add exchange flux lower bound.
- Parameters
exchange_flux_id (string) – Indetifier of the exchange flux to be supplied with expression for calculating its lower bound.
expression (optlang.symbolics expression) – The symbolic expression for calculating lower bound of exchange flux. Convention is that lower bounds of exchange fluxes come with negative sign and therefore expression should be non-negative,representing the magnitude of this lower bound.
condition (optlang.symbolics expression) – The symbolic expression for non-negative condition on metabolite concentrations required for correct evaluation of lower bound expression. Numerical approximation can generate unphysical, negative concetration values.
control_parameters (list) – A list of ControlParameter objects (if any) appearing in the supplied symbolic expression.
- add_exchange_flux_ub(self, exchange_flux_id: str, expression: dfba.types.Expression, condition: Optional[dfba.types.Expression] = None, control_parameters: Optional[List[dfba.control.ControlParameter]] = None) → None¶
Add exchange flux upper bound.
- Parameters
exchange_flux_id (string) – Indetifier of the exchange flux to be supplied with expression for calculating its upper bound.
expression (optlang.symbolics expression) – The symbolic expression for calculating upper bound of exchange flux. Convention is that upper bounds of exchange fluxes come with positive sign and therefore expression should be non-negative, representing the magnitude of this upper bound.
condition (optlang.symbolics expression) – The symbolic expression for non-negative condition on metabolite concentrations required for correct evaluation of upper bound expression. Numerical approximation can generate unphysical, negative concetration values.
control_parameters (list) – A list of ControlParameter objects (if any) appearing in the supplied symbolic expression.
- simulate(self, tstart: float, tstop: float, tout: float, output_fluxes: Optional[List[str]] = None) → Tuple[pandas.DataFrame, pandas.DataFrame]¶
Simulate model.
- Parameters
tstart (float) – Initial time point to be used in simulation of the model.
tstop (float) – Final time point to be used in simulation of the model.
tout (float) – Output frequency to be used in simulation of the model.
output_fluxes (list) – Optional list of reaction ids whose fluxes are to be printed to results along with kinetic variables.
- Returns
time, concentrations (in self.kinetic_variables)
time, flux trajectories (in )
- Return type
tuple of 2 pd.Dataframe’s
- lp_problem(self) → dfba.types.Problem¶
LP problem.
- Returns
lp_problem – SWIGLPK object representing FBA model as pointer to GLPK problem
- Return type
Swig Object of type glp_prob *
- property cobra_model(self) → cobra.Model¶
.
- property reactions(self) → cobra.DictList¶
.
- property objectives(self) → List¶
.
- property directions(self) → List¶
.
- property kinetic_variables(self) → cobra.DictList¶
.
- property exchange_fluxes(self) → cobra.DictList¶
.
- property user_data(self) → UserData¶
.
- property solver_data(self) → SolverData¶
.
- add_to_library(self, tstart: float, tstop: float, tout: float, print_fluxes: List[cobra.Reaction], directory: str) → None¶
Add model to library.
Parameters ——- tstart : float
Initial time point to be used in simulation of the model.
- tstopfloat
Final time point to be used in simulation of the model.
- toutfloat
Length of time interval for output.
- print_fluxeslist
List of reactions whose fluxes are to be printed to results along with kinetic variables.
- directory: string
Path to temporary directory containing library.