amici.petab.conditions
PEtab conditions to AMICI ExpDatas.
Functions
|
Get |
|
Create list of |
|
Create list of :class:amici.ExpData objects with parameters filled in. |
|
Fill fixed and dynamic parameters into the edatas (in-place). |
|
Fill fixed and dynamic parameters into the edata for condition (in-place). |
- amici.petab.conditions.create_edata_for_condition(condition, measurement_df, amici_model, petab_problem, observable_ids)[source]
Get
amici.amici.ExpData
for the given PEtab condition.Sets timepoints, observed data and sigmas.
- Parameters:
condition (
typing.Union
[dict
,pandas.core.series.Series
]) –pandas.DataFrame
row withpreequilibrationConditionId
andsimulationConditionId
.measurement_df (
pandas.core.frame.DataFrame
) –pandas.DataFrame
with measurements for the given condition.amici_model (
typing.Union
[amici.amici.Model
,amici.amici.ModelPtr
]) – AMICI modelpetab_problem (
petab.problem.Problem
) – Underlying PEtab problem
- Return type:
amici.swig_wrappers.ExpData
- Returns:
ExpData instance.
- amici.petab.conditions.create_edatas(amici_model, petab_problem, simulation_conditions=None)[source]
Create list of
amici.amici.ExpData
objects for PEtab problem.- Parameters:
amici_model (
typing.Union
[amici.amici.Model
,amici.amici.ModelPtr
]) – AMICI model.petab_problem (
petab.problem.Problem
) – Underlying PEtab problem.simulation_conditions (
typing.Union
[pandas.core.frame.DataFrame
,dict
]) – Result ofpetab.get_simulation_conditions()
. Can be provided to save time if this has be obtained before.
- Return type:
list
[amici.swig_wrappers.ExpData
]- Returns:
List with one
amici.amici.ExpData
per simulation condition, with filled in timepoints and data.
- amici.petab.conditions.create_parameterized_edatas(amici_model, petab_problem, problem_parameters, scaled_parameters=False, parameter_mapping=None, simulation_conditions=None)[source]
Create list of :class:amici.ExpData objects with parameters filled in.
- Parameters:
amici_model (
typing.Union
[amici.amici.Model
,amici.amici.ModelPtr
]) – AMICI Model assumed to be compatible withpetab_problem
.petab_problem (
petab.problem.Problem
) – PEtab problem to work on.problem_parameters (
dict
[str
,numbers.Number
]) – Run simulation with these parameters. IfNone
, PEtabnominalValues
will be used. To be provided as dict, mapping PEtab problem parameters to SBML IDs.scaled_parameters (
bool
) – IfTrue
,problem_parameters
are assumed to be on the scale provided in the PEtab parameter table and will be unscaled. IfFalse
, they are assumed to be in linear scale.parameter_mapping (
amici.petab.parameter_mapping.ParameterMapping
) – Optional precomputed PEtab parameter mapping for efficiency, as generated bycreate_parameter_mapping()
.simulation_conditions (
typing.Union
[pandas.core.frame.DataFrame
,dict
]) – Result ofpetab.get_simulation_conditions()
. Can be provided to save time if this has been obtained before.
- Return type:
list
[amici.swig_wrappers.ExpData
]- Returns:
List with one
amici.amici.ExpData
per simulation condition, with filled in timepoints, data and parameters.
- amici.petab.conditions.fill_in_parameters(edatas, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]
Fill fixed and dynamic parameters into the edatas (in-place).
- Parameters:
edatas (
list
[amici.swig_wrappers.ExpData
]) – List of experimental datasamici.amici.ExpData
with everything except parameters filled.problem_parameters (
dict
[str
,numbers.Number
]) – Problem parameters as parameterId=>value dict. Only parameters included here will be set. Remaining parameters will be used as currently set in amici_model.scaled_parameters (
bool
) – If True, problem_parameters are assumed to be on the scale provided in the parameter mapping. If False, they are assumed to be in linear scale.parameter_mapping (
amici.petab.parameter_mapping.ParameterMapping
) – Parameter mapping for all conditions.amici_model (
typing.Union
[amici.amici.Model
,amici.amici.ModelPtr
]) – AMICI model.
- Return type:
- amici.petab.conditions.fill_in_parameters_for_condition(edata, problem_parameters, scaled_parameters, parameter_mapping, amici_model)[source]
Fill fixed and dynamic parameters into the edata for condition (in-place).
- Parameters:
edata (
amici.swig_wrappers.ExpData
) – Experimental data object to fill parameters into.problem_parameters (
dict
[str
,numbers.Number
]) – Problem parameters as parameterId=>value dict. Only parameters included here will be set. Remaining parameters will be used as already set in amici_model and edata.scaled_parameters (
bool
) – If True, problem_parameters are assumed to be on the scale provided in the parameter mapping. If False, they are assumed to be in linear scale.parameter_mapping (
amici.petab.parameter_mapping.ParameterMappingForCondition
) – Parameter mapping for current condition.amici_model (
typing.Union
[amici.amici.Model
,amici.amici.ModelPtr
]) – AMICI model
- Return type: