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.3.tar.gz (39.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.3-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.3.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for neuralib_atlas-0.7.3.tar.gz
Algorithm Hash digest
SHA256 3ace3454b692573cb3becc32d91ad1984ebb4bdf847b07b333db8b7c4218377f
MD5 e7810d42650d5b36c65c988f31598748
BLAKE2b-256 46397813676b4b6b027a13b28e47d8b35cfbfcb962bd95437cab8f1ac9dfba0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for neuralib_atlas-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b0f18415fe33f3d5656659048dcdb82ba0df0674759029dce23aa55972d989
MD5 2b8edc14e988e93bcdb2c2c08d20fa10
BLAKE2b-256 a03f294aaeb80db98418f4803a1dec1a73752131d00b31403f9bcf97c20f6928

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