Bayesian Modeling of Time Series Data (BayModTS) is a FAIR Bayesian modeling workflow of time series data.
BayModTS can classify outliers based on an uncertainty prediction of the dynamics of a system. Further, conditions can be distinguished based on the underyling uncertainty with a user-specified credibility level.
To install the necessary packages you can use the BayModTS_requirements.txt file with conda.
conda create --name baymodts --file BayModTS_requirements.txt
Please make sure to have the following C++ Libraries installed for the use of amici:
swig libblas-dev libatlas-base-dev libhdf5-dev
The workflow is based on the PEtab format for parameter estimation Schmiester et al. (2021). Steps to adapt the workflow to your data:
- If you want to use a user-specific dynamic, change the name of the SBML file in the PEtab yaml file to your model (This step can be ignored when using the preimplemented RTD dynamic)
- Include your data in the PEtab measurement file and adapt the experimental conditions file accordingly. A detailed description on how to write PEtab files can be found on the PEtab docs webpage.
- Adjust the BayModTS python workflow skript with your condition names and the name of your PEtab problem
- Select a suitable optimizer to get a good starting value for the MCMC sampling. For optimization and MCMC sampling the Pypesto toolbox is used for python. For R dMod can be used and for Matlab MEIGO or D2D can be used.
- Select your MCMC sampler (Adaptive Metropolis-Hastings is most of the time a good first try) and choose the sample size you want to estimate.
- Run the skript.
- Look at the evaluation -> The Ensembles allow a credible assessment of your dynamics
The "How_to_apply_BayModTS.py" script walks you through the steps above for an example dataset. Steps to adjust the Workflow to your data are described in the script.
- if you have measured serial data (time-series) and want to compare the underlying dynamics of different conditions
- of course it is also possible to look at only one condition and make credible statements about the underlying dynamics
- for any serial datasets, especially time-series
- your data should include repeated measurements or enough different time points for an accurate calculation of the uncertainty
- especially if your data contains large variablility/heterogeneity
- The base workflow is designed for a Retarded Transient Dynamics (RTD) Kreutz C (2020) but can be used for any ODE-System that is supported by SBML.
For more information on BayModTS, please have a look at the upcoming publication XXX.