paulflang / SbmlInterface.jl

Interface between the Systems Biology Markup Language and Julia
https://paulflang.github.io/SbmlInterface.jl/dev/
MIT License
5 stars 2 forks source link
differential-equations julia modelling ode ordinary-differential-equations sbml sbml-model systems-biology

SbmlInterface

Dev Build Status Coverage

:warning: SbmlInterface will soon be deprecated. Please use SBMLToolkit.jl for dynamic SBML models.

SbmlInterface.jl is a lightweight tool to import models specified in the Systems Biology Markup Language (SBML) into Julia. More specifically, SbmlInterface.jl uses the Python libsbml library to extract ordinary differential equations, initial conditions and parameter values from SBML files. Events and constraints and several other SBML components are not yet supported. There are several ways to specify the same model in SBML and SbmlInterface. Please help us improving SbmlInterface.jl by creating a GitHub issue if you experience errors when converting your SBML model to Julia.

Installation

SbmlInterface.jl is not yet available on the Julia package managing system. To install SbmlInterface please first clone this repository:

  $ git clone https://github.com/paulflang/SbmlInterface.jl.git

As SbmlInterface.jl relies on the Python libsbml library, please make sure your version of Julia can communicate with a Python environment were libsbml is installed. Please follow the PyCall installation instructions or:

Tutorial

SBML models can be simulated with the following steps:

    using SbmlInterface

    model = getmodel("mymodel.sbml")
    p = getparameters(model)
    u0 = getinitialconditions(model)
    rxs = getreactions(model)
    rs  = ReactionSystem(rxs, t, [item.first for item in u0], [item.first for item in p])
    odesys = convert(ODESystem, rs)
    prob = ODEProblem(odesys,u0,(0.0,10.0),p)
    sol = solve(prob,Tsit5())

If you want to create an ODESystem, ODEProblem or solution Array directly from an SBML file use sbml2odesystem("mymodel.sbml"), sbml2odeproblem("mymodel.sbml",(tstart,tend)) and simulatesbml("mymodel.sbml",(tstart,tend)), respectively.

License

The package is released under the MIT license.

Development team

This package was developed by Paul F. Lang at the University of Oxford, UK and Anand Jain at the University of Chicago, USA.

Questions and comments

Please contact Paul F. Lang or Anand Jain with any questions or comments.