libSBML method to automatically add modifiers to a model

16 views
Skip to first unread message

Herbert M Sauro

unread,
Oct 30, 2018, 4:45:44 PM10/30/18
to libsbml-development
Is there a method in libSBML that can be used to automatically add a missing modifiers section to an SBML model? There was one on SBW which was sometimes quite useful.

Herbert Sauro

Herbert M Sauro

unread,
Oct 30, 2018, 4:59:29 PM10/30/18
to libsbml-d...@googlegroups.com
I spoke too soon, I found one C code that Frank had written to do this.

Herbert

On Tue, Oct 30, 2018 at 1:52 PM Herbert M Sauro <hsa...@uw.edu> wrote:
Is there a method in libSBML that can be used to automatically add a missing modifiers section to an SBML model? There was one on SBW which was sometimes quite useful.

Herbert Sauro

--
You received this message because you are subscribed to the Google Groups "libsbml-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libsbml-develop...@googlegroups.com.
To post to this group, send email to libsbml-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libsbml-development/40f4dc93-c1f8-4e31-a05c-800cd58259d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Herbert Sauro, Associate Professor
University of Washington, Bioengineering

Frank T. Bergmann

unread,
Oct 30, 2018, 5:06:27 PM10/30/18
to libsbml-d...@googlegroups.com, hsa...@uw.edu

To answer your initial question, no there is no inbuilt method of libsbml that would do it for you. However, since this has come up several time (I do recall reimplementing that method again several times), we could easily provide a converter in libsbml to do that.

 

I’ll contribute the bit of code before the next release. After that it would work like so:

 

doc = readSBML(infile)

props = ConversionProperties()

props.addOption("add missing modifiers", True)

doc.convert(props)

 

Cheers

Frank

 

Lucian Smith

unread,
Oct 30, 2018, 5:06:51 PM10/30/18
to libsbml-d...@googlegroups.com
I believe there is not, and agree that it would be useful; I rolled my own in Antimony.  We could add it as a feature request--would it work to encode it as a translator, or were you looking for a function on the 'Reaction' class?

-Lucian

On Tue, Oct 30, 2018 at 1:45 PM Herbert M Sauro <hsa...@uw.edu> wrote:
Is there a method in libSBML that can be used to automatically add a missing modifiers section to an SBML model? There was one on SBW which was sometimes quite useful.

Herbert Sauro

--

Herbert M Sauro

unread,
Oct 30, 2018, 5:31:29 PM10/30/18
to libsbml-d...@googlegroups.com
Thanks very much Frank.

By the way, I thought there were precompiled Visual studio binaries for libsbml. Eg I 'm trying to compile some code in VS 13 and it complains that the libsbml-static I have was compiled with VS 2010.

I thought there might be ready-made binaries somewhere for visual studio, would save me having to compile for VS 13 myself.

Herbert




For more options, visit https://groups.google.com/d/optout.

Frank T. Bergmann

unread,
Oct 30, 2018, 5:39:55 PM10/30/18
to libsbml-d...@googlegroups.com, hsa...@uw.edu

About the static library, I believe we should just stop distributing it altogether. It is only useful for the visual studio version it was compiled with. And as such is not useful to many people. For personal use I always use the dependency libraries we provide:

 

https://sourceforge.net/projects/sbml/files/libsbml/win-dependencies/

 

and then compile libsbml with the options that I need (the IMO correct xml parser that ought to be used + the combination of packages that I deem necessary + safe to use). As it stands the sbml-team cannot provide all the different configuration options that might apply to all.

 

For the time being compiling the right flavor of libsbml for c++ is the expected use of the library. For python on the other hand you should be fine with selecting either python-libsbml or python-libsbml-experimental from pypi.

 

Best

Frank

 

Herbert M Sauro

unread,
Oct 30, 2018, 5:49:26 PM10/30/18
to frank.thom...@gmail.com, libsbml-d...@googlegroups.com
ok, I'll look again to reconfigure VS.

Herbert
Reply all
Reply to author
Forward
0 new messages