Skip to content

Commit a2aec34

Browse files
committed
add test cases
1 parent 777e170 commit a2aec34

File tree

3 files changed

+264
-0
lines changed

3 files changed

+264
-0
lines changed

tests/data/expected_omex_content.xml

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sbml xmlns="http://www.sbml.org/sbml/level3/version2/core" level="3" version="2">
3+
<model name="Test">
4+
<annotation>
5+
<enzymeml:data xmlns:enzymeml="https://www.enzymeml.org/v2" file="data.tsv">
6+
<enzymeml:measurement id="m0" name="m0" timeUnit="u1">
7+
<enzymeml:conditions>
8+
<enzymeml:ph value="7.0"/>
9+
<enzymeml:temperature value="298.15" unit="u3"/>
10+
</enzymeml:conditions>
11+
<enzymeml:speciesData species="s0" unit="u2" type="CONCENTRATION"/>
12+
<enzymeml:speciesData species="s1" value="10.0" unit="u2" type="CONCENTRATION"/>
13+
</enzymeml:measurement>
14+
<enzymeml:measurement id="m1" name="m1" timeUnit="u1">
15+
<enzymeml:conditions>
16+
<enzymeml:ph value="7.0"/>
17+
<enzymeml:temperature value="298.15" unit="u3"/>
18+
</enzymeml:conditions>
19+
<enzymeml:speciesData species="s0" unit="u2" type="CONCENTRATION"/>
20+
<enzymeml:speciesData species="s1" value="10.0" unit="u2" type="CONCENTRATION"/>
21+
</enzymeml:measurement>
22+
</enzymeml:data>
23+
</annotation>
24+
<listOfUnitDefinitions>
25+
<unitDefinition id="u0" name="ml">
26+
<annotation>
27+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
28+
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UO_0000098">
29+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
30+
</rdf:Description>
31+
</rdf:RDF>
32+
</annotation>
33+
<listOfUnits>
34+
<unit kind="litre" exponent="1" scale="-3"/>
35+
</listOfUnits>
36+
</unitDefinition>
37+
<unitDefinition id="u2" name="mmol / l">
38+
<annotation>
39+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
40+
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UO_0000063">
41+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
42+
</rdf:Description>
43+
</rdf:RDF>
44+
</annotation>
45+
<listOfUnits>
46+
<unit kind="mole" exponent="1" scale="-3"/>
47+
<unit kind="litre" exponent="-1" scale="1"/>
48+
</listOfUnits>
49+
</unitDefinition>
50+
<unitDefinition id="u1" name="s">
51+
<annotation>
52+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
53+
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UO_0000010">
54+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
55+
</rdf:Description>
56+
</rdf:RDF>
57+
</annotation>
58+
<listOfUnits>
59+
<unit kind="second" exponent="1" scale="1"/>
60+
</listOfUnits>
61+
</unitDefinition>
62+
<unitDefinition id="u3" name="K">
63+
<annotation>
64+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
65+
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UO_0000012">
66+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
67+
</rdf:Description>
68+
</rdf:RDF>
69+
</annotation>
70+
<listOfUnits>
71+
<unit kind="kelvin" exponent="1" scale="1"/>
72+
</listOfUnits>
73+
</unitDefinition>
74+
<unitDefinition id="u4" name="1 / s">
75+
<annotation>
76+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
77+
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UO_0000010">
78+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
79+
</rdf:Description>
80+
</rdf:RDF>
81+
</annotation>
82+
<listOfUnits>
83+
<unit kind="second" exponent="-1" scale="1"/>
84+
</listOfUnits>
85+
</unitDefinition>
86+
</listOfUnitDefinitions>
87+
<listOfCompartments>
88+
<compartment id="v0" name="Vessel 1" size="10" units="u0" constant="true">
89+
<annotation>
90+
<rdf:RDF xmlns:OBO="http://purl.obolibrary.org/obo/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="https://schema.org/">
91+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Vessel/abc02182-675a-4fd7-b067-9f376f17b874">
92+
<schema:name>Vessel 1</schema:name>
93+
<OBO:OBI_0002139 rdf:datatype="http://www.w3.org/2001/XMLSchema#double">10.0</OBO:OBI_0002139>
94+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Vessel"/>
95+
<rdf:type rdf:resource="http://purl.obolibrary.org/obo/OBI_0400081"/>
96+
</rdf:Description>
97+
</rdf:RDF>
98+
</annotation>
99+
</compartment>
100+
</listOfCompartments>
101+
<listOfSpecies>
102+
<species sboTerm="SBO:0000252" id="p0" name="Enzyme" compartment="v0" constant="false">
103+
<annotation>
104+
<rdf:RDF xmlns:OBO="http://purl.obolibrary.org/obo/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="https://schema.org/">
105+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Protein/487be0d2-e325-4f0b-857b-3bd8d54c4003">
106+
<schema:name>Enzyme</schema:name>
107+
<OBO:GSSO_007262>MTEY</OBO:GSSO_007262>
108+
<OBO:OBI_0100026>E.coli</OBO:OBI_0100026>
109+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Protein"/>
110+
<rdf:type rdf:resource="https://schema.org/Protein"/>
111+
</rdf:Description>
112+
</rdf:RDF>
113+
<enzymeml:protein xmlns:enzymeml="https://www.enzymeml.org/v2">
114+
<enzymeml:ecnumber>1.1.1.1</enzymeml:ecnumber>
115+
<enzymeml:organism>E.coli</enzymeml:organism>
116+
<enzymeml:organismTaxId>12345</enzymeml:organismTaxId>
117+
<enzymeml:sequence>MTEY</enzymeml:sequence>
118+
</enzymeml:protein>
119+
</annotation>
120+
</species>
121+
<species sboTerm="SBO:0000296" id="c0" name="Enzyme-Substrate Complex" constant="true">
122+
<annotation>
123+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="https://schema.org/">
124+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Complex/2f52086d-d7a8-4a2d-870b-bd6bafd91504">
125+
<schema:name>Enzyme-Substrate Complex</schema:name>
126+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Complex"/>
127+
</rdf:Description>
128+
</rdf:RDF>
129+
<enzymeml:complex xmlns:enzymeml="https://www.enzymeml.org/v2">
130+
<enzymeml:participants>p0</enzymeml:participants>
131+
<enzymeml:participants>s0</enzymeml:participants>
132+
</enzymeml:complex>
133+
</annotation>
134+
</species>
135+
<species sboTerm="SBO:0000247" id="s0" name="Substrate" compartment="v0" initialConcentration="0" hasOnlySubstanceUnits="false" constant="false">
136+
<annotation>
137+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="https://schema.org/">
138+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/SmallMolecule/551e35d3-ae18-490d-b4a7-003fcd28f446">
139+
<schema:name>Substrate</schema:name>
140+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/SmallMolecule"/>
141+
</rdf:Description>
142+
</rdf:RDF>
143+
<enzymeml:smallMolecule xmlns:enzymeml="https://www.enzymeml.org/v2">
144+
<enzymeml:inchiKey>QTBSBXVTEAMEQO-UHFFFAOYSA-N</enzymeml:inchiKey>
145+
<enzymeml:smiles>CC(=O)O</enzymeml:smiles>
146+
</enzymeml:smallMolecule>
147+
</annotation>
148+
</species>
149+
<species sboTerm="SBO:0000247" id="s1" name="Product" compartment="v0" initialConcentration="10" hasOnlySubstanceUnits="false" constant="false">
150+
<annotation>
151+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="https://schema.org/">
152+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/SmallMolecule/1a93b3f8-ce94-429d-975b-ff6a837b0424">
153+
<schema:name>Product</schema:name>
154+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/SmallMolecule"/>
155+
</rdf:Description>
156+
</rdf:RDF>
157+
<enzymeml:smallMolecule xmlns:enzymeml="https://www.enzymeml.org/v2">
158+
<enzymeml:inchiKey>QTBSBXVTEAMEQO-UHFFFAOYSA-N</enzymeml:inchiKey>
159+
<enzymeml:smiles>CC(=O)O</enzymeml:smiles>
160+
</enzymeml:smallMolecule>
161+
</annotation>
162+
</species>
163+
</listOfSpecies>
164+
<listOfParameters>
165+
<parameter id="kcat" name="kcat" units="u4" constant="true">
166+
<annotation>
167+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
168+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Parameter/2872b6d6-191f-4bc4-a36a-130eb4534837">
169+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Parameter"/>
170+
</rdf:Description>
171+
</rdf:RDF>
172+
<enzymeml:parameter xmlns:enzymeml="https://www.enzymeml.org/v2">
173+
<enzymeml:lowerBound>0.0</enzymeml:lowerBound>
174+
<enzymeml:upperBound>100.0</enzymeml:upperBound>
175+
<enzymeml:stdDeviation>0.1</enzymeml:stdDeviation>
176+
</enzymeml:parameter>
177+
</annotation>
178+
</parameter>
179+
<parameter id="K_m" name="K_m" units="u2" constant="true">
180+
<annotation>
181+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
182+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Parameter/31e315d7-8e87-4ef9-9ca4-1e9e08f2ded7">
183+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Parameter"/>
184+
</rdf:Description>
185+
</rdf:RDF>
186+
<enzymeml:parameter xmlns:enzymeml="https://www.enzymeml.org/v2">
187+
<enzymeml:lowerBound>0.0</enzymeml:lowerBound>
188+
<enzymeml:upperBound>100.0</enzymeml:upperBound>
189+
<enzymeml:stdDeviation>0.1</enzymeml:stdDeviation>
190+
</enzymeml:parameter>
191+
</annotation>
192+
</parameter>
193+
<parameter id="E_tot" name="E_tot" units="u2" constant="true">
194+
<annotation>
195+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
196+
<rdf:Description rdf:about="http://www.enzymeml.org/v2/Parameter/d49325e0-8483-469a-9d6d-1bcadac2bb98">
197+
<rdf:type rdf:resource="http://www.enzymeml.org/v2/Parameter"/>
198+
</rdf:Description>
199+
</rdf:RDF>
200+
<enzymeml:parameter xmlns:enzymeml="https://www.enzymeml.org/v2">
201+
<enzymeml:lowerBound>0.0</enzymeml:lowerBound>
202+
<enzymeml:upperBound>100.0</enzymeml:upperBound>
203+
<enzymeml:stdDeviation>0.1</enzymeml:stdDeviation>
204+
</enzymeml:parameter>
205+
</annotation>
206+
</parameter>
207+
</listOfParameters>
208+
<listOfInitialAssignments>
209+
<initialAssignment symbol="E_tot">
210+
<math xmlns="http://www.w3.org/1998/Math/MathML">
211+
<cn type="integer"> 100 </cn>
212+
</math>
213+
</initialAssignment>
214+
</listOfInitialAssignments>
215+
<listOfRules>
216+
<rateRule variable="s1">
217+
<annotation>
218+
<enzymeml:variables xmlns:enzymeml="https://www.enzymeml.org/v2">
219+
<enzymeml:variable id="s0" name="s0" symbol="s0"/>
220+
</enzymeml:variables>
221+
</annotation>
222+
<math xmlns="http://www.w3.org/1998/Math/MathML">
223+
<apply>
224+
<divide/>
225+
<apply>
226+
<times/>
227+
<ci> E_tot </ci>
228+
<ci> kcat </ci>
229+
<ci> s0 </ci>
230+
</apply>
231+
<apply>
232+
<plus/>
233+
<ci> K_m </ci>
234+
<ci> s0 </ci>
235+
</apply>
236+
</apply>
237+
</math>
238+
</rateRule>
239+
</listOfRules>
240+
</model>
241+
</sbml>

tests/data/expected_omex_data.tsv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
time s0 s1 id
2+
0.0 0.0 10.0 m0
3+
1.0 1.0 9.0 m0
4+
2.0 2.0 8.0 m0
5+
3.0 3.0 7.0 m0
6+
4.0 4.0 6.0 m0
7+
5.0 5.0 5.0 m0
8+
6.0 6.0 4.0 m0
9+
7.0 7.0 3.0 m0
10+
8.0 8.0 2.0 m0
11+
9.0 9.0 1.0 m0
12+
10.0 10.0 0.0 m0
13+
0.0 0.0 10.0 m1
14+
1.0 1.0 9.0 m1
15+
2.0 2.0 8.0 m1
16+
3.0 3.0 7.0 m1
17+
4.0 4.0 6.0 m1
18+
5.0 5.0 5.0 m1
19+
6.0 6.0 4.0 m1
20+
7.0 7.0 3.0 m1
21+
8.0 8.0 2.0 m1
22+
9.0 9.0 1.0 m1
23+
10.0 10.0 0.0 m1

tests/data/test.omex

2.37 KB
Binary file not shown.

0 commit comments

Comments
 (0)