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/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 brainrender extra
  • 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.2.tar.gz (39.8 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.2-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.2.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.2.tar.gz
Algorithm Hash digest
SHA256 a6747731b707a6cbc943b8f10a38062b8ed6bf167f0928e8911d363d51bcca5b
MD5 62b99520d07db37c429102cef1d9257b
BLAKE2b-256 9369a2e1afd32fe997a2cf7f6fbdc221766cff927a506fdd46b24a82ed581514

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8044f80fa4b25370fc893357995700740bdf97272303fd89085e6a95622c8bc1
MD5 16ab75fdcc5fedd7046097beac09f112
BLAKE2b-256 07d09eb1a23687ef8e99ecf5522ef8bc470bf95fa93d8e94eff590e4c2975b4d

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