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.1.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.1-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.1.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.1.tar.gz
Algorithm Hash digest
SHA256 9f685f9ffba1d0ed4559637f8bc23e7613291f81bd18fe04d81791a79e21f036
MD5 50c6add374362d347cdf55de52c04909
BLAKE2b-256 2a9944eac06f5a1914f675901bd86ab653c331edc04539162ce2941a925eddf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuralib_atlas-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 743f624152f412df9de170f86984d596fbb60667532403c911b5e5d2cda03532
MD5 e37cf710ad3a35d10346c2b6f4ff2702
BLAKE2b-256 e7f19de51a720c02c73296dce8ba98abf0cb3784a3df5c795658e2c0da65eb7c

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