The Deployed Databook can be found here: https://alleninstitute.github.io/openscope_databook
The citeable DOI page on Zenodo can be found here: https://zenodo.org/records/12614664
The OpenScope Databook is meant to store code and documentation used for reproducible brain data analysis and visualization, primarily working with NWB files and the DANDI archive. It is provided by the Allen Institute's OpenScope Project, a component of The Allen Institute for Neural Dynamics. OpenScope is a platform for high-throughput and reproducible neurophysiology open to external scientists to test theories of brain function. Through Jupyter Book, this code is structured as a series of documented Jupyter notebooks intended to explain and educate users on how to work with brain data.
We are releasing this code to the public as a tool we expect others to use and are actively updating and maintaining this project. Issue submissions are encouraged. Questions can be directed to @rcpeene or @jeromelecoq. Below, you can see a working list of the content goals for this databook. We are open to hearing input from users about what types of analysis and visualization might be useful for reproducible neuroscience, particularly when working with the NWB file standard.
- Use Python 3.10
- Install uv:
python -m pip install uv - Sync from lockfile:
uv sync --frozen --extra dev --python 3.10 - Run tooling through uv, e.g.
uv run jupyter notebook ./docs
- Create and activate a Python 3.10 virtual environment
- Install dependencies:
python -m pip install -r requirements-ci.txt - Install project:
python -m pip install -e .
requirements-ci.txt is a fully-pinned, pip-compatible export of the uv lockfile used by CI. After any change to pyproject.toml or uv.lock, regenerate it with:
uv export --frozen --extra dev --no-hashes --no-editable --no-emit-project -o requirements-ci.txt--no-hashesβ omits hash annotations so pip accepts VCS dependencies (e.g.ophys-nway-matching,ssm) without entering hash-verification mode--no-editableβ converts editable installs to regular installs--no-emit-projectβ excludes the local project itself from the file, preventing pip from readingpyproject.toml(which would conflict with pinned VCS commits)
- Background
- Downloading NWB Files from DANDI
- Streaming NWB Files from DANDI
- Reading NWB Files
- Querying Metadata Across Sessions from DANDI
- Visualizing 2P Raw Movie
- Visualizing Unit Quality Metrics
- Visualizing LFP Responses to Stimulus Events
- Visualizing Neuronal Unit Responses to Stimulus Events
- Visualizing 2P Responses to Stimulus Events
- Visualizing Neuronal Spike Matrices
- Visualizing Behavior: Eye Tracking and Running Speed
- Visualizing 2P and Behavioral Data for Virtual Navigation
- Visualizing Neuropixels Probe Locations
- Visualizing Stimulus Templates
- Neuropixels: Plotting Receptive Fields
- Neuropixels: Identifying Opto-Tagged Cells
- Neuropixels: Extracting Current Source Density Plots
- Neuropixels: Classifying Spike Waveforms
- 2P: Stimulus-Averaged Responses
- Neuropixels: Stimulus-Averaged Responses
- 2P: Segmentation Pipeline with Suite2p
- 2P: Cell Matching Across Days
- 2P: Aligning Data Across Modalities
- Neural Dynamics Using CEBRA
- Extracting Clusters of Correlated Neurons with TCA
- Generalized Linear Models with Pynapple and NeMoS
- Generalized Linear Models
- Estimating Behavioral State from Trial Choices
- OpenScope Credit Assignment
- OpenScope Global/Local Oddball
- OpenScope Illusion
- OpenScope Dendritic Coupling
- OpenScope Sequence Learning
- OpenScope Temporal Barcoding
- OpenScope Vision2Hippocampus
- OpenScope Vismo
- OpenScope Texture
- OpenScope Loop
- OpenScope Psycode
- OpenScope Predictive Processing - Neuropixels
- OpenScope Predictive Processing - Mesoscope