biosimulators_utils.model_lang.sbml package#
Submodules#
biosimulators_utils.model_lang.sbml.utils module#
Utilities for working with SBML models
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-04-05
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- biosimulators_utils.model_lang.sbml.utils.get_package_namespace(package: str, namespaces: Dict[str | None, str]) Tuple[str, str] [source]#
Get the prefix and URI for the namespace of an SBML package
- Parameters:
package (
str
) – SBML package id (e.g.,fbc
,qual
)namespaces (
dict
) – dictionary that maps namespace prefixes to URIs
- Returns:
str
: prefixstr
: URI
- Return type:
tuple
- biosimulators_utils.model_lang.sbml.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, include_local_parameters_in_task_level_simulation_parameters=False, include_model_parameters_in_simulation_variables=False, include_compartment_sizes_in_simulation_variables=False, include_reaction_fluxes_in_kinetic_simulation_variables=False, validate=True, validate_consistency=True, 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:sbml
)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 returnnew_value
in their native data typesinclude_local_parameters_in_task_level_simulation_parameters (
bool
, optional) – whether to include the local parameters among the returned SED model changes for SED tasksinclude_model_parameters_in_simulation_variables (
bool
, optional) – whether to include the values of non-constant SBML parameters with assignment rules among the returned SED variablesinclude_compartment_sizes_in_simulation_variables (
bool
, optional) – whether to include the sizes of non-constant SBML compartments with assignment rules among the returned SED variablesinclude_reaction_fluxes_in_kinetic_simulation_variables (
bool
, optional) – whether to include reaction fluxes among the returned SED variables for kinetic simulationsvalidate (
str
, optional) – whether to validate the modelvalidate_consistency (
str
, optional) – whether to check the consistency of the modelconfig (
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.sbml.validation module#
Utilities for validating SBML models
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-04-13
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- biosimulators_utils.model_lang.sbml.validation.validate_model(filename, name=None, validate_consistency=True, config=None)[source]#
Check that a model is valid
- Parameters:
filename (
str
) – path to modelname (
str
, optional) – name of model for use in error messagesvalidate_consistency (
str
, optional) – whether to check the consistency of the modelconfig (
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)libsbml.SBMLDocument
: model
- Return type:
tuple