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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
thanks for the reply, I've got it working :)