Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » libsbml-development » missing toSBML in math object
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
fbergman


Posts: 122
Registered:
February 2010
Re: missing toSBML in math object 20 Sep '10 08:36 Go to previous message


On Sep 20, 2010, at 8:17 AM, Falko Krause wrote:

> I want to get the mathML code of math objects, however the toSBML function
> is missing in math objects. Would be nice to have it.
>
> In [1]: import libsbml
>
> In [2]: doc = libsbml.readSBML('./BIOMD0000000232.xml')
>
> In [3]: model = doc.getModel()
>
> In [4]: r = list(model.getListOfReactions())[0]
>
> In [5]: klaw = r.getKineticLaw()
>
> In [6]: math = klaw.getMath()
>
> In [7]: math.to<tab>
> :(
>
>

I can only speculate, that the math element would not have a 'toSBML' function, as it is not SBML as such but rather MathML. Nevertheless the functionality you seek is available via methods on the libsbml object, you could try:

libsbml.writeMathMLToString(math)

in the above, that should yield the result you want,

best
Frank

>
> --
> ************************************************
> * Falko Krause
> * Humboldt-Universität zu Berlin
> * Theoretical Biophysics Group
> * falko.krause@staff.hu-berlin.de
> * +49 30 2093 8592
> * skype: siphone
> ************************************************
> ____________________________________________________________
> To manage your libsbml-development list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/libsbml-development
>
> For a web interface to the libsbml-development mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the libsbml-development list,
> contact sbml-team@caltech.edu
>

____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   missing toSBML in math object Falko Krause20 Sep '10 08:17
Read Message   Re: missing toSBML in math object  fbergman20 Sep '10 08:36
Previous Topic:Release of libSBML-4.2.0
Next Topic:Changes in libSBML SVN
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.