Automatic Cell Tuner (act)
act provides tools for optimization-based parameter selection for biologically realistic cell models developed in NEURON. The project is inspired by the ASCT library.
act relies on a simulation-based optimization, i.e., for a pipeline
Parameters -> Black-box simulator -> Simulated data
it tries to obtain parameter estimates indirectly by working with simulated data.
Installation
Currently, act can be installed from GitHub using pip or locally with the standard pip installation process.
pip install act-neuron
git clone https://github.com/V-Marco/ACT.git
cd ACT
pip install .
Usage
Prerequisites
Conceptually, act requires three components.
- A
.hocfile which declares the cell's properties. - Modfiles for this
.hocfile. - Target voltage data of shape (num_cur_inj, ...) to predict on OR parameters to simulate target data with.
Pipeline
act operates in original and segregated modes. Original mode runs in the following steps:
- Generate a parameter set uniformly randomly from a (lower; upper) interval for each current injection.
- Simulate a voltage trace for each current injection and respective parameter set.
- Extract key summary features (e.g., inter-spike time), and keep parameter sets for those voltage traces which match the target voltage trace in these summary features.
- Repeat steps 1-3 until the specified number of current injections is matched.
- Train a neural network model to predict conductance values from a voltage trace using saved sets as targets.
- Predict conductance values by applying the trained model to the target voltage data. Take the maximum of each predicted value across all current injections.
Segregated mode changes step 5 so that the model is trained on regions of a voltage trace. The regions can be specified in terms of time (X-axis) or voltage (Y-axis) bounds.
Setting up a simulation
Simulations' parameters are defined as python classes in simulation/simulation_constants.py.
- Names of parameters to optimize for are defined in the
paramsproperty. The names must match the hoc file. Lower and upper bounds are specified inlowsandhighsproperties. - Segregated parameters and respective time/voltage bounds are specified as lists-of-lists in the respective
segr_...properties.
Running a simulation
simulation/run_simulation.py is an example script of running act on Pospichil's cells.
simulation/analyze_res.py is an example script which gives a summary of the model's quality.
Examples (Jupyter Notebook)
examples/Pospischil_sPYr/main.ipynb example of running act on Pospichil's cells
On Google Colab:
Metadata
Release files for act-neuron 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| act_neuron-0.1.9.tar.gz | 25.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| act_neuron-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.0 MB
Release files / act_neuron-0.1.9.tar.gz
| Download URL | act_neuron-0.1.9.tar.gz |
|---|---|
| Size | 25.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
791b6c53fb71a10aa909ac8f9f6aecfd0a5ee4c079b802523d346104ab814448
|
|
BLAKE2b-256 checksum How to use checksums |
45371ac6b83c67fa1e8ac0b85cdc3161a5152d0589a3f2cfcf27a515158e2f18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / act_neuron-0.1.9-py3-none-any.whl
| Download URL | act_neuron-0.1.9-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea3d573e8e8a934d5c50479c06520af8b505a86db5e3b8e91e862bf14f251bf0
|
|
BLAKE2b-256 checksum How to use checksums |
b59e1fc7ac6ccda67a2c7c5102ac874539c17c4fef217d736d5019a9dc714458
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for act-neuron 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.