[BioC] rsbml: problem writing a model to file
j.hettling at vu.nl
Thu Mar 22 19:28:18 CET 2012
I found another small problem with writing my model to file:
Whenever there are any parentheses in the math expression in a
KineticLaw, the <kineticLaw/> tag in the written SBML file is empty.
Even for a very simple reaction like:
I checked my document object within the "rsbml_write" and "rsbml_xml"
functions and the math expression is correct there. I wrote a small C
program to try if the writeSBML function in libsbml can even handle
parentheses, and it does. In the io.c file, the generic libSBML
functions are called..
Therefore I suspect that something goes wrong in in creating the
SBMLDocument c-object (in the doc.c file?)... do you think this is a god
place to look?
I do not want to bug you with requests all the time, and I will look
further into it, it would be great if you could tell me if I am
searching in the right place. After all I do not have experience with
the R-to-C interface and find it quite hard to dubug.
On Thu, 2012-03-22 at 07:06 -0700, Michael Lawrence wrote:
> On Wed, Mar 21, 2012 at 11:11 AM, hettling <j.hettling at vu.nl> wrote:
> Dear Michael,
> Thanks a lot for your help! I got it to work with the
> version of the package and libsbml 5.
> The package does not compile anymore with libsbml 4; I guess
> the package
> uses the development version of SOSlib, which says it only
> works with
> libsbml 3.0.2 or the latest devel version, so it might be good
> to change
> the package requirements.
> I also had to downgrade sundials from 2.4.0 to 2.3.0 because
> of SOSlib.
> Well, SOSlib is basically a dead library, and the package should still
> compile, even if SOSlib fails to build. Of course, simulation support
> would not be available.
> Another thing is that the package gave an error creating an
> document because it could not find the function
> so I changed line 5 in SBML.R and set the variable "valid" to
> which is a bit of a hack, but it works for now. Is this a
> check for the
> validity of the SBML document and is this check done with
> I have fixed this. Not sure how that crept in.
> Many thanks,
> On Tue, 2012-03-20 at 18:03 -0700, Michael Lawrence wrote:
> > Well, it took a bit longer than I expected, but I have
> things now
> > working under libsbml 5.x. Should still work under 4.x
> (please let me
> > know).
> > I have also fixed the validity checking that was causing
> your problem.
> > You'll need the devel (2.13.1) or wait for the release next
> > Thanks,
> > Michael
> > On Fri, Mar 16, 2012 at 10:27 AM, Michael Lawrence
> <michafla at gene.com>
> > wrote:
> > Thanks for the report, I will look into this. rsbml
> > has a number of issues (it doesn't even compile for
> me right
> > now). I need to look into it this weekend.
> > Michael
> > On Fri, Mar 16, 2012 at 9:16 AM, hettling
> <j.hettling at vu.nl>
> > wrote:
> > 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:
> > require('rsbml')
> 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,
> > 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
> > However, then only the
> > SBML header is written to file and nothing
> > 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
> > I installed rsbml via the bioconductor and
> > 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
> > Many thanks in advance,
> > Hannes Hettling
> > Bioconductor mailing list
> > Bioconductor at r-project.org
> > Search the archives:
More information about the Bioconductor