amici.sbml_import¶
SBML Import¶
This module provides all necessary functionality to import a model specified in the Systems Biology Markup Language (SBML).
Classes
|
Class to generate AMICI C++ files for a model provided in the Systems Biology Markup Language (SBML). |
Functions Summary
|
Turn assignment rules into observables. |
|
Extract the initial concentration from a given species |
|
Collect data into fixed-length chunks or blocks |
|
Replace logX(.) by log(., X) since sympy cannot parse the former |
Functions
-
amici.sbml_import.
assignmentRules2observables
(sbml_model, filter_function=<function <lambda>>)[source]¶ Turn assignment rules into observables.
- Parameters
sbml_model (
libsbml.Model
) – Model to operate onfilter_function (
typing.Callable
) – Callback function taking assignment variable as input and returningTrue
/False
to indicate if the respective rule should be turned into an observable.
- Returns
A dictionary(observableId:{ ‘name’: observableName, ‘formula’: formulaString })
-
amici.sbml_import.
get_species_initial
(species)[source]¶ Extract the initial concentration from a given species
- Parameters
species (
libsbml.Species
) – species index- Return type
- Returns
initial species concentration
-
amici.sbml_import.
grouper
(iterable, n, fillvalue=None)[source]¶ Collect data into fixed-length chunks or blocks
grouper(‘ABCDEFG’, 3, ‘x’) –> ABC DEF Gxx”
- Parameters
iterable (
typing.Iterable
) – any iterablen (
int
) – chunk lengthfillvalue (
typing.Optional
[typing.Any
]) – padding for last chunk if length < n
- Return type
- Returns
itertools.zip_longest of requested chunks
-
amici.sbml_import.
replace_logx
(math_str)[source]¶ Replace logX(.) by log(., X) since sympy cannot parse the former
- Parameters
math_str (
typing.Union
[str
,float
,None
]) – string for sympification- Return type
typing.Union
[str
,float
,None
]- Returns
sympifiable string