Menu

sbml import / conversion

DarthSteve
2011-01-07
2013-03-26
  • DarthSteve

    DarthSteve - 2011-01-07

    Hello,

    I'm very new to python.

    Would it be possible to provide a code example of how to import an sbml file into pysces?

    thanks for any assistance.

     
  • Brett Olivier

    Brett Olivier - 2011-01-10

    Hi

    First of all you need libSBML (including the Python bindings/interfaces) installed (see sbml.org for more information)
    Next you can use the following command to convert an SBML file into PySCeS MDL format:

        pysces.interface.convertSBML2PSC(sbmlfile, sbmldir=None, pscfile=None, pscdir=None)

    where sbmlfile is the filename. If no psc directories are defined then the converted file <sbmlfile>.psc can be found in your PySCeS model directory. Here you can have a look at it and see if it looks ok.
    Finally, you can load the model using the normal model instantiation:

        mod = pysces.model("<sbmlfile>.psc")

    HTH, Brett

     
  • DarthSteve

    DarthSteve - 2011-01-11

    thanks for the reply, I've got it working :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.