Skip to content

AllenInstitute/openscope_databook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,089 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenScope Databook

The Deployed Databook can be found here: https://alleninstitute.github.io/openscope_databook

The citeable DOI page on Zenodo: DOI

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.

Environment Setup

Prerequisites

Before setting up the environment, ensure you have the following installed:

  • Python 3.13 (check with python --version)
  • uv (optional, highly recommended for reproducible builds: python -m pip install uv)
  • Node.js & npm (to build the databook in MyST, not needed to run notebooks. check with npm --version)

For Running Notebooks (Python only)

Preferred (uv lockfile, mirrors CI):

  • Use Python 3.13
  • Sync from lockfile: uv sync --frozen --extra dev --python 3.13
  • Run Jupyter: uv run jupyter notebook

Pip-only fallback (no uv required):

  • Create and activate a Python 3.13 virtual environment
  • Install dependencies: python -m pip install -r requirements-ci.txt
  • Install project: python -m pip install -e .
  • Run Jupyter: jupyter notebook

For Building the Databook in MyST (Python + Node.js)

If you want to build or develop the databook documentation with MyST, you'll also need to install JavaScript dependencies. After completing the Python setup above:

  • Make sure you're in the 'docs' folder: cd docs
  • Install JavaScript dependencies for MyST: npm install
  • Run the development server: uv run myst start, Or build for production: uv run myst build

Maintaining requirements-ci.txt

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 reading pyproject.toml (which would conflict with pinned VCS commits)

Content

Basics

Visualizing NWB Files

First-Order Analysis

Higher-Order Analysis

OpenScope Experimental Projects

Methods

Appendix

About

OpenScope databook: a collaborative, versioned, data-centric collection of foundational analyses for reproducible systems neuroscience πŸπŸ§ πŸ”¬πŸ–₯οΈπŸ“ˆ

Topics

Resources

License

Stars

75 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors