Preprocessing and analysis pipeline for the Omniroute behavioral validation manuscript.
This repository contains the full preprocessing and analysis code used for:
Lester AW, Mombeini AG, Madhav MS (2025).
The Omniroute maze: a novel rodent navigation apparatus that integrates dynamically configurable routes, sensory cues, and automated reward delivery.
In review at eLife.
All figures and quantitative results in the manuscript are generated from this codebase.
The pipeline supports two modes:
- Full pipeline: raw → ros/ephys preprocessing → analysis
- Analysis-only: skip preprocessing by using the preprocessed data provided on OSF
All raw and preprocessed data required to reproduce the analyses and figures are in methods_manuscript_datasets hosted on the Omniroute OSF project:
OSF project: https://osf.io/xfpsv/
Before running any preprocessing or analysis, you must reconstruct the methods_manuscript_datasets directory from the multi-part archive provided on OSF.
- Install 7-Zip or another tool that supports multi-part
.7zarchives.
For Windows, 7-Zip is available at https://7-zip.org. - Create a directory with read and write access to store the dataset, for example
/path/to/data/. - Download all parts of the archive from OSF into that directory
(files namedmethods_manuscript_datasets.7z.001,methods_manuscript_datasets.7z.002, and so on). - Use your archive tool (e.g., 7-Zip) to extract only
methods_manuscript_datasets.7z.001into/path/to/data/.
For example, on Windows with 7-Zip: right-click → 7-Zip → Extract Here.
The tool will automatically read.002,.003, etc. and reconstruct
/path/to/data/methods_manuscript_datasets/. - Set the
DATASET_ROOTvariable in the root.envfile to the reconstructedmethods_manuscript_datasetsdirectory.
Example:DATASET_ROOT=/path/to/data/methods_manuscript_datasets
omniroute-manuscript-analysis/
│
├── preprocessing/ # Python pipeline for extracting and aligning raw data
│ ├── run_preprocessing.py # Main entry point for preprocessing
│ └── README.md # Detailed preprocessing setup
│
├── analysis/ # MATLAB scripts generating all manuscript figures and stats
│ └── run_analysis.m # Main entry point for MATLAB analysis
│
├── results/
│ ├── figures/ # Outputs: .png/.pdf/.fig
│ ├── tables/ # Outputs: .mat/.csv and intermediate summaries
│ └── logs/ # Preprocessing and analysis logs
│
├── environment.yml # Conda environment for Python preprocessing
└── README.md
Preprocessing is performed in Python 3 using the conda environment provided:
- Python ≥ 3.11
- numpy, pandas, scipy
- rosbags
- python-dotenv
- spikeinterface[full] (0.102.0)
Create and activate the environment:
conda env create -f environment.yml
conda activate omniroute_analysisNote:
See preprocessing/README.md for full details.
Analyses and figure generation were tested using:
-
MATLAB R2022b
-
Statistics and Machine Learning Toolbox
-
Image Processing Toolbox
-
Signal Processing Toolbox
-
Curve Fitting Toolbox
No third-party MATLAB dependencies are required.
The preprocessing pipeline parses raw ROS bag data, synchronizes sensor streams, extracts task-relevant events, and generates intermediate continuous spike channel (CSC) files consumed by MATLAB for the ephys analysis.
Entry point:
python -m preprocessing.run_preprocessingAfter the run, processed continuous spike channel (CSC) data will be written to methods_manuscript_datasets.
Note:
This step is optional if using the preprocessed dataset from OSF.
The MATLAB pipeline generates all figures and quantitative analyses reported in the manuscript.
Entry point:
Open MATLAB and run:
analysis/run_analysis.mThis script:
- Loads required data from
methods_manuscript_datasetslocated underDATASET_ROOT - Performs all relevant analyses
- Generates and saves all manuscript figures
- Writes summary tables and logs to the
results/directory
Outputs will be placed in:
results/figures/results/tables/results/logs/analysis_*.txt
Note:
Descriptive and summary statistics are stored in the associated log txt files.
- Clone the repository
git clone https://github.com/NC4Lab/omniroute-manuscript-analysis.git
cd omniroute-manuscript-analysisgit checkout manuscript-omniroute-lester-
Download
methods_manuscript_datasetsfrom OSF
Place the folder in any directory with read/write access, and set theDATASET_ROOTvariable in the root.envfile. -
(Optional) Run preprocessing
conda activate omniroute_analysis
python -m preprocessing.run_preprocessing- Run the MATLAB analysis
Open MATLAB and execute:
analysis/run_analysis.mThis will regenerate all paper figures and tables.
Analysis code in this repository is released under the MIT License (see LICENSE).
