Hello,
I'm trying to read an SBML file using rsbml and read the values of the nested tags. Below is the code I executed.
library(rsbml)
sFile = rsbml_read("Sample.xml")
But I get the below error.
Error: The units of the 'math' formula in a <kineticLaw> definition are expected to be the equivalent of _substance per time_. Expected units are mole (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 1, scale = 0) but the units returned by the <kineticLaw>'s <math> expression are mole (exponent = 1, multiplier = 1, scale = -3), gram (exponent = -1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 0.000277778, scale = 0).
I think the units have been defined correctly. Here is the section of the file which defines the unit.
<listOfUnitDefinitions>
<unitDefinition id="mmol_per_gDW_per_hr">
<listOfUnits>
<unit kind="mole" scale="-3"/>
<unit kind="gram" exponent="-1"/>
<unit kind="second" exponent="-1" multiplier="0.000277777777777778"/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>
Can someone please explain why this is giving an error? I tried using the SBMLR package and readSBMLM("Sample.xml") works fine. But I can only access certain nested tags and their attributes. I can't access all and that is why I would like to try rsbml.
Any help regarding this issue is appreciated. Thanks!
P.S sessioninfo() output
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] rsbml_2.24.1 BiocGenerics_0.12.1 SBMLR_1.62.0
[4] deSolve_1.11 XML_3.98-1.2
loaded via a namespace (and not attached):
[1] graph_1.44.1 stats4_3.1.3 tools_3.1.3