GithubHelp home page GithubHelp logo

mingtaoli / sbmltoolkit.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sciml/sbmltoolkit.jl

0.0 0.0 0.0 1.77 MB

SBML differential equation and chemical reaction model (Gillespie simulations) for Julia's SciML ModelingToolkit

Home Page: https://docs.sciml.ai/SBMLToolkit/stable/

License: MIT License

Julia 79.26% TeX 20.74%

sbmltoolkit.jl's Introduction

SBMLToolkit

Join the chat at https://julialang.zulipchat.com #sciml-bridged Global Docs

codecov Build Status

ColPrac: Contributor's Guide on Collaborative Practices for Community Packages SciML Code Style

SBMLToolkit.jl is a lightweight tool to import models specified in the Systems Biology Markup Language (SBML) into the Julia SciML ecosystem. There are multiple ways to specify the same model in SBML. Please help us improving SBMLToolkit.jl by creating a GitHub issue if you experience errors when converting your SBML model.

SBMLToolkit uses the SBML.jl wrapper of the libSBML library to lower dynamical SBML models into dynamical systems. If you would like to import BioNetGen models use the writeSBML() export function or import the .net file with ReactionNetworkImporters.jl. For constrained-based modeling, please have a look at COBREXA.jl.

Installation

To install SBMLToolkit.jl, use the Julia package manager:

using Pkg
Pkg.add("SBMLToolkit")

Tutorial

SBML models can be simulated with the following steps (note that sol is in absolute quantities rather than concentrations):

using SBMLToolkit, ModelingToolkit, OrdinaryDiffEq

SBMLToolkit.checksupport_file("my_model.xml")
mdl = readSBML("my_model.xml", doc -> begin
    set_level_and_version(3, 2)(doc)
    convert_promotelocals_expandfuns(doc)
end)

rs = ReactionSystem(mdl)  # If you want to create a reaction system
odesys = convert(ODESystem, rs)  # Alternatively: ODESystem(mdl)

tspan = (0.0, 1.0)
prob = ODEProblem(odesys, [], tspan, [])
sol = solve(prob, Tsit5())

Alternatively, SBMLToolkit also provides more concise methods to import SBML.Models, Catalyst.ReactionSystems, and ModelingToolkit.ODESystems.

mdl = readSBML(sbmlfile, DefaultImporter())
rs = readSBML(sbmlfile, ReactionSystemImporter())
odesys = readSBML(sbmlfile, ODESystemImporter())

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 use GitHub issues, the #sciml-sysbio channel in the Julia Slack workspace or email Paul F. Lang with any questions or comments.

sbmltoolkit.jl's People

Contributors

paulflang avatar anandijain avatar chrisrackauckas avatar arnostrouwen avatar dependabot[bot] avatar xlxs4 avatar github-actions[bot] avatar devmotion avatar ranocha avatar isaacsas avatar sebastianm-c avatar ven-k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.