5. API Reference¶
-
class
sbml2julia.core.
SBML2JuliaProblem
(petab_yaml, t_steps=None, n_starts=1, infer_ic_from_sbml=False, optimizer_options={}, custom_code_dict={})¶ Class to create and solve an optimization and retreive the results
-
property
custom_code_dict
¶ Get custom_code_dict
- Returns
custom code dict
- Return type
dict
-
import_julia_code
(file)¶ Summary
- Parameters
file (TYPE) – Description
-
property
infer_ic_from_sbml
¶ Get infer_ic_from_sbml
- Returns
if missing initial conditions shall be infered from SBML model
- Return type
bool
-
insert_custom_code
(custom_code_dict)¶ Inserts custom code into Julia code
- Parameters
custom_code_dict (
dict
) – dict with replaced code as keys and replacement code as values
-
property
julia_code
¶ Get julia_code
- Returns
julia code for optimization
- Return type
str
-
property
n_starts
¶ Get n_starts
- Returns
number of multistarts
- Return type
int
-
optimize
()¶ Optimize SBML2JuliaProblem
- Returns
- Results in a dict with keys ‘species’,
’observables’, ‘parameters’ and ‘par_est’
- Return type
dict
-
property
optimizer_options
¶ Get optimizer_options
- Returns
optimization solver options
- Return type
dict
-
property
petab_problem
¶ Get petab_problem
- Returns
petab problem
- Return type
petab.problem.Problem
-
property
petab_yaml_dict
¶ Get petab_yaml_dict
- Returns
petab_yaml_dict
- Return type
dict
-
plot_results
(condition, path='./plot.pdf', observables=[], size=(6, 5))¶ Plot results
- Parameters
condition (
str
) – experimental condition to plotpath (
str
, optional) – path to output plotobservables (
list
, optional) – list of observables to be plottedsize (
tuple
, optional) – size of image
- Raises
ValueError – if observables is not a list
-
property
results
¶ Get results
- Returns
optimization results
- Return type
dict
-
property
t_steps
¶ Get t_steps
- Returns
number of time-discretiation steps
- Return type
t_steps (
int
, optional)
-
write_jl_file
(path='./julia_code.jl')¶ Write code to julia file
- Parameters
path (
str
, optional) – path to output Julia file
-
write_optimized_parameter_table
()¶ Writes a new parameter table were nominal values are replaced with optimized values
-
write_results
(path='./results', df_format='long')¶ Write results to excel file
- Parameters
path (
str
, optional) – path of excel file to write results todf_format (
str
, optional) – long or wide table format
- Raises
ValueError – if path is not a directory or Excel file
-
property