[BioC] rsbml: problem writing a model to file

hettling j.hettling at vu.nl
Fri Mar 16 17:16:46 CET 2012

Dear all,

I have some trouble with SBML export using the package 'rsbml'.
The following example of saving a very simple model to file gives an
error on my machine:

sp<-new("Species",id="s1",name="s1",compartment=com at id,initialConcentration=10)
rsbml_write(sbml_doc, file="myfile.xml")

The error occurs in creating the SBML object, the message is:
Error in validObject(.Object) : invalid class "SBML" object: FALSE

If the KineticLaw in the reaction is NULL, e.g.:


the SBML export works without throwing errors. Also, if I create a
document with SBML Level 2, version 1 instead of Level 2, version 2 in
the example above, the code runs without errors. However, then only the
SBML header is written to file and nothing else.

I went through the documentation and tried it with the example models as
well, but I cannot find a solution. I hope I understood right how to
create a document object from a model object.

I installed rsbml via the bioconductor and have libSBML version 4.0.1
(that's whats written in the generated SBML) on Linux with R 2.13.1.

Does anybody know what could be the problem here?

Many thanks in advance,

Hannes Hettling

More information about the Bioconductor mailing list