Unable to read SBML file in rsbml
Entering edit mode
srinadee • 0
Last seen 6.4 years ago


I'm trying to read an SBML file using  rsbml and read the values of the nested tags. Below is the code I executed.

    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.

      <unitDefinition id="mmol_per_gDW_per_hr">
          <unit kind="mole" scale="-3"/>
          <unit kind="gram" exponent="-1"/>
          <unit kind="second" exponent="-1" multiplier="0.000277777777777778"/>

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

[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


sbml rsbml • 880 views
Entering edit mode
Last seen 7 weeks ago
United States

As the error message says, the kinetic law units are supposed to be mol/t, but yours are clearly mol/(g*t). So it's not valid SBML. Despite writing rsbml (many moons ago), I am not an expert in SBML, far from it. But maybe you want to define a new unit that is mol/g, and then use that unit over time, so that it is like: (mol/g)/t. I know that those are mathematically equivalent, but it might make libsbml happy (rsbml does not implement these checks).


Login before adding your answer.

Traffic: 269 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6