Tutorial materials for working with Drosophila connectome datasets at the San Juan Winter School on Connectomics and Brain Simulation (SJCABS). We will work with all the major, dense connectome datasets for the fruit fly.
Instructors: Sven Dorkenwald & Alexander Bates
This tutorial provides foundational skills for loading, analysing, and visualising connectome data that will be used throughout the workshop. You'll learn to work with neuronal morphologies, synaptic connectivity, and network analysis across multiple fly brain and nerve cord datasets. Key contributors to the tools used in, and to prepare, this workshop include Philipp Schlegel and Greg Jefferis.
This tutorial offers:
-
curated data for connectomic analyses.
-
concise Python and R code for simple but effective analyses of connectome data.
-
guides you through some general principles of exploratory connectomics analysis that should be useful.
- Connectome Datasets - BANC, Male CNS, FAFB, MANC, Hemibrain
- Guides - Neuroglancer and ultrastructure guides
- Analysis Tools - Python and R packages with installation guides
- Data Organisation - Google Drive structure and file types
- Tutorial Path - What you'll learn (2 hours)
- Getting Started - Installation and first steps
- Citation - How to cite the datasets
We focus primarily on two FlyWire datasets—BANC and FAFB—while also providing access to MANC, Hemibrain, and Male CNS. All datasets have been harmonized to use the unified metadata schema we used in the BANC project, enabling cross-dataset comparisons. Possible metadata entries given here: data/meta_data_entries. You can see renderings of neuronal meshes from the BANC, FAFB, MANC and HemiBrain datasets in neuroglancer here.
Primary dataset for this tutorial
The first synapse-resolution connectome that spanning the brain and ventral nerve cord. Contains ~114,000 neurons with ~108 million synaptic connections. A female fly. Missing the first optic relay, the lamina, and the retina.
- Explore: Codex | Neuroglancer for version 626 | Neuroglancer for version 746
- Publication: Bates et al. (2025) bioRxiv
- Documentation: data/dataset_documentation/banc_data.md
- BANC space mesh location: neuron_meshes
Complete male CNS connectome with 166,691 neurons spanning the brain and ventral nerve cord. Includes fruitless and doublesex expression data for studying sex-specific circuits. A male fly. Missing retina.
- Explore: Codex | neuPrint | Neuroglancer
- Publication: Berg et al. (2025) bioRxiv
- Documentation: data/dataset_documentation/malecns_data.md
- BANC space mesh location: Not yet available
Complete adult female fly brain connectome via the FlyWire project. Contains ~139,000 neurons spanning all brain regions, including detailed annotations of 8,453 cell types. A female fly. Missing ventral nerve cord and retina.
- Explore: Codex | Neuroglancer
- Publication: Dorkenwald et al. (2024) Nature; Schlegel et al. (2024) Nature
- Documentation: data/dataset_documentation/fafb_data.md
- BANC space mesh location: fafb_783_meshes
First complete nerve cord connectome with ~23,000 neurons. A male fly. Missing brain.
- Explore: neuPrint | Codex | Neuroglancer
- Publication: Takemura et al. (2024) eLife
- Documentation: data/dataset_documentation/manc_data.md
- BANC space mesh location: manc_v1.2.1_meshes
Dense reconstruction of approximately half the central brain (~25,000 neurons). Includes mushroom body learning circuits and central complex navigation circuits. A female fly. Missing ventral nerve cord and approximately half of the brain and optic lobes.
- Explore: neuPrint | Neuroglancer
- Publication: Scheffer et al. (2020) eLife
- Documentation: data/dataset_documentation/hemibrain_data.md
- BANC space mesh location: hemibrain_v1.2.1_meshes
These guides were created by the FlyWire project:
- Neuroglancer cheatsheet (slightly different neuroglancer version)
- Fly synapses
- Ultrastructure and morphology
Installation guide: Setting up Python for connectomics
- navis - Neuron analysis and visualisation (works with all datasets)
- skeletor - Mesh skeletonisation
- fafbseg-py - FlyWire/FAFB-specific tools
- navis-flybrains - Coordinate transforms and template brains
- ConnectomeInfluenceCalculator - Quantify influence between sensory and effector neurons
- cocoa - Compare inter/intra-dataset connectivity -CAVEclient - Live connectome dataset annotation and tracking (for flies: FAFB, BANC, FANC) -neuprint-python - Data access to Janelian connectome projects, e.g. HemiBrain, MANC and maleCNS.
Installation guide: Installing the natverse
Core packages:
- natverse - NeuroAnatomy Toolbox ecosystem (works with all datasets)
- neuprintr - neuPrint client for querying connectome databases
- nat.flybrains - Coordinate transforms and template brains
Dataset-specific packages:
- bancr - BANC-specific client
- fafbseg - FlyWire/FAFB-specific tools
- hemibrainr - Hemibrain-specific tools
- malevnc - Male VNC (MANC) specific tools
- malecns - Male CNS specific tools
Analysis tools:
- coconatfly - Compare inter/intra-dataset connectivity
- influencer - Influence score analysis
All processed data is hosted on Google Cloud Storage: Access Data
You can browse and download files directly from the browser, or use command-line tools:
# List available datasets
gsutil ls gs://sjcabs_2025_data/
# Download a specific file
gsutil cp gs://sjcabs_2025_data/path/to/file .
# Download an entire folder
gsutil -m cp -r gs://sjcabs_2025_data/folder_name .banc/
├── banc_746_meta.feather # Neuron annotations
├── banc_746_edgelist_simple.feather # Neuron-to-neuron connectivity
├── banc_746_synapses.feather # Individual synapse data
├── banc_746_skeletons_in_banc_space.zip # 3D morphologies (SWC format)
├── abdominal_neuromere/ # Subset: abdominal control circuits
├── antennal_lobe/ # Subset: olfactory circuits
├── central_complex/ # Subset: navigation circuits
├── front_leg/ # Subset: front leg control
├── mushroom_body/ # Subset: associative memory circuits
├── optic/ # Subset: visual processing circuits
└── suboesophageal_zone/ # Subset: feeding and tactile circuits
*_meta.feather- Metadata for each neuron: cell type, brain region, neurotransmitter, developmental lineage (schema details)*_edgelist_simple.feather- Connectivity matrix showing which neurons connect to which, with connection strengths*_synapses.feather- Coordinates and properties of individual synapses*_skeletons_*.zip- 3D skeleton reconstructions in SWC format
See individual dataset documentation files in data/dataset_documentation/ for detailed column descriptions.
We provide curated subsets focusing on specific circuits:
-
Antennal Lobe: Primary olfactory processing centre receiving input from olfactory receptor neurons and projecting to higher brain regions via projection neurons. Critical for odour discrimination and learning.
-
Central Complex: Navigation circuits for spatial orientation, motor control, and goal-directed behaviour. Contains ring neurons encoding heading direction and columnar neurons for path integration.
-
Mushroom Body: Associative learning and memory circuits. Kenyon cells integrate sensory information and form associations with dopaminergic reinforcement signals.
-
Optic Lobe: Visual processing through lamina (motion detection), medulla (colour and contrast), and lobula (object recognition). Includes both retinotopic local circuits and wide-field integration neurons.
-
Suboesophageal Zone: Lower brain region controlling feeding, grooming, and processing gustatory/tactile information from mouthparts and antennae.
-
Front Leg / Abdominal Neuromere: Motor control circuits coordinating limb movements and postural adjustments through local sensory feedback and descending command signals.
Browse Files | gs://sjcabs_2025_data/banc/
banc_746_meta.feather(0.01 GB) - Metadatabanc_746_simple_edgelist.feather(4.8 GB) - Connectivitybanc_746_synapses.feather(10.2 GB) - Synapsesbanc_banc_space_l2_swc.zip- Skeletons- Curated subsets:
abdominal_neuromere/,antennal_lobe/,central_complex/,front_leg/,mushroom_body/,optic/,suboesophageal_zone/
Browse Files | gs://sjcabs_2025_data/fafb/
fafb_783_meta.feather(~0.01 GB) - Metadatafafb_783_simple_edgelist.feather(~5 GB) - Connectivityfafb_783_split_edgelist.feather(~10 GB) - Compartment connectivityfafb_783_synapses.feather(~12 GB) - Synapsesfafb_783_banc_space_swc.zip- Skeletons (BANC space)fafb_fafb_space_swc.zip- Skeletons (native FAFB space)- Curated subsets:
antennal_lobe/,central_complex/,mushroom_body/,optic/,suboesophageal_zone/
Browse Files | gs://sjcabs_2025_data/manc/
manc_121_meta.feather(~0.005 GB) - Metadatamanc_121_simple_edgelist.feather(~1.5 GB) - Connectivitymanc_121_split_edgelist.feather(~3 GB) - Compartment connectivitymanc_121_synapses.feather(~4 GB) - Synapsesmanc_banc_space_swc.zip- Skeletons (BANC space)
Browse Files | gs://sjcabs_2025_data/hemibrain/
hemibrain_121_meta.feather(~0.005 GB) - Metadatahemibrain_121_simple_edgelist.feather(~2 GB) - Connectivityhemibrain_121_split_edgelist.feather(~4 GB) - Compartment connectivityhemibrain_121_synapses.feather(~5 GB) - Synapseshemibrain_banc_space_swc.zip- Skeletons (BANC space)hemibrain_hemibrain_raw_space_swc.zip- Skeletons (native space)neuropils/,obj/- Mesh data
# Small file - metadata (recommended to start)
gsutil cp gs://sjcabs_2025_data/banc/banc_746_meta.feather .
# Curated subset - much smaller than full dataset
gsutil -m cp -r gs://sjcabs_2025_data/banc/antennal_lobe/ .
# Large file - check size first
gsutil ls -lh gs://sjcabs_2025_data/banc/banc_746_synapses.featherThis tutorial follows a progressive learning path designed to take about 2 hours for the core content, with optional extensions for deeper exploration.
Core Tutorial:
- Understanding file formats (Feather vs Parquet)
- Loading metadata and exploring hierarchical classifications
- Working with Google Cloud Storage and local files
- Filtering and characterizing neurons by connectivity patterns
- Example: Mushroom body calyx neurons
Extensions:
- Your Turn: Apply analysis to different datasets (maleCNS, FAFB)
- Compare biological vs technical differences between datasets
Core Tutorial:
- Loading and visualizing 3D neuron skeletons (.swc files)
- Reading neuropil meshes for spatial context
- Co-plotting neurons across datasets
- NBLAST morphological similarity analysis
- Hierarchical clustering of neuron morphologies
Extensions:
- Your Turn: Analyze different neuron populations
- Extension 1: Template brain transformations (MANC → JRCVNC2018F → BANC)
- Extension 2: Axon-dendrite splits using flow centrality
- Compartment labels from graph-theoretic algorithm (Schneider-Mizell et al. 2016)
- Synapse classification by compartment
- Available for FAFB, MANC, maleCNS (not yet BANC)
Core Tutorial:
- Loading and querying edgelists (connectivity matrices)
- Neurotransmitter prediction and signed connectivity
- Basic network statistics (degree distributions, weight correlations)
- Connectivity matrices and heatmaps
- Sensory outputs and effector inputs analysis
Extensions:
- Your Turn: Analyze different brain regions
- Connectivity-based clustering (cosine similarity, UMAP)
- Cluster composition and network visualization
- Morphological analysis of connectivity clusters
Core Tutorial:
- Understanding influence scores and random walks through connectomes
- Calculating sensory → dopaminergic neuron influence
- Influence heatmaps and UMAP visualization
- Interpreting multi-hop connectivity patterns
Extensions:
- Your Turn: Different source/target neuron populations
- Extension 1: Olfactory channel influence on pC1 neurons (BANC vs maleCNS)
- Extension 2: Abdominal neuromere sensory-effector influence patterns
If running in the cloud: INSERT
If running locally:
- Download data from the Google Cloud Storage bucket for the dataset(s) you want to work with
- Install analysis tools:
- Python:
pip install navis fafbseg - R:
install.packages("natmanager") natmanager::install(pkgs = "core") # Install Python dependencies for fafbseg library(fafbseg) simple_python()
- Python:
- Open the first tutorial in
tutorials/python/ortutorials/R/
The Google Bucket contains a curation of connectome data by Alexander Bates. The purpose of the curation was to make it easy to work with all major connectome datasets together, e.g. standardising column names and meta data entires. You are welcome to use this data curation in your own work! Just let Alex know!
More generally, if you use these datasets in your work, please cite the original publications:
BANC: Bates, A.S., Phelps, J.S., Kim, M., Yang, H.H., Matsliah, A., Ajabi, Z., Perlman, E., et al. (2025). Distributed control circuits across a brain-and-cord connectome. bioRxiv, 2025.07.31.667571. https://doi.org/10.1101/2025.07.31.667571
FAFB: Schlegel, P., Yin, Y., Bates, A.S., Dorkenwald, S., Eichler, K., Brooks, P., Han, D.S., et al. (2024). Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature, 634(8032), 139-152. https://doi.org/10.1038/s41586-024-07686-5
FAFB: Dorkenwald, S., Matsliah, A., Sterling, A.R., Schlegel, P., ... Bates, A.S., ... et al. (2024). Neuronal wiring diagram of an adult brain. Nature, 634(8032), 124-138. https://doi.org/10.1038/s41586-024-07686-5
MANC: Takemura, S., et al. (2024). A Connectome of the Male Drosophila Ventral Nerve Cord. eLife. https://doi.org/10.7554/eLife.97769
Hemibrain: Scheffer, L.K., Xu, C., Januszewski, M., Lu, Z., Takemura, S.Y., Bates, A.S., et al. (2020). A connectome and analysis of the adult Drosophila central brain. eLife, 9, e57443. https://doi.org/10.7554/eLife.57443
Male CNS: Berg, S., Beckett, I.R., Costa, M., Schlegel, P., Januszewski, M., Marin, E.C., Bates, A.S., et al. (2025). Sexual dimorphism in the complete connectome of the Drosophila male central nervous system. bioRxiv, 2025.10.09.680999. https://doi.org/10.1101/2025.10.09.680999
Neurotransmitter Predictions: Eckstein, N., Bates, A.S., Champion, A., Du, M., Yin, Y., Schlegel, P., Lu, A.K.Y., et al. (2024). Neurotransmitter classification from electron microscopy images at synaptic sites in Drosophila melanogaster. Cell, 187(10), 2574-2594.e23. https://doi.org/10.1016/j.cell.2024.03.016
Data: Licensed under CC-BY by the respective dataset creators Code: MIT License Questions: Open an issue on this repository or contact the instructors during the workshop
Workshop: SJCABS Winter School Year: 2025








