| Author | Topic |
Posts: 122
Registered: February 2010
|
|
Re: missing toSBML in math object
|
20 Sep '10 08:36
|
 |
|
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
|
|
|