This package contains cell models and the ability to apply various protocols to them.
Project description
Cell Models Package
This package is meant to contain all Christini Lab models that are implemented in Python. As of writing this, there are 3 models: O'Hara Rudy, Paci, and Kernik.
Using and Installing this Project
This Python project is written in Python Packaging format. If you want to play around with the models quickly, you can cd into cell-models/ and edit the main.py file.
If you want to install these models locally, you can run python3 setup.py from the project root. This will make the files in cell-models/ globally available.
Tutorial
Much of the code below can be found in cell-models/main.py.
Instantiate and generate a response from models
The following will plot spontaneous Kernik and Paci models and a paced O'Hara Rudy model.
# Spontaneous / Stimulated
KERNIK_PROTOCOL = protocols.SpontaneousProtocol(2000)
kernik_baseline = KernikModel()
tr_b = kernik_baseline.generate_response(KERNIK_PROTOCOL)
plt.plot(tr_b.t, tr_b.y)
plt.show()
PACI_PROTOCOL = protocols.SpontaneousProtocol(2)
paci_baseline = PaciModel()
tr_bp = paci_baseline.generate_response(PACI_PROTOCOL)
plt.plot(tr_bp.t, tr_bp.y)
plt.show()
OHARA_RUDY = protocols.PacedProtocol(model_name="OR")
or_baseline = OharaRudyModel()
tr = or_baseline.generate_response(OHARA_RUDY)
plt.plot(tr.t, tr.y)
plt.show()
Update parameters for a model
The code below will plot the baseline Kernik model and an example model with new parameter values.
KERNIK_PROTOCOL = protocols.SpontaneousProtocol(2000)
kernik_baseline = KernikModel()
kernik_updated = KernikModel(
updated_parameters={'G_K1': 1.2, 'G_Kr': 0.8, 'G_Na':2.2})
tr_baseline = kernik_baseline.generate_response(KERNIK_PROTOCOL)
tr_updated = kernik_updated.generate_response(KERNIK_PROTOCOL)
plt.plot(tr_baseline.t, tr_baseline.y, label="Baseline")
plt.plot(tr_updated.t, tr_updated.y, label="Updated")
plt.legend()
plt.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cell_models-0.0.1.tar.gz.
File metadata
- Download URL: cell_models-0.0.1.tar.gz
- Upload date:
- Size: 4.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d4761ad7f396e54f75ca1252be48d79f8af09f8322de4f7b8839e51289e2ea
|
|
| MD5 |
bf123bb40980bab810031fce82788286
|
|
| BLAKE2b-256 |
606029298274523d09ba3b104765f297e2f8a936dd8ad505c3935aa3b2673e9f
|
File details
Details for the file cell_models-0.0.1-py3.7.egg.
File metadata
- Download URL: cell_models-0.0.1-py3.7.egg
- Upload date:
- Size: 4.1 MB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8eff1d18851623af72dcc35422cc9baf53dc365da90d58aa4d537f011702343
|
|
| MD5 |
9dc92de8f6d990a26d6b99af13688879
|
|
| BLAKE2b-256 |
347bd1ccb52ef46d834e95fbb947dcf3c4efb385683c612554723a34db791f61
|
File details
Details for the file cell_models-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cell_models-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
448ea828783fa6e3656883bd1097a3437e45412e765b6e288f23b86baca2a373
|
|
| MD5 |
f3aaab404f331f257b10fdc3835fc2ba
|
|
| BLAKE2b-256 |
da538fe390c6ff9692c91376c9ce508e8c4fa53e6696267293e231ff2823f6ea
|