Skip to content

Commit

Permalink
Fixed upper and lower bounds not read correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Apr 28, 2022
1 parent 6785b3f commit 8486608
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pyenzyme/enzymeml/tools/enzymemlreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ def _parse_parameter(self, parameter, enzmldoc):
annotation = parameter.getAnnotationString()
param_dict = self._parseSpeciesAnnotation(annotation)

print(param_dict)

if unit_id:
param_dict["unit"] = enzmldoc.getUnitString(unit_id)

Expand All @@ -645,8 +647,8 @@ def _parse_parameter(self, parameter, enzmldoc):
unit=param_dict.get("unit"),
ontology=self._sboterm_to_enum(parameter.getSBOTerm()),
initial_value=param_dict.get("initial_value"),
upper=param_dict.get("upperbound"),
lower=param_dict.get("lowerbound"),
upper=param_dict.get("upper_bound"),
lower=param_dict.get("lower_bound"),
stdev=param_dict.get("stdev"),
constant=constant,
)
Expand Down
4 changes: 3 additions & 1 deletion tests/fixtures/enzmldoc_object.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
"value": 10.0,
"unit": "1 / s",
"stdev": 0.1,
"initial_value": 10.0
"initial_value": 10.0,
"upper": 11.0,
"lower": 9.0
}
]
},
Expand Down
Binary file modified tests/fixtures/test_case.omex
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/fixtures/write_xml_string.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
<annotation>
<enzymeml:parameter xmlns:enzymeml="http://sbml.org/enzymeml/version2">
<enzymeml:initialValue>10.0</enzymeml:initialValue>
<enzymeml:upperBound>11.0</enzymeml:upperBound>
<enzymeml:lowerBound>9.0</enzymeml:lowerBound>
<enzymeml:stdev>0.1</enzymeml:stdev>
</enzymeml:parameter>
</annotation>
Expand Down

0 comments on commit 8486608

Please sign in to comment.