About this model
*****************

:Original publication: `Kernik et al. (2019)`_:
  "A computational model of induced pluripotent stem-cell derived cardiomyocytes 
  incorporating experimental variability from multiple data sources" J  Physiol. 2019 Sep 1; 597(17): 4533-4564.

:DOI: https://dx.doi.org/10.1113%2FJP277724


Model status
**************

The current CellML model implementation runs in OpenCOR_.


Model overview
*****************
This workspace holds CellML_ and Python encoding of the `Kernik et al. (2019)`_
model. The original model developed a whole cell model of
induced pluripotent stem cell-derived cardiomyocytes (iPSC-CMs)
composed of simple model components comprising ion channel models. The models were parameterized to fit experimental
iPSC-CM data from multiple laboratories for all major ionic currents. 

.. figure::  figures/schematic-diagram.jpg
   :width: 85%
   :align: center
   :alt: Schematics of the model

   A diagrammatic representation of the `Kernik et al. (2019)`_ model. (Image from Fig 1 in the original paper)



Modular description
********************


CellML enables the user to divide a model into distinct modules, which can be imported as needed. 
The key CellML files of this work are:

- Main file: Channels 
- Individual channel file: contain the formulation for calculating each channel's current 
- Channel gating formulation files, if applicable 
- General parameter file, containing all parameter values used in this model
- Channel-specific parameter file, if present 
- Units definition file: unit 


For each individual channel, Python is run to recreate the conditions outlined in `Kernik et al. (2019)`_, in order to reproduce the paper's figures. The file loads the SED-ML file and provides the simulation results. and plots the figure.


1. :math:`I_Na` : `Sodium current model <Current_Ina.cellml/view>`_

2. :math:`I_CaL` : `Calcium current model <Current_Ica.cellml/view>`_

3. :math:`I_Kr` : `Rapid delayed rectifier potassium current model <Current_Ikr.cellml/view>`_  

4. :math:`I_to` : `Transient outward potassium current model <Current_Ito.cellml/view>`_ 

5. :math:`I_Ks` : `Slow delayed rectifier potassium current model <Current_Iks.cellml/view>`_ 

6. :math:`I_f` : `Pacemaker/funny current model <Current_If.cellml/view>`_ 

7. :math:`I_{K1}` : `Inward rectifier potassium current model <Current_Ik1.cellml/view>`_

8. Calcium Analysis :  `Calcium handling in the iPSC-CM baseline model <figures/Figure10_Ca.png/view>`_

9. Whole cell model: `Whole cell model which includes all currents in order to generate action potentials <figures/Figure11_wholecell.png/view>`_


Simulation settings
*********************

The simulation settings are saved in SED-ML files, which are run through Python. 
We use this method to capture the results for different initial conditions and inputs, corresponding to `Kernik et al. (2019)`_.
Each Python script under the Navigation menu reproduces the specified figure from `Kernik et al. (2019)`_. 

The name of each scripts corresponds to the Figure number in the Kernik paper.

In order to run the scripts,
execute the following script from the command line:

``$ cd [PathToThisFile]``

``$ [PathToOpenCOR]/pythonshell fig2.py``

This action requires all files to be located within the same folder.


Model Origin
*******************
The original model of **induced pluripotent stem-cell derived cardiomyocytes incorporating
experimental variability from multiple data sources** was built in MATLAB and is available here_.

.. _CellML: https://www.cellml.org/
.. _OpenCOR: https://opencor.ws/
.. _here: https://github.com/ClancyLabUCD/IPSC-model/
.. _`Kernik et al. (2019)`: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6767694/

