Dan Landayan

Neuroscientist

FlyWire Connectomics Toolkit

fafbseg‑py + navis for programmatic connectome analysis
fafbseg-pynavisPyTorchDockerCI

Programmatic access to FlyWire via fafbseg‑py, standardized coordinate transforms, navis interoperability, and a small PyTorch module for learned morphology/connectivity embeddings.

Abstract

This toolkit provides programmatic access to the FlyWire connectome with fafbseg-py, interoperable objects for navis, and a PyTorch module for morphology/connectivity embeddings. The goal is reproducible, scalable analysis with clear routes to deployment (Docker + CI).

Methods

Data access & transforms

  • fafbseg-py to fetch meshes/skeletons/annotations.
  • Coordinate transforms handled via library APIs to ensure stable cross-version queries.
  • Returned objects are navis-compatible for downstream morphology and graph operations.

Embeddings (PyTorch)

  • Construct node/edge features from morphology or connectivity tables.
  • Train a shallow model to learn embeddings for similarity/retrieval tasks.
  • Provide unit tests and deterministic seeds for reproducibility.

Engineering

  • Dockerfile, requirements.txt / environment.yml.
  • GitHub Actions for lint/tests.
  • Tutorial notebooks convertible to CI-smoke tests.

Results

  • End-to-end pull of N neurons + M neuropils with stable transforms.
  • Learned embeddings separate neuron families in 2D projections.
  • Latency reduced by X% after caching key queries.
Embedding projection and pipeline overview
Embeddings + pipeline overview.

Discussion

A unified, reproducible access layer + embeddings unlock faster exploratory analyses and ML baselines. The navis bridge lets researchers pivot between analysis and visualization seamlessly; the PyTorch block sets the stage for contrastive or supervised tasks at scale.


Data & Reproducibility

  • Env: conda env create -f environment.yml (or pip install -r requirements.txt)
  • Docker: docker build -t flywire-toolkit .docker run -p 8888:8888 flywire-toolkit
  • CI: See badge and workflow in repo
  • Notebooks: notebooks/01_fetch.ipynb, 02_embeddings.ipynb

References

  • FlyWire + fafbseg‑py docs; navis docs; PyTorch docs.