This repository accompanies the manuscript Disruption of theta-timescale spiking impairs learning but spares hippocampal replay (Joshi A, Comrie AE, Bray S, Mankili A, Guidera JA, et al., 2025).
It provides:
-
Ready-to-use scripts to process wideband data into LFP and spikes, and to perform spike sorting, clusterless decoding, and LFP analysis using Spyglass.
-
Tools to examine stimulus-driven entrainment and suppression, changes in pairwise correlations, spatial fields, theta sequences, replay, and learning.
-
Figure notebooks that reproduce the main and supplementary results.
Results demonstrate the effects of rhythmic and theta-phase-specific closed-loop optogenetic activation of medial septum parvalbumin-expressing neurons on hippocampal LFPs, spatiotemporal coding, and task learning.
Demo: Theta-phase-specific stimulation of medial septum PV neurons suppresses the rhythmicity of hippocampal ahead-behind sweeps of location during track traversal.
To install the package with custom analysis tables and run the associated notebooks (recommended), follow these steps:
- Clone the repository to your local system.
- Navigate to the cloned directory and run:
pip install .
Todo:
- PyPI release
If you want to apply the analysis pipelines to new datasets, you can install the package and use the custom tables together with your existing database and the spyglass ecosystem.
All raw data and derived results (e.g., spike sorting, LFP) are available through the DANDI archive
We have also released a docker images for easy access and use of this paper's results This includes:
- a pre-built conda environment with all necessary packages
- the notebooks from this repository, and
- a populated SQL database with all information needed to query and retrieve results from the DANDI archive.
Docker Container instructions
- Install Docker on your local machine
- Download and unzip this directory
- Navigate to the unzipped directory in your terminal
- Run:
docker compose -f docker-compose-collab.yml up -d - In a web browser, navigate to
localhost:8888/lab/tree/notebooksand log in with the passwordms_stim_analysis
This will land you at a jupyter hub with the figure-generating notebooks for this project and access to a pre-populated instance of the spyglass database.
-
non_local_detector: tools for clusterless decoding of hippocampal population activity.
-
spyglass: database framework for managing electrophysiology and behavioral data.
-
trodes: acquisition and stimulation software used in these experiments.
-
ndx-optogenetics: NWB extension for representing optogenetic stimulation protocols and metadata.
-
ndx-franklab-novela: Frank Lab–specific NWB extension for storing lab-specific data in NWB/DANDI.
| Animal | Alias | Targeted |
|---|---|---|
| Winnie | V | 1 |
| Frodo | F | 1 |
| Totoro | T | 1 |
| Banner | B | 1 |
| Odins | O | 1 |
| Wallie | W | 0 |
| Olive | L | 0 |
| Yoshi | Y | 0 |
| Bilbo | I | 0 |
