Cleo paper virtual experiment 3
evoking sharp wave-ripples with optogenetics
This project takes the hippocampus model developed by Aussel et al. (2018, 2022, code), wraps it with Cleo, and evokes SWRs with optogenetics rather than the original external current meant to model slow-wave sleep rhythms.
Clone the repo, then use mamba (or conda if you must 😁):
mamba env create -f environment.yml
mamba activate hipp2
This creates an environment called hipp2
—so called because the original simulation provided an environment called hipp
.
If you have problems installing from the environment.yml
file, try this instead:
mamba create -n hipp2 python=3.9
mamba install numpy scipy
pip install cleosim==0.14.1
Then install the model files as a package:
pip install -e ./aussel_model
To run LQR control, you'll need ldsctrlest
Python bindings.
To run MPC, you'll need Julia with JuMP
@1.4.0
and OSQP
@0.8.0
packages installed.
Then, follow along with the experiments in run_experiments.sh
.
I haven't tested running that file all the way—rather, I added lines as I worked on the terminal.
So, I'd recommend running line by line, especially since the simulations take a while (those with full optogenetics take about 10 minutes on my decent laptop).
Some plots are generated automatically by the simulation. That code is in plot_results.py
. The code I used to make the final summary figure is in create_figure.py
.
The --mode=val
argument runs the model with epilepsy parameters to reproduce figure 5A of Aussel et al., 2022
This relies on validation/aussel22-data/input_epi_wake_{1|2|3}.txt
, which must be obtained by contacting Amélie Aussel, the author.
These files contain firing rate inputs to the entorhinal cortex from three different afferent brain regions, produced (after some preprocessing) from sEEG recordings as described in the two papers.
Code to produce a figure from these results is located at validation/plot_data.py
.