This repository includes code designed to perform analyses, organized by figure numbers, on the demo data located in the "sample_data" subfolder, pertaining to the publication titled "Goal-directed hippocampal theta sweeps during memory-guided navigation" authored by Tang, Mei, Harvey, Carbajal-Leon, Netzer, Chang, Oliva, and Fernandez-Ruiz (Nature Neuroscience, 2026).
External Matlab packages (included in this repository):
- Left-right-alternating_sweeps_2025 (https://zenodo.org/records/14548054)
- LMT (https://github.com/waq1129/LMT)
- ln-model-of-mec-neurons (https://github.com/GiocomoLab/ln-model-of-mec-neurons)
- Widloski_model_14728054 (https://zenodo.org/records/14728054) Note: the package was implemented on MATLAB 2023b. Backward compatibility with older versions is not guaranteed. Operating system: Mac or Windows.
Copy or clone the repository to your local machine. Add the Matlab subfolder to the Matlab search path. Specify the path to the demo data and code by setting the properties "S.dataRoot_" and "S.codeRoot_" to the respective folders, either by modifying these properties in "SweepsSettings.m" or by configuring the settings accordingly.
Demonstrate left-right alternating theta sweeps during random foraging.
Demonstrate goal-directed theta sweeps during the cheeseboard task.
Demonstrate the identification of goal-direction cells using the LN model.
Demonstrate the theta modulation of (non-)goal-direction cell firing during goal theta sweeps.
Demonstrate the left-right alternating theta sweeps in the CAN model.
Demonstrate the goal theta sweeps in the CAN model.
Demonstrate the replay sweeps to the goal during the cheeseboard task.
Demonstrate the decoding mismatch between CA1 and PFC during goal vs. lateral theta sweeps.
Demonstrate theta sweeps on the latent maps.
Questions can be directed to wenbo.tang07@gmail.com