Giter VIP home page Giter VIP logo

fitting-notebooks's Introduction

Fitting ion channel models with Myokit & PINTS

This repository contains notebooks showing how to fit Myokit models to data using the PINTS optimisation & inference framework.

A part on fitting AP models is planned, but for now the repository contains:

  • A set of notebooks showing how to fit kinetic parameters of ion current models.

Requirements

The notebooks can be viewed online without any installation, either with GitHub's built-in viewer or with the nicer NBViewer.

To re-run the notebooks locally, use Python 3.5 or newer, and pip install -r requirements.txt.

General recommendations for fitting

Start with a synthetic data study: Before going to the lab, work out what data you expect to get, simulate this data and add noise, prepare your analysis code, and test that it can recover the parameters you used to generate the data.

Fit to time-series data: Whenever possible, fit to time-series data, not to "summary statistics" or "biomarkers" such as time constants, IV-, or (in)activation curves. Contacting experimenters, digging in archives, or even repeating experiments is a better use of time than trying to fit to data not suitable for fitting to.

Define expected ranges for the parameters: Define boundaries on the parameters (or on e.g. rates derived from the parameters). These can speed up your search, but are also used to prevent numerical problems and solver failures when certain parameters and functions of parameters get too large or small.

Verify the reliability of your results: by running repeated fits. Restart your fit several (50?) times from different positions sampled from within the feasible ranges of the parameters. If only a handful of fits find the same "best result", it's likely this isn't the true optimum.

Check your solver tolerances: if using an adaptive step-size solver, make sure you use strict tolerances. If you're not sure, plot the error measure along a line between two nearby points: if it's nice and smooth the optimiser will love it.

Search in a log-transformed parameter space: This can often make the problem much easier for whatever optimisation algorithm you're using.

Use the CMA-ES optimiser: It performs much better on these problems than anything else we've tested.

More information

Software

Papers

  • Calibration of ionic and cellular cardiac electrophysiology models. Dominic G. Whittaker, Michael Clerx, Chon Lok Lei, David J. Christini, Gary R. Mirams. 2020, WIREs Systems Biology and Medicine. doi:10.1002/wsbm.1482 | code

  • Four ways to fit an ion channel model. Michael Clerx, Kylie A. Beattie, David J. Gavaghan, Gary R. Mirams. 2019, Biophysical Journal. doi:10.1016/j.bpj.2019.08.001 | code

  • Rapid characterisation of hERG channel kinetics I: using an automated high-throughput system. Chon Lok Lei, Michael Clerx, David J. Gavaghan, Liudmila Polonchuk, Gary R. Mirams, Ken Wang. 2019, Biophysical Journal. doi:j.bpj.2019.07.029 | code

  • Rapid characterisation of hERG channel kinetics II: temperature dependence. Chon Lok Lei, Michael Clerx, Kylie A. Beattie, Dario Melgari, Jules C. Hancox, David J. Gavaghan, Liudmila Polonchuk, Ken Wang, Gary R. Mirams. 2019, Biophysical Journal. doi:j.bpj.2019.07.030 | code

  • Sinusoidal voltage protocols for rapid characterisation of ion channel kinetics Kylie A. Beattie, Adam P. Hill, Rémi Bardenet, Yi Cui, Jamie I. Vandenberg, David J. Gavaghan, Teun P. de Boer, Gary R. Mirams 2018, The Journal of Physiology. doi:10.1113/JP275733 | code

Advanced topics

  • Accounting for variability in ion current recordings using a mathematical model of artefacts in voltage-clamp experiments Chon Lok Lei, Michael Clerx, Dominic G. Whittaker, David J. Gavaghan, Teun P. de Boer, Gary R. Mirams doi:10.1098/rsta.2019.0348 | code

  • Considering discrepancy when calibrating a mechanistic electrophysiology model Chon Lok Lei, Sanmitra Ghosh, Dominic G. Whittaker, Yasser Aboelkassem, Kylie A. Beattie, Chris D. Cantwell, Tammo Delhaas, Charles Houston, Gustavo Montes Novaes, Alexander V. Panfilov, Pras Pathmanathan, Marina Riabiz, Rodrigo Weber dos Santos, John Walmsley, Keith Worden, Gary R. Mirams, Richard D. Wilkinson 2020, Phil. Trans. R. Soc. A. doi:10.1098/rsta.2019.0349 | code

fitting-notebooks's People

Contributors

chonlei avatar michaelclerx avatar mirams 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.