Source code associated with an article in Frontiers in Physiology by Chon Lok Lei and Gary R. Mirams.
From left to right shows the original Hodgkin-Huxley model (candidate model), the activation modelled using a neural network (NN-f), the activation with a neural network discrepancy term (NN-d), and the activation modelled with a three-state model (ground truth used in synthetic data studies with discrepancy).
To run the code within this repository requires Python 3.5+ with the following dependencies
which can be installed via
$ pip install -r requirements.txt
The following codes re-run the training for the models.
- NN-f:
train-s1.py - NN-d:
train-s2.py
- Candidate model:
train-d0.py - NN-f:
train-d1.py - NN-d:
train-d2.py
- NN-f:
train-r1.py - NN-d:
train-r2.py
Their trained results are stored in directories s1, s2, d1, etc.
To re-run and create the main figures and tables, use:
- Figure 2:
figure-1.py - Figure 3:
figure-2.py - Figure 4:
figure-3.py - Figure 5:
figure-4.py - Figure 6:
figure-5.py - Figure 7:
figure-6.py - Figure 8:
figure-7.py - Table 1:
table-1.py - Table 2:
table-2.py.
These generate figures in directories figure-1, figure-2, etc.
To re-run and create the supplementary figures and tables, use:
- Figure S2:
figure-0-s.py - Figure S3:
figure-2-s.py - Figure S4:
figure-3-s.py - Figure S5:
figure-4-s.py - Figure S6:
figure-1-s2.py - Figure S7:
figure-1-s1.py - Table S1:
table-s1.py.
These generate figures in directories figure-2-s, figure-3-s, etc.
data: Contains the experimental data from Beattie et al. 2018.model-structure: Contains Markov diagrams/schematics for the models.test-protocols: Contains time series files for various voltage-clamp protocols from Beattie et al. 2018 and Lei et al. 2019a & b.
If you publish any work based on the contents of this repository please cite (CITATION file):
Lei, C. L. and Mirams, G. R. (2021). Neural network differential equations for ion channel modelling. Frontiers in Physiology, 12, 1166. doi:10.3389/fphys.2021.708944.