diff --git a/biosimulators_masspy/_version.py b/biosimulators_masspy/_version.py
index df9144c..10939f0 100644
--- a/biosimulators_masspy/_version.py
+++ b/biosimulators_masspy/_version.py
@@ -1 +1 @@
-__version__ = '0.1.1'
+__version__ = '0.1.2'
diff --git a/biosimulators_masspy/core.py b/biosimulators_masspy/core.py
index 4159dbf..f508c25 100644
--- a/biosimulators_masspy/core.py
+++ b/biosimulators_masspy/core.py
@@ -210,6 +210,11 @@ def exec_sed_task(task, variables, preprocessed_task=None, log=None, config=None
variable_results[variable.id] = rxn_fluxes[sbml_id][-(sim.number_of_points + 1):]
elif sbml_id[2:] in rxn_fluxes:
variable_results[variable.id] = rxn_fluxes[sbml_id[2:]][-(sim.number_of_points + 1):]
+ elif sbml_id in mass_model.custom_parameters:
+ variable_results[variable.id] = numpy.full((sim.number_of_points + 1,), mass_model.custom_parameters[sbml_id])
+ elif sbml_id in mass_model.boundary_conditions:
+ variable_results[variable.id] = numpy.full((sim.number_of_points + 1,), mass_model.boundary_conditions[sbml_id])
+
else:
raise_errors_warnings(validation.validate_task(task),
error_summary='Unable to find variable `{}` in output.'.format(sbml_id))
@@ -311,6 +316,9 @@ def preprocess_sed_task(task, variables, config=None):
for sbml_id in mass_model.boundary_conditions.keys():
sbml_id_mass_parameter_map[sbml_id] = (mass_model.boundary_conditions, sbml_id)
+ for sbml_id in mass_model.compartments.keys():
+ sbml_id_mass_parameter_map[sbml_id] = (mass_model.compartments, sbml_id)
+
invalid_changes = []
for target, sbml_id in model_change_target_sbml_id_map.items():
if sbml_id in met_ids:
@@ -349,7 +357,7 @@ def preprocess_sed_task(task, variables, config=None):
else:
sbml_id = variable_target_sbml_id_map.get(variable.target, None)
- if not sbml_id or not (sbml_id in met_ids or sbml_id in rxn_ids):
+ if not sbml_id or not (sbml_id in met_ids or sbml_id in rxn_ids or sbml_id in sbml_id_mass_parameter_map):
invalid_targets.append(variable.target)
if invalid_symbols:
diff --git a/pyproject.toml b/pyproject.toml
index 3f0c598..84f5374 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "biosimulators-masspy"
-version = "0.1.1"
+version = "0.1.2"
description = "BioSimulators-compliant command-line interface to the MassPY simulation program ."
authors = ["Center for Reproducible Biomedical Modeling "]
license = "MIT"
diff --git a/tests/fixtures/Cilbarto_with_param_and_boundary.omex b/tests/fixtures/Cilbarto_with_param_and_boundary.omex
new file mode 100644
index 0000000..0c17048
Binary files /dev/null and b/tests/fixtures/Cilbarto_with_param_and_boundary.omex differ
diff --git a/tests/test_core_main.py b/tests/test_core_main.py
index 2592e0b..a2eac6e 100644
--- a/tests/test_core_main.py
+++ b/tests/test_core_main.py
@@ -656,5 +656,15 @@ def test_exec_sedml_docs_in_combine_archive(self):
if log.exception:
raise log.exception
+ def test_exec_sedml_docs_in_combine_archive_b(self):
+ # with reports
+ archive_filename = 'Cilbarto_with_param_and_boundary.omex'
+ archive_filename = os.path.join(os.path.dirname(__file__), 'fixtures', archive_filename)
+
+ dirname = os.path.join(self.dirname, 'reports')
+ _, log = core.exec_sedml_docs_in_combine_archive(str(archive_filename), dirname)
+ if log.exception:
+ raise log.exception
+
if __name__ == "__main__":
unittest.main()