Skip to content

Lightweight python package for downloading neuron morphologies from the NeuroMorpho archives.

License

Notifications You must be signed in to change notification settings

kpeez/neuromorphopy

Repository files navigation

neuromorphopy

License Documentation

Lightweight python package for downloading neuron morphologies from the NeuroMorpho archives.

Features

  • Simple and intuitive API for searching NeuroMorpho.org
  • Efficient concurrent downloads of neuron morphologies
  • Flexible query system with validation
  • Automatic metadata handling
  • Support for both synchronous and asynchronous operations

Requirements

  • Python >= 3.11

Installation

You can install neuromorphopy directly from PyPI:

pip install neuromorphopy

Development

For development work, we recommend using uv for faster dependency resolution and better reproducibility:

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and install
git clone https://github.com/kpeez/neuromorphopy.git
cd neuromorphopy
uv venv
uv sync

Usage

Create a query file (YAML or JSON) to specify what neurons you want:

# query.yml
filters:
  species: ["mouse"]
  brain_region: ["neocortex"]
  cell_type: ["pyramidal"]
sort: # sorting is optional
  field: "brain_region"
  ascending: true

Use the command line interface to search and download neurons:

neuromorpho search -q query.yml -o ./data

For more detailed usage, see our documentation.

About

Lightweight python package for downloading neuron morphologies from the NeuroMorpho archives.

Resources

License

Stars

Watchers

Forks

Packages

No packages published