Skip to main content

Automatic Cell Tuner

Project description

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.

  1. A .hoc file which declares the cell's properties.
  2. Modfiles for this .hoc file.
  3. 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:

  1. Generate a parameter set uniformly randomly from a (lower; upper) interval for each current injection.
  2. Simulate a voltage trace for each current injection and respective parameter set.
  3. 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.
  4. Repeat steps 1-3 until the specified number of current injections is matched.
  5. Train a neural network model to predict conductance values from a voltage trace using saved sets as targets.
  6. 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 params property. The names must match the hoc file. Lower and upper bounds are specified in lows and highs properties.
  • 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

act_neuron-0.1.9.tar.gz (25.0 MB view details)

Uploaded Source

Built Distribution

act_neuron-0.1.9-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file act_neuron-0.1.9.tar.gz.

File metadata

  • Download URL: act_neuron-0.1.9.tar.gz
  • Upload date:
  • Size: 25.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for act_neuron-0.1.9.tar.gz
Algorithm Hash digest
SHA256 791b6c53fb71a10aa909ac8f9f6aecfd0a5ee4c079b802523d346104ab814448
MD5 6314439924856c3b270cd1c09132ecd8
BLAKE2b-256 45371ac6b83c67fa1e8ac0b85cdc3161a5152d0589a3f2cfcf27a515158e2f18

See more details on using hashes here.

File details

Details for the file act_neuron-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: act_neuron-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for act_neuron-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ea3d573e8e8a934d5c50479c06520af8b505a86db5e3b8e91e862bf14f251bf0
MD5 223cbec8f1ed59475abaf6eb5a17a99a
BLAKE2b-256 b59e1fc7ac6ccda67a2c7c5102ac874539c17c4fef217d736d5019a9dc714458

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page