Git Product home page Git Product logo

cardiomyocyte_emulator's Introduction

Cardiomyocyte emulator

CI Tests Demos

This repository demonstrates the pretrained emulator of the paper Neural network emulation of the human ventricular cardiomyocyte action potential: a tool for more efficient computation in pharmacological studies, which can be found following the link: https://www.biorxiv.org/content/10.1101/2023.08.16.553497.

Installation

The repository provides a python package that can be installed using setuptools. Note that you need a valid python environment that can run the dependencies (pytorch among others). A possible way to ensure this is by using a python environments, such as venv or conda.

The installation itself can then by simple achieved by cloning the repo and installing it through

pip install .

Usage example

import numpy as np
import matplotlib.pyplot as plt
from cardiomyocyte_emulator import load_default_emulator_model
emulator = load_default_emulator_model(device="cpu") #Load the pretrained emulator on the CPU
max_conds_default = emulator.max_conds_center #Use the default maximum conductances
t = np.linspace(-10, 500, num=200) #Create a time range which we will emulate
ap_emu = emulator.forward_latent_np(t, max_conds_default) #Emulation

plt.figure()
plt.plot(t, ap_emu[0])
plt.ylabel("$V_m(t)$ [mV]")
plt.xlabel("$t$ [ms]")
plt.show()

Demos

Additional demos are provided in the demos directory for more use cases. To run the demos, additional packages might be required, which can be installed through the command

pip install .[demos]

The demos are provided as jupyter-notebooks

License

The package uses the open-source AGPL license.

Citation

If you use the software for scientific projects, please cite our associated publication

@misc{grandits_neural_2023,
	title = {Neural network emulation of the human ventricular cardiomyocyte action potential: a tool for more efficient computation in pharmacological studies},
	shorttitle = {Neural network emulation of the human ventricular cardiomyocyte action potential},
	url = {https://www.biorxiv.org/content/10.1101/2023.08.16.553497},
	doi = {10.1101/2023.08.16.553497},
	language = {en},
	urldate = {2023-08-18},
	publisher = {bioRxiv},
	author = {Grandits, Thomas and Augustin, Christoph M. and Haase, Gundolf and Jost, Norbert and Mirams, Gary R. and Niederer, Steven A. and Plank, Gernot and Varro, Andras and Virag, Laszlo and Jung, Alexander},
	month = aug,
	year = {2023}
}

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.