spyglass
Demo | Installation | Docs | Tutorials | Citation
spyglass is a data analysis framework that facilitates the storage, analysis,
visualization, and sharing of neuroscience data to support reproducible
research. It is designed to be interoperable with the NWB format and integrates
open-source tools into a coherent framework.
Try out a demo here!
Features of Spyglass include:
- Standardized data storage - Spyglass uses the open-source Neurodata Without Borders: Neurophysiology (NWB:N) format to ingest and store processed data. NWB:N is a standard set by the BRAIN Initiative for neurophysiological data (Rübel et al., 2022).
- Reproducible analysis - Spyglass uses DataJoint to ensure that all analysis is reproducible. DataJoint is a data management system that automatically tracks dependencies between data and analysis code. This ensures that all analysis is reproducible and that the results are automatically updated when the data or analysis code changes.
- Common analysis tools - Spyglass provides easy usage of the open-source packages SpikeInterface and DeepLabCut for common analysis tasks. These packages are well-documented and have active developer communities. Its LFP filtering is derived from Ghostipy.
- Interactive data visualization - Spyglass uses figurl to create interactive data visualizations that can be shared with collaborators and the broader community. These visualizations are hosted on the web and can be viewed in any modern web browser. The interactivity allows users to explore the data and analysis results in detail.
- Sharing results - Spyglass enables sharing of data and analysis results
via Kachery, a
decentralized content addressable data sharing platform. Kachery Cloud
allows users to access the database and pull data and analysis results
directly to their local machine. Kachery is an optional dependency; install
it with
pip install spyglass-neuro[kachery-cloud]. - Pipeline versioning - Processing and analysis of data in neuroscience is often dynamic, requiring new features. Spyglass uses Merge tables to ensure that analysis pipelines can be versioned. This allows users to easily use and compare results from different versions of the analysis pipeline while retaining the ability to access previously generated results.
- Cautious Delete - Spyglass uses a
cautious deletefeature to ensure that data is not accidentally deleted by other users. When a user deletes data, Spyglass will first check to see if the data belongs to another team of users. This enables teams of users to work collaboratively on the same database without worrying about accidentally deleting each other's data.
Documentation can be found at - https://lorenfranklab.github.io/spyglass/
Installation
Quick Start (Recommended)
Get started with Spyglass in 5 minutes using our automated installer:
# Clone the repository
git clone https://github.com/LorenFrankLab/spyglass.git
cd spyglass
# Run automated installer
python scripts/install.py
# Activate environment
conda activate spyglass
The installer will:
- ✅ Create conda environment with all dependencies
- ✅ Set up local MySQL database (Docker) or connect to remote
- ✅ Validate installation
- ✅ Provide clear next steps
Installation Options:
# Minimal installation (recommended for new users)
python scripts/install.py --minimal
# Full installation (all features)
python scripts/install.py --full
# With Docker database
python scripts/install.py --docker
# Connect to remote database
python scripts/install.py --remote
# Non-interactive with environment variables
export SPYGLASS_BASE_DIR=/path/to/data
python scripts/install.py --minimal --docker
# Non-interactive remote database setup
export SPYGLASS_DB_PASSWORD=mysecret
python scripts/install.py --remote --db-host db.lab.edu --db-user myuser
Troubleshooting:
- See TROUBLESHOOTING.md for common issues
- Run
python scripts/validate.pyto check your installation - For database help, see DATABASE.md
Manual Installation
For manual installation and advanced configuration:
Tutorials
The tutorials for spyglass are currently in the form of Jupyter Notebooks and
can be found in the
notebooks
directory. We strongly recommend running the notebooks yourself.
Contributing
See the Developer's Note for contributing instructions found at - https://lorenfranklab.github.io/spyglass/latest/contribute/
License/Copyright
License and Copyright notice can be found at https://lorenfranklab.github.io/spyglass/latest/LICENSE/
System requirements
Spyglass has been tested on Linux (Ubuntu) and recent versions of macOS. Windows support is experimental.
No specific hardware requirements are needed to run spyglass. However, the amount of data that can be stored and analyzed is limited by the available disk space and memory. GPUs are required for some of the analysis tools, such as DeepLabCut.
See pyproject.toml, environment.yml, or environment_dlc.yml for software dependencies.
See spec-file.txt for the conda environment used in the demo.
Citation
Lee, K.H.*, Denovellis, E.L.*, Ly, R., Magland, J., Soules, J., Comrie, A.E., Gramling, D.P., Guidera, J.A., Nevers, R., Adenekan, P., Brozdowski, C., Bray, S., Monroe, E., Bak, J.H., Coulter, M.E., Sun, X., Broyles, E., Shin, D., Chiang, S., Holobetz, C., Tritt, A., Rübel, O., Nguyen, T., Yatsenko, D., Chu, J., Kemere, C., Garcia, S., Buccino, A., Frank, L.M., 2024. Spyglass: a data analysis framework for reproducible and shareable neuroscience research. bioRxiv. 10.1101/2024.01.25.577295.
* Equal contribution
See paper related code here.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spyglass_neuro-0.6.0.tar.gz.
File metadata
- Download URL: spyglass_neuro-0.6.0.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b565478e83a43adf971605cc38a6ac280578dfbf7683e79a3d3a2b9df7a9033
|
|
| MD5 |
3e06110e074487160481759b05d40a99
|
|
| BLAKE2b-256 |
8d2fe16fadd3d5c8902977eead9d8e7b53277f59c0ac478922fcf43ecc80707e
|
Provenance
The following attestation bundles were made for spyglass_neuro-0.6.0.tar.gz:
Publisher:
test-package-build.yml on LorenFrankLab/spyglass
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spyglass_neuro-0.6.0.tar.gz -
Subject digest:
8b565478e83a43adf971605cc38a6ac280578dfbf7683e79a3d3a2b9df7a9033 - Sigstore transparency entry: 2691006119
- Sigstore integration time:
-
Permalink:
LorenFrankLab/spyglass@b791169289442a8b74ea4160a6b292f6dc0f2073 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/LorenFrankLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-package-build.yml@b791169289442a8b74ea4160a6b292f6dc0f2073 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spyglass_neuro-0.6.0-py3-none-any.whl.
File metadata
- Download URL: spyglass_neuro-0.6.0-py3-none-any.whl
- Upload date:
- Size: 552.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f96361b70279d8328d3d6f7cf3bc192db1b35fdf8bb9eed99c92e6df7e828d2
|
|
| MD5 |
76e48f7c2689251b1d1f9e9896793fb3
|
|
| BLAKE2b-256 |
21f28fda5a78ba5a84f1a2618dad56ff60030a9ba176a16033cd6641a7a9fcab
|
Provenance
The following attestation bundles were made for spyglass_neuro-0.6.0-py3-none-any.whl:
Publisher:
test-package-build.yml on LorenFrankLab/spyglass
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spyglass_neuro-0.6.0-py3-none-any.whl -
Subject digest:
5f96361b70279d8328d3d6f7cf3bc192db1b35fdf8bb9eed99c92e6df7e828d2 - Sigstore transparency entry: 2691006243
- Sigstore integration time:
-
Permalink:
LorenFrankLab/spyglass@b791169289442a8b74ea4160a6b292f6dc0f2073 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/LorenFrankLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-package-build.yml@b791169289442a8b74ea4160a6b292f6dc0f2073 -
Trigger Event:
push
-
Statement type: