Skip to main content

Tools for hierarchical representations of the mouse brain anatomy

Project description

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/neuralib.git
cd neuralib/packages/neuralib-atlas
uv pip install -e . # if using uv
pip install -e .  # if using conda env

Requirements

  • Python 3.11 or 3.12
  • Dependencies: brainrender, pynrrd, openpyxl, anytree, plotly, fastexcel
  • See pyproject.toml for 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

License

BSD 3-Clause License. See LICENSE file for details.

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request with clear description

For bug reports and feature requests, use the GitHub issue tracker.

Acknowledgments

This package builds on:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuralib_atlas-0.7.0.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuralib_atlas-0.7.0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file neuralib_atlas-0.7.0.tar.gz.

File metadata

  • Download URL: neuralib_atlas-0.7.0.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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}

File hashes

Hashes for neuralib_atlas-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5364b8b49ea67452d0516928916f68c6087ace6407e2bffdf2596000253686b2
MD5 5bc05c553f520ac96387c0cb0090fb72
BLAKE2b-256 656998f204b1a1426da9635de8e06bccad72cb91080f7c17a132a5f08e91109e

See more details on using hashes here.

File details

Details for the file neuralib_atlas-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: neuralib_atlas-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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}

File hashes

Hashes for neuralib_atlas-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d5f59b7cec0d813054418d1729d1fa3c0bdbc3ba19ab88d000adb2add44d7e
MD5 19690950ab9c2c710ca8093472c17654
BLAKE2b-256 9c691459aa4025b88b25c0b9bb7a2646093d0829999c91c54a8caa75724d059a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page