ms_stim_analysis
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.
Installation
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
Usage
New work
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.
Reuse and Replication
All raw data and derived results (e.g., spike sorting, LFP) will be made available through the DANDI archive (upcoming).
We also plan to release a Docker image that includes:
- a pre-built conda environment
- the notebooks from this repository, and
- a populated SQL database with all information needed to query and retrieve results from the DANDI archive.
(Docker build in progress)
Associated repositories
-
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.
Code Directory
Rat alias table
| 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 |
Metadata
Release files for ms-stim-analysis 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ms_stim_analysis-0.1.6.tar.gz | 85.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ms_stim_analysis-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 196.2 kB
Release files / ms_stim_analysis-0.1.6.tar.gz
| Download URL | ms_stim_analysis-0.1.6.tar.gz |
|---|---|
| Size | 85.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
757efa222524a7d74f7080fafb5e5fe2d1efcde7df2dd623babbf64168a54e8c
|
|
BLAKE2b-256 checksum How to use checksums |
4fdd91b79a098a059c6d1df5cf8d4a39e0e5eca5069d0584bb9dc60fc843b14e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / ms_stim_analysis-0.1.6-py3-none-any.whl
| Download URL | ms_stim_analysis-0.1.6-py3-none-any.whl |
|---|---|
| Size | 110.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
884c94dcceddc80cad7f2669efbcdc33fb760ab4bf311daad8eee2bbaec24b78
|
|
BLAKE2b-256 checksum How to use checksums |
4f4741aac14451e6725d6c8cdbc4f31d481dc19e06e083f6e2ef0f22967f75bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|