biosimulators_utils.model_lang.cellml package#
Submodules#
biosimulators_utils.model_lang.cellml.utils module#
Utilities for working with CellML models
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-04-05
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- biosimulators_utils.model_lang.cellml.utils.get_parameters_variables_outputs_for_simulation(model_filename, model_language, simulation_type, algorithm_kisao_id=None, change_level=<class 'biosimulators_utils.sedml.data_model.SedDocument'>, native_ids=False, native_data_types=False, observable_only=False, config=None)[source]#
Get the possible observables for a simulation of a model
- Parameters:
model_filename (
str
) – path to model filemodel_language (
str
) – model language (e.g.,urn:sedml:language:cellml
)simulation_type (
types.Type
) – subclass ofSimulation
algorithm_kisao_id (
str
, optional) – KiSAO id of the algorithm for simulating the model (e.g.,KISAO_0000019
for CVODE)change_level (
types.Type
, optional) – level at which model changes will be made (SedDocument
orTask
)native_ids (
bool
, optional) – whether to return the raw id and name of each model component rather than the suggested name for the variable of an associated SED-ML data generatornative_data_types (
bool
, optional) – whether to return new_values in their native data typesobservable_only (
bool
, optional) – whether to skip the variables that are not exposed by OpenCorconfig (
Config
, optional) – whether to fail on missing includes
- Returns:
possible attributes of a model that can be changed and their default values
list
ofSimulation
: simulation of the modellist
ofVariable
: possible observables for a simulation of the modellist
ofPlot
: possible plots of the results of a simulation of the model- Return type:
list
ofModelAttributeChange
biosimulators_utils.model_lang.cellml.validation module#
Utilities for validating CellML models
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-05-10
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- biosimulators_utils.model_lang.cellml.validation.validate_model(filename, name=None, resolve_imports=True, config=None)[source]#
Check that a file is a valid CellML model
- Parameters:
filename (
str
) – path to modelname (
str
, optional) – name of model for use in error messagesresolve_imports (
bool
, optional) – whether to resolve importsconfig (
Config
, optional) – whether to fail on missing includes
- Returns:
nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)tuple
:libcellml.model.Model
: modellxml.etree._ElementTree
: model
- Return type:
tuple
- biosimulators_utils.model_lang.cellml.validation.validate_model_version_1_0(filename, doc, resolve_imports=True, config=None)[source]#
Check that a file is a valid CellML 2.0 model
- Parameters:
filename (
str
) – path to modeldoc (
lxml.etree._ElementTree
) – XML document for fileresolve_imports (
bool
, optional) – whether to resolve importsconfig (
Config
, optional) – whether to fail on missing includes
- Returns:
nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)None
- Return type:
tuple
- biosimulators_utils.model_lang.cellml.validation.validate_model_version_1_1(filename, doc, resolve_imports=True, config=None)[source]#
Check that a file is a valid CellML 2.0 model
- Parameters:
filename (
str
) – path to modeldoc (
lxml.etree._ElementTree
) – XML document for fileresolve_imports (
bool
, optional) – whether to resolve importsconfig (
Config
, optional) – whether to fail on missing includes
- Returns:
nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)None
- Return type:
tuple
- biosimulators_utils.model_lang.cellml.validation.validate_model_version_2(filename, doc, resolve_imports=True, config=None)[source]#
Check that a file is a valid CellML 2.0 model
- Parameters:
filename (
str
) – path to modeldoc (
lxml.etree._ElementTree
) – XML document for fileresolve_imports (
bool
, optional) – whether to resolve importsconfig (
Config
, optional) – whether to fail on missing includes
- Returns:
nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)nested
list
ofstr
: nested list of errors (e.g., required ids missing or ids not unique)libcellml.model.Model
: model
- Return type:
tuple