neuralib-atlas
Tools for hierarchical representations of the mouse brain anatomy, providing Python interfaces to brain atlases, 3D visualization, and anatomical data manipulation.
Overview
neuralib-atlas is a modular Python package for working with mouse brain atlases in systems neuroscience research. It
provides:
- Atlas Data Access: Load and query multiple mouse brain atlases (Allen CCF, Kim, Perens, Princeton) via BrainGlobeAtlas API
- 3D Visualization: Interactive brain region rendering using BrainRender
- CCF Tools: DataFrame-based manipulation of Allen Common Coordinate Framework (CCF) annotations
- Anatomical Mapping: Coordinate transformations and region hierarchy navigation
- CLI Tools: Command-line interfaces for quick visualization tasks
Features
Atlas Support
Access to multiple mouse brain atlases at various resolutions:
- Allen Mouse Brain Atlas (10um, 25um, 50um, 100um)
- Kim Mouse Atlas (10um, 25um, 50um, 100um)
- Perens LSFM Mouse (20um)
- Perens Stereotaxic Mouse MRI (25um)
- Princeton Mouse (20um)
3D Brain Rendering
- Render specific brain regions with customizable colors and transparency
- Visualize region-of-interest (ROI) coordinates from experimental data
- Display probe placements with depth specifications
- Export high-quality images and interactive scenes
CCF Dataframe Operations
- Load and manipulate Allen CCF structure hierarchies as Polars DataFrames
- Navigate parent-child relationships in the anatomical tree
- Filter regions by criteria (cortex, subcortex, specific hierarchies)
- Map between annotation IDs and anatomical structures
Cell Atlas Integration
Query and analyze cell type distributions across brain regions using integrated cell atlas data.
Installation
From PyPI
pip install neuralib-atlas
From Source (uv venv recommended)
git clone https://github.com/ytsimon2004/neuralib2.git
cd neuralib2/packages/neuralib-atlas
uv pip install -e . # if using uv
pip install -e . # if using conda env
Optional Dependencies
pip install neuralib-atlas[brainrender]
pip install neuralib-atlas[all]
Requirements
- Python 3.11 or 3.12
- Core dependencies:
brainglobe-atlasapi,pynrrd,openpyxl,anytree,plotly,fastexcel - BrainRender CLI dependencies are available through the
brainrenderextra - See
pyproject.tomlfor full dependency list
CLI Tools
Render Brain Regions
# Render visual cortex areas
nl_brainrender area -R VISp,VISl,VISal,VISam
# Render with custom colors
nl_brainrender area -R SSp,SSs --color red,blue
Render ROI from File
# Visualize coordinates from experimental data
nl_brainrender roi -F roi_coordinates.csv
Render Probe Placement
# Display probe track with specified depth
nl_brainrender probe -F probe_coords.csv --depth 3000
Documentation
- Main Documentation: https://neuralib2.readthedocs.io/
- GitHub Repository: https://github.com/ytsimon2004/neuralib2
- Issue Tracker: https://github.com/ytsimon2004/neuralib2/issues
License
BSD 3-Clause License. See LICENSE file for details.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request with clear description
For bug reports and feature requests, use the GitHub issue tracker.
Acknowledgments
This package builds on:
- BrainRender - 3D visualization of brain data
- BrainGlobe Atlas API - Unified atlas access
- Allen Brain Atlas - Mouse brain reference atlases
Metadata
Release files for neuralib-atlas 0.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neuralib_atlas-0.7.3.tar.gz | 39.9 kB | Without provenance | Details for neuralib_atlas-0.7.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuralib_atlas-0.7.3-py3-none-any.whl | Python 3 | none | any | Details for neuralib_atlas-0.7.3-py3-none-any.whl |
Total release size: 82.0 kB
Release files / neuralib_atlas-0.7.3.tar.gz
| Download URL | neuralib_atlas-0.7.3.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ace3454b692573cb3becc32d91ad1984ebb4bdf847b07b333db8b7c4218377f
|
|
BLAKE2b-256 checksum How to use checksums |
46397813676b4b6b027a13b28e47d8b35cfbfcb962bd95437cab8f1ac9dfba0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / neuralib_atlas-0.7.3-py3-none-any.whl
| Download URL | neuralib_atlas-0.7.3-py3-none-any.whl |
|---|---|
| Size | 42.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2b0f18415fe33f3d5656659048dcdb82ba0df0674759029dce23aa55972d989
|
|
BLAKE2b-256 checksum How to use checksums |
a03f294aaeb80db98418f4803a1dec1a73752131d00b31403f9bcf97c20f6928
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for neuralib-atlas 0.7.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.