8.1.1.2. skimpy.core¶
[———]
Copyright 2017 Laboratory of Computational Systems Biotechnology (LCSB), Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
8.1.1.2.1. Submodules¶
8.1.1.2.2. Package Contents¶
8.1.1.2.2.1. Classes¶
|
This class contains the kinetic model as described by reaction and |
|
Helper class that provides a standard way to create an ABC using |
|
This class describes a modifier to an expression, like a boundary condition |
|
We differentiate boundary conditions as modifiers that define the boundaries |
|
|
|
Add a concentration rate term to your rate expression |
|
We differentiate boundary conditions as modifiers that define the boundaries |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Global reaction class |
|
Really just an ordered dict with tab completion in interactive terminals |
|
|
|
Helper class that provides a standard way to create an ABC using |
|
|
|
Helper class that provides a standard way to create an ABC using |
|
|
|
Helper class that provides a standard way to create an ABC using |
|
Really just an ordered dict with tab completion in interactive terminals |
|
Parameters set for kinetic models wich can be indexed with symbols or |
|
8.1.1.2.2.2. Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
8.1.1.2.2.3. Attributes¶
|
|
|
|
|
|
|
|
|
Jacobian Types |
|
|
|
MCA Types |
|
|
|
Item types |
|
|
|
Units |
|
|
|
|
|
OTHER |
|
|
|
|
|
|
|
|
|
|
|
Jacobian Types |
|
|
|
MCA Types |
|
|
|
Item types |
|
|
|
Units |
|
|
|
|
|
OTHER |
|
- class skimpy.KineticModel(reactions=None, boundary_conditions=None, constraints=None, name='Unnamed')¶
Bases:
objectThis class contains the kinetic model as described by reaction and boundary conditions and constratins.
:param : :return:
- property reactants(self)¶
- property parameters(self)¶
- property moieties(self)¶
- add_reaction(self, reaction)¶
Adds a SKiMPy reaction to the model
- Parameters
reaction (skimpy.core.Reaction) – The reaction to add
- Returns
- add_compartment(self, compartment)¶
- Parameters
compartment –
- Returns
- add_constraint(self, constraint)¶
- add_boundary_condition(self, boundary_condition)¶
Enforces a boundary condition (e.g. a constant concentration) on the kinetic model
- Parameters
boundary_condition (skimpy.core.BoundaryCondition) – the boundary condition to enforce
- Returns
- add_to_tabdict(self, element, kind)¶
- parametrize_by_reaction(self, param_dict)¶
- If has input: apply as dict to reactions in the model by
reaction.parametrize(args)
- Returns
- parametrize(self, param_dict)¶
- repair(self)¶
Link inhibitors and activators to reactants FIXME: Any idea to avoid this is dearly welcome :return:
- property sim_type(self)¶
- prepare(self, mca=True, ode=True, **kwargs)¶
Model preparation for different analysis types. The preparation is done before the compiling step to be able to curate the model in between
- Parameters
mca –
ode –
- Returns
- compile_jacobian(self, type=NUMERICAL, sim_type=QSSA, ncpu=1)¶
- compile_ode(self, sim_type=QSSA, ncpu=1)¶
- solve_ode(self, time_out, solver_type='cvode', **kwargs)¶
The solver types are from ::scikits.odes::, and can be found at <https://scikits-odes.readthedocs.io/en/latest/solvers.html>`_.
- compile_mca(self, parameter_list=[], mca_type=NET, sim_type=QSSA, ncpu=1)¶
Compile MCA expressions: elasticities, jacobian and control coeffcients
- skimpy.check_is_symbol(s_in)¶
- class skimpy.KineticMechanism(name, reactants, parameters=None, inhibitors=None, enzyme=None)¶
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- parameter_reactant_links¶
- __reduce__(self)¶
helper for pickle
- link_parameters_and_reactants(self)¶
- property parameters(self)¶
- property Reactants(self)¶
Class to define metabolites and their roles in the reaction :return:
- property Parameters(self)¶
Class to define parameters and their roles in the reaction :return:
- abstract get_qssa_rate_expression(self)¶
- abstract update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- get_parameters_from_expression(self, expr)¶
- skimpy.make_parameter_set(mechanism, param_declaration)¶
- skimpy.make_reactant_set(mechanism, reactant_declaration)¶
- class skimpy.ExpressionModifier(name, reaction=None, modifier=None)¶
Bases:
objectThis class describes a modifier to an expression, like a boundary condition or constraint. For example, changing a rate to a constant (boundary condition), or linking it to another variable of the model (constraint). It accepts as an argument a modifier.
A modifier is a function which will look at all your expressions, and apply its transformation to them. As a result, its arguments have to be a TabDict of expressions, such as KinModel.ODEFun.expressions
- prefix = MOD¶
- __call__(self, expressions)¶
- property modifier(self)¶
- link(self, model)¶
Link the modifier to a model, to gain awareness of the inner/outer variables :param model: :return:
- property name(self)¶
- class skimpy.BoundaryCondition(name, modifier=None, reaction=None)¶
Bases:
ExpressionModifierWe differentiate boundary conditions as modifiers that define the boundaries of the observed system.
- prefix = BC¶
- class skimpy.ConstantConcentration(reactant, name=None, reaction=None)¶
Bases:
BoundaryCondition- prefix = CC¶
- modifier(self, expressions)¶
Set the rate to 0 :param expressions: :return:
- __del__(self)¶
- class skimpy.AdditiveConcentrationRate(reactant, flux_value, name=None, reaction=None)¶
Bases:
ExpressionModifierAdd a concentration rate term to your rate expression
- prefix = ADDCR¶
- modifier(self, expressions)¶
Add to the rate expression :param expressions: :return:
- class skimpy.BoundaryFlux(reactant, flux_value, reaction=None)¶
Bases:
BoundaryCondition,AdditiveConcentrationRateWe differentiate boundary conditions as modifiers that define the boundaries of the observed system.
- prefix = BF¶
- check_dependency(self, expression)¶
- class skimpy.FirstOrderSmallMoleculeModifier(small_molecule, mechanism_stoichiometry, name=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = HSM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.DisplacementSmallMoleculeModifier(small_molecule, mechanism_stoichiometry, name=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = DSM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.ActivationModifier(activator, name=None, k_activation=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = AM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.InhibitionModifier(inhibitor, name=None, k_inhibition=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = IM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.HillActivationModifier(activator, name=None, k_activation=None, a_max=None, hill_coefficient=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = HAM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.SimpleHillActivationModifier(activator, name=None, k_activation=None, a_max=None, hill_coefficient=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = SHAM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- class skimpy.HillInhibitionModifier(inhibitor, name=None, k_inhibition=None, hill_coefficient=None, reaction=None)¶
Bases:
skimpy.mechanisms.mechanism.KineticMechanism,ExpressionModifierHelper class that provides a standard way to create an ABC using inheritance.
- prefix = HIM¶
- Reactants¶
- Parameters¶
- parameter_reactant_links¶
- modifier(self, expressions)¶
change the flux reaction rate expressions :param expression: {vnet, vfwd, vbwd} :return:
- get_qssa_rate_expression(self)¶
- update_qssa_rate_expression(self)¶
- abstract get_full_rate_expression(self)¶
- abstract calculate_rate_constants(self)¶
- skimpy.QSSA = qssa¶
- skimpy.TQSSA = tqssa¶
- skimpy.MCA = mca¶
- skimpy.ODE = ode¶
- skimpy.ELEMENTARY = elementary¶
Jacobian Types
- skimpy.NUMERICAL = numerical¶
- skimpy.SYMBOLIC = symbolic¶
MCA Types
- skimpy.NET = net¶
- skimpy.SPLIT = split¶
Item types
- skimpy.PARAMETER = parameter¶
- skimpy.VARIABLE = variable¶
Units
- skimpy.KCAL = kcal¶
- skimpy.KJ = kJ¶
- skimpy.JOULE = JOULE¶
OTHER
- skimpy.WATER_FORMULA = H2O¶
- class skimpy.Reaction(name, reactants, mechanism, parameters=None, inhibitors=None, enzyme=None)¶
Bases:
objectGlobal reaction class
- property reactants(self)¶
- property reactant_stoichiometry(self)¶
- property parameters(self)¶
- property rates(self)¶
- __str__(self)¶
Return str(self).
- parametrize(self, params)¶
- class skimpy.TabDict¶
Bases:
collections.OrderedDictReally just an ordered dict with tab completion in interactive terminals
- __dir__(self)¶
__dir__() -> list default dir() implementation
- __getattr__(self, attr)¶
- iloc(self, ix)¶
- class skimpy.Item(name, value=None, model=None, suffix='')¶
Bases:
object- _generate_symbol(self)¶
- property symbol(self)¶
- property suffix(self)¶
- property bounds(self)¶
- __str__(self)¶
Return str(self).
- __repr__(self)¶
Return repr(self).
- class skimpy.ItemSet(mechanism)¶
Bases:
abc.ABC,skimpy.utils.tabdict.TabDictHelper class that provides a standard way to create an ABC using inheritance.
- __reduce__(self)¶
helper for pickle
- class skimpy.ParameterSet(mechanism, param_declaration, param_values, suffix='')¶
Bases:
ItemSetHelper class that provides a standard way to create an ABC using inheritance.
- property required_for(self)¶
- skimpy.make_parameter_set(mechanism, param_declaration)¶
- class skimpy.ReactantSet(mechanism, reactant_declaration, reactant_values)¶
Bases:
ItemSetHelper class that provides a standard way to create an ABC using inheritance.
- skimpy.make_reactant_set(mechanism, reactant_declaration)¶
- skimpy.QSSA = qssa¶
- skimpy.TQSSA = tqssa¶
- skimpy.MCA = mca¶
- skimpy.ODE = ode¶
- skimpy.ELEMENTARY = elementary¶
Jacobian Types
- skimpy.NUMERICAL = numerical¶
- skimpy.SYMBOLIC = symbolic¶
MCA Types
- skimpy.NET = net¶
- skimpy.SPLIT = split¶
Item types
- skimpy.PARAMETER = parameter¶
- skimpy.VARIABLE = variable¶
Units
- skimpy.KCAL = kcal¶
- skimpy.KJ = kJ¶
- skimpy.JOULE = JOULE¶
OTHER
- skimpy.WATER_FORMULA = H2O¶
- class skimpy.TabDict¶
Bases:
collections.OrderedDictReally just an ordered dict with tab completion in interactive terminals
- __dir__(self)¶
__dir__() -> list default dir() implementation
- __getattr__(self, attr)¶
- iloc(self, ix)¶
- class skimpy.ParameterValues(parameter_values, kmodel=None)¶
Bases:
objectParameters set for kinetic models wich can be indexed with symbols or
- __getitem__(self, item)¶
- __setitem__(self, item, value)¶
- items(self)¶
- keys(self)¶
- values(self)¶
- class skimpy.ParameterValuePopulation(data, kmodel=None, index=None)¶
Bases:
object- __getitem__(self, index)¶
- __len__(self)¶
- __iter__(self)¶
- __next__(self)¶
- _dataframe(self, dropna=True)¶
- mean(self)¶
- Return Computes the mean parameter values for the population
- var(self)¶
- Return Computes the variance parameter values for the population
- cov(self)¶
- Return Computes the covaraince parameter values for the population
- log_mean(self)¶
- Return Computes the logarithmic mean parameter values for the population
- log_var(self)¶
- Return Computes the logarithmic variance parameter values for the population
- log_cov(self)¶
- Return Computes the logarithmic covaraince parameter values for the population
- save(self, filename)¶
Saves the parameter population as hdf5 file :param filename: string XXX.h5 / XXX.hdf5 :return:
- skimpy.load_parameter_population(filename, lower_index=None, upper_index=None)¶
- skimpy.concat_populations(values, kmodel=None, index=None)¶