Skip to content

biomodels.cases

Case construction for a BioModels model.

Every curated model runs the same generic timecourse: there are no expected results (Case.expected is None, the roadrunner simulation of the original SBML becomes the expected results the later stages are compared with, see sbml2cellml.testsuite.runner).

constructs

constructs(model, text)

SBML constructs a model uses, as component tags of a Case.

Parameters:

Name Type Description Default
model Model

the model to inspect.

required
text str

the file content the model was read from, used to detect a csymbol delay (not exposed on the libsbml.Model API).

required

Returns:

Type Description
str

The construct tags present in the model, e.g. `("Reactions",

...

"AssignmentRules")`.

biomodel_case

biomodel_case(info, sbml_path, packages)

Build the generic timecourse case of a BioModels model.

Parameters:

Name Type Description Default
info ModelInfo

metadata of the model.

required
sbml_path Path

path of the downloaded SBML file.

required
packages tuple[str, ...]

SBML packages the model uses (models.packages); each becomes a <package>:package component tag so skip_reason skips the case the same way it skips a test suite case using an unsupported package.

required

Returns:

Type Description
Case

The case, with expected=None and test_type="TimeCourse".

Case

settings.variables is the species ids, followed by the ids of the

Case

rate-rule and assignment-rule targets which are not species

Case

(parameters and compartments), in document order and without

Case

duplicates; amount and concentration stay species only.

Raises:

Type Description
BioModelsError

if the SBML file has no model.