Python code relating to the textbook, Stochastic modelling for systems biology, third edition
Project description
smfsb for python
Python library for the book, Stochastic modelling for systems biology, third edition. This library is a Python port of the R package associated with the book.
Install
Latest stable version:
pip install smfsb
To upgrade already installed package:
pip install --upgrade smfsb
Note that a number of breaking syntax changes (more pythonic names) were introduced in version 1.1.0. If you upgrade to a version >= 1.1.0 from a version prior to 1.1.0 you will have to update syntax to the new style.
You can test your installation by typing
import smfsb
at a python prompt. If it returns silently, then it is probably installed correctly.
Documentation
Note that the book, and its associated github repo is the main source of documentation for this library. The code in the book is in R, but the code in this library is supposed to mirror the R code, but in Python.
For an introduction to this library, see the python-smfsb tutorial.
Further information
For further information, see the demo directory and the API documentation. Within the demos directory, see sbmlsh-demo.py for an example of how to specify a (SEIR epidemic) model using SBML-shorthand and step_cle_2df.py for a 2-d reaction-diffusion simulation. For parameter inference (from time course data), see abc-cal.py for ABC inference, abc_smc.py for ABC-SMC inference and pmmh.py for particle marginal Metropolis-Hastings MCMC-based inference. There are many other demos besides these.
You can see this package on PyPI or GitHub.
Fast simulation and inference
If you like this library but find it a little slow, you should know that there is a JAX port of this package: jax-smfsb. It requires a JAX installalation, and the API is (very) slightly modified, but it has state-of-the-art performance for simulation and inference.
Copyright (2023-2024) Darren J Wilkinson
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smfsb-1.1.3.tar.gz
.
File metadata
- Download URL: smfsb-1.1.3.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef54a0981d46cf95d5c38189114e21e3ae50b62fd99ecc2f13534590ec9df5a |
|
MD5 | 517b981590163e7b58f77e04e4b8b62b |
|
BLAKE2b-256 | 61121a73f432077128357cd4276d6ebebf62991ca85220d3137de6cdb1001fd7 |
File details
Details for the file smfsb-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: smfsb-1.1.3-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd586710204308b5da378282c1bca1489b12c0955a05345b6acdad3aa47342c2 |
|
MD5 | 9aff5bba3a0fb9ce5c481666973a7e6e |
|
BLAKE2b-256 | 5600c39b5012dfc9027b41eae7f9097fe7d5f225fad879a7335b779507d96af6 |