Experimental model details
Flies were reared under standard conditions at 25 °C and 50% humidity with a 12-h light–12-h dark cycle on a standard cornmeal fly food. Supplementary Table 1 provides detailed descriptions of fly genotypes used in each experiment and origins of transgenic stocks. For developmental experiments, white pre-pupae (0 h APF) were collected and incubated at 25 °C for the indicated number of hours.
scRNA-seq experiment
Virgin female flies carrying LPLC2, LPLC1 or LC4 split-GAL4 driver lines were crossed to male flies expressing a nuclear GFP reporter and carrying unique 3rd chromosomes from the isogenic wild-type strains with known genotypes (Drosophila Reference Genetic Panel (DGRP)29). Each experimental condition (cell type and time point) was crossed to six unique DGRP strains (see Supplementary Table 1 and Source Data for details; the LC4 driver was crossed into four DGRP strains for 72 and 96 h APF time points). Each of these crosses was considered independent biological replicates. F1 generation animals were collected at 0 h APF and incubated for either 48, 72 or 96 h at 25 °C. To introduce a control for developmental age, we split six DGRPs (for each cell type and time point) into equal ‘early’ and ‘late’ groups (Fig. 1h; see Source Data for a detailed breakdown). Animals from early DGRPs were continuously staged and collected within the 2-h time window, after which we continuously staged and collected animals from late DGRPs within the next 2-h time window. This ensured that by the time brains were dissected (after 48, 72 or 96 h), animals from the early group were on average 2 h older than their late counterparts. Brain dissociation was performed as previously described27. Single-cell suspensions were used to generate scRNA-seq libraries using the 10X Genomics Chromium Next GEM Single Cell 3′ kit (v3.1) following the manufacturer’s protocol. Each sample (corresponding to a single time point) was loaded to a single lane of 10X Chromium. The libraries were sequenced using NovaSeq 6000 platform, with 100 bp + 100 bp reads for the 48-h sample and 28 bp + 91 bp reads for the 72-h and 96-h samples. Library preparation and sequencing were performed by the Technology Center for Genomics and Bioinformatics at UCLA.
scRNA-seq data processing and analysis
Raw scRNA-seq reads were processed using Cell Ranger (10X Genomics, v7.1.0). The reference genome and gene annotations were downloaded from FlyBase54 (release 6.29). Each time point was processed separately. Six biological replicates were tagged with a unique wild-type chromosome, and demultiplexed based on a unique wild-type chromosome using demuxlet28 (v2; https://github.com/statgen/popscle). Demultiplexing was performed using single-nucleotide polymorphisms (SNPs) from seven DGRP strains used in experiments (see Supplementary Table 1 for the full list of genotypes and Source Data for the list of DGRP strains used for each genotype and time point) and three additional DGRP strains as negative controls (line_129, line_427 and line_712). SNPs were filtered using the following criteria: (1) only biallelic SNPs on the 3rd chromosome without missing data (called in all 10 strains); (2) non-reference allele only in 1 of 10 strains. We quantified allelic counts for filtered SNPs using samtools mpileup55 (v1.10). SNPs with a minimum total coverage of 10 in all three samples (time points) and a maximum non-reference allele frequency of 0.25 were kept for downstream analysis (34,655 SNPs). Only a few cells (0.1–0.2%) were erroneously assigned to negative controls; 5–15% of cells were classified as ‘doublets’ and ‘ambiguous’ (mostly cells with low transcript coverage). We removed cells with less than 10,000 or more than 50,000 transcripts per cell (and more than 10% of mitochondrial transcripts). The final dataset included 2,595 cells for 48 h APF, 2,369 cells for 72 h APF and 1,039 cells for 96 h APF.
The scRNA-seq analysis was performed using Seurat56 package (v5.0.1). The analysis was performed separately for each time point using the standard Seurat workflow: raw transcript counts were normalized, 1,000 highly variable genes were scaled and used for PCA, first 5 PCs were used for clustering (resolution of 0.05) and to calculate tSNE projections. We used tSNE projection only for the summary visualization of the dataset. Clusters were annotated based on known marker genes27 (Fig. 1i,j and Extended Data Fig. 2a,b). Most of the cells corresponded to LPLC2, LPLC1 and LC4 neurons. To explore further heterogeneity within VPN type, we subsetted each cell type at each time point, identified 500 highly variable genes and repeated PCA. We plotted known biological and technical covariates along each analysed PC (Fig. 1l and Extended Data Figs. 2 and 3), including developmental age, DGRP genotype, sex and coverage (that is, transcripts per cell). PC1s in LPLC2 and LPLC1 did not correlate with any of these covariates and were driven by similar sets of genes (Fig. 1l,m and Extended Data Fig. 2c,d). Further in vivo validations using orthogonal approaches confirmed that these PCs captured true molecular heterogeneity within each of these cell types (Fig. 2).
Behavioural experiments
High-throughput takeoff assay
A high-throughput takeoff assay was performed with the FlyPEZ system25, which allows for the near-automated collection of fly behaviours in response to visual stimulation in large sample sizes. FlyPEZ experiments were performed as previously described25. A single stimulus was presented per fly. All behavioural experiments were performed 4 h before incubator lights were switched off, which coincides with the activity peak of the flies in the afternoon light cycle.
Visual stimulation for behavioural assay
A 7-inch-diameter back-projection-coated dome was placed centred over the glass platform to present visual stimulation. Specifically, dark looming disks that approach the fly from azimuth of 0° (front looms) or 90° (side looms), at elevations of −30°, 0°, 23°, 45° or 77° in fly coordinates, were used. Looming stimuli were generated using the same equation as described for calcium imaging experiments (see below). All looming stimuli have l/v = 40 ms. Experiments in Fig. 1e and Extended Data Fig. 1a–c show trials that were performed in the past (from 2014 to 2024) using control flies shown looming disks with a starting size ranging from 1–30° expanding to either 45°, 90° or 180°. Experiments in Fig. 3 include trials with looming disks expanding from 10° to 180° only.
Behavioural data analysis
To quantify the duration of the takeoff sequence, videos were manually annotated to identify the start of the sequence (the first frame of wing rising) and the end of the sequence (the last frame that shows T2 legs in contact with the platform). Takeoff sequence durations between 0 ms and 7 ms were considered short-mode takeoffs, and takeoff sequence durations longer than 7 ms were considered long-mode takeoffs, as previously described20. The total takeoff percentage was calculated by the number of takeoffs divided by the total number of trials. Short-mode takeoff percentage was calculated by the number of short-mode takeoffs divided by the total number of takeoffs. For experiments in Fig. 1e and Extended Data Fig. 1a–c, takeoff sequence duration longer than 50 ms was eliminated as outliers. All takeoff sequence durations were less than 50 ms for experiments in Fig. 3.
Statistical analysis
Statistical comparison of the percentages of short-mode takeoffs was performed with the Chi-squared test, with post-hoc Bonferroni correction for multiple comparisons. Statistical comparison of takeoff sequence distributions between two samples was performed with the Mann–Whitney U-test. Statistical comparison of takeoff sequence distributions between more than two samples was performed with the Kruskal–Wallis test, with post-hoc Dunn correction for multiple comparisons. Analysis and plotting were conducted with custom scripts in MATLAB 2022b, and Scipy 1.13.0 and Seaborn 0.13.2 in Python 3.
Electrophysiological experiments
Electrophysiological recordings
In vivo whole-cell, current-clamp electrophysiology was performed on behaving, tethered flies as previously described57.
Visual stimulation for electrophysiology
Visual stimuli were back-projected onto a 4.5-inch diameter mylar cylindrical screen covering 180° in azimuth via two DLP projectors (Texas Instruments Lightcrafter 4500) as previously described57.
For electrophysiology experiments in Fig. 1, visual stimuli were back-projected at 360 Hz onto a 4-inch diameterdome at 768 × 768 resolution as previously described5. Looming visual stimuli were generated using Psychtoolbox as previously mentioned. To maximize GF responses, a column of three black looming disks was displayed on a white background on the experimentally accessible visual field of the fly from elevation of −25° to 25°. The looming disks expand from 0° to 30° at a constant velocity of 500° s−1. Looming stimuli from different elevations were shown in randomized order for five times per animal, with a 15-s inter-stimulus interval. The baseline region of each trial corresponded to the 2-s time window before the onset of the looming stimulus, and the response region was the 150-ms period after the onset of the stimulus. To estimate the magnitude of depolarization in response to looming stimuli, membrane potentials were averaged across individual trials, and the peak response (mV) and area (ms × mV) relative to the baseline were calculated in the 150-ms response region using custom MATLAB scripts. Statistical comparison of the looming responses in the GF across elevations was performed with repeated-measures one-way ANOVA test, with post-hoc Sidak correction for multiple comparisons.
Two-photon calcium imaging experiments
Imaging setup
Calcium imaging was performed with a VIVO Multiphoton Open (Intelligent Imaging Innovation, Inc.) system based on a moveable objective microscope (Sutter Instruments). The excitation of the sample was delivered by a Ti:Sapphire laser (Chameleon Vision I, Coherent) tuned to 920 nm with power ranging from 15 to 30 mW (depending on imaging depth). A dual axis mirror galvanometer was used for x–y laser scanning (RGG scanbox, Sutter Instrument). We imaged with a ×20 water-immersion objective (W Plan-Apochromat ×20/1.0 DIC, Zeiss) and a band-pass filter (Semrock 525/40 nm) was placed in front of the photomultiplier tube (H11706P-40, Hamamatsu) to reduce the blue light from the visual display. Microscope and data acquisition were controlled by Slidebook 2024 (Intelligent Imaging Innovation, Inc.). Single plane images were sampled at 9 Hz with a spatial resolution of approximately 180 × 180 pixels (95.7 × 95.7 μm, pixel size ≅ 0.53 μm and dwell time ≅ 2 μs). Images and external visual stimuli were synchronized a posteriori using frame capture markers (TTL pulses from Slidebook 2024) and stimulus events (analogue outputs from the visual display) sampled with a data acquisition device (USB-6229, National Instruments) at 10 kHz.
Fly tethering and preparation for imaging
Flies were prepared and head-fixed to a custom objective stage fly holder as previously described53. The cuticle above the right optic lobe was removed and the brain bathed in isotonic saline. The holder with the tethered fly was placed under the objective at the centre of the visual display in the horizontal plane. GCaMP7f responses of dendritic branches from individual LPLC2 neurons were recorded from a posterior view. The fly head was pitched forwards, pointing down at the visual display so that the equator of the fly eye held a pitch angle of approximately 60° relative to the imaging plane. For each fly, we identified the most dorsocaudal dendritic arbors in the LoP and then moved the focal plane approximately 10 μm below them to start mapping the receptive field centres of dorsal LPLC2 neurons, or moved approximately 50 μm to probe ventral LPLC2 receptive fields, similarly to previous calcium imaging experiments in LPLC2 (ref. 6). Random steps (±5 μm) between these two bracketed Z-planes were used to probe the receptive field centres of dorsoventrally intermediate LPLC2 neurons. Unstable recordings or recordings from preparations that did not respond during the receptive field scanning trials were not included in the dataset.
Visual stimuli for imaging
A visual display composed of 48 8 × 8 dot matrix LED panels arranged in a semi-cylinder58 was used for visual stimulation as previously described53. Four layers of filter (071, LEE Filters) were placed over the display to reduce its light intensity. To compensate for the angle of the eye’s equator and optimize the extension of the surrounding visual context, the display was tilted forwards at an angle of 30° from the horizontal plane. Visual presentation was confined to the right half of the visual field, ipsilateral to the recording site. Visual stimuli were generated and controlled using custom-written MATLAB (MathWorks) scripts that communicated to the display through the microcontroller serial port. Looming stimuli simulated an object approaching the fly at a constant velocity, equivalent to twice the inverse tangent of the ratio between the half-size and the approach speed of the object (see description of electrophysiological experiments). The display background was set to 70% maximum intensity, whereas foreground objects (looming or moving bars) were set to 0%. The set of visual stimuli was presented in random block design and repeated two times. Each visual stimulation lasted 4 s and was composed by 0.5 s of uniform background, and 0.5 s of visual motion followed by 3 s of static pattern. Each trial was followed by 3 s of rest in which flies faced the visual background.
Receptive field centre and directional tuning
We imaged from the unbranched neurite that connects an LPLC2 dendrites in the LoP to their dendrites in the lobula. Neurites in this location were previously shown to have weak responses to a small bar moving in each of four cardinal directions (that is, stimuli exciting LPLC2 dendrite branches in a single LoP layer) and a much larger response to looming (that is, stimuli exciting LPLC2 dendritic branches in all four LoP layers simultaneously)6. We identified an active neurite from a single neuron in the multiphoton field of view (Extended Data Fig. 11a). The receptive field centre of that neurite was identified in real-time and subsequently scanned for directional sensitivity. We developed a custom GUI in MATLAB, which allowed for real-time modifications to stimulus positions on the visual display. This interface enabled hand-triggered looming stimuli and the visual inspection of GCaMP responses. To identify the receptive field centre of an LPLC2 dendritic branch, we created a rectangular grid of 48 positions across the right half of the visual display.
The positions were spaced every five LEDs in both horizontal and vertical directions, with each LED covering approximately 2.2° on the retina at the eye’s equator. Using the GUI, the experimenter presented a looming stimulus centred at each grid position. The looming stimulus simulated a circular object with a 0.5-cm radius, starting from a distance of 50 cm and travelling at 62.5 cm s−1. This caused the object to expand from 0.6° to 14° with a loom velocity (l/v) of 8 ms. If a response was visually detected, the surrounding grid positions were probed next. The position with the highest peak response was taken as the receptive field centre for the subsequent directional tuning experiment. We tested directional selectivity by moving a dark edge outwards from the centre of the receptive field in 24 different directions (Fig. 5b, top, and Extended Data Fig. 11). The edges moved at 20° s−1 with orientations ranging from 0° to 345° in 15° increments. Each edge subtended 15° at the eye’s equator and swept 15° orthogonal to its orientation, filling a 15° black square upon completion. In addition, a looming stimulus centred within the receptive field, with the same dynamics as those used for the receptive field scans, was included in this battery of dark moving edges.
Mapping LPLC2 position and directional sensitivity index
We sampled neurons along the dorsoventral and anteroposterior axes of the lobula and confirmed their anatomical locations by mapping the receptive field centres onto the fly eye (Fig. 5b, bottom). To identify the putative individual LPLC2 neurons stimulated by the receptive field centre scans, we mapped the horizontal coordinates of their retinal positions onto the 2D retinal ommatidia lattice. We identified specific dorsal and ventral retinal ommatidia and their corresponding columnar LPLC2 in the connectome, verifying the recorded locations of LPLC2 neurons (Fig. 5c and Extended Data Fig. 11a). Coordinates were calculated using a 3D reconstruction of the fly head, holder and visual display in AutoCAD (Autodesk). We estimated the fly ommatidia with overlapping horizontal coordinates through the following steps: (1) identified the locations of the ommatidia pointing to positions 16 and 40 based on a Mollweide projection of 3D ommatidia directions from a microCT scan59; (2) mapped these ommatidia locations onto identified visual columns of the male optic lobe connectome16; (3) used T4 neurons included in these visual columns to identify downstream LPLC2 neurons.
For each recording, the direction sensitivity index (DSI) was computed as follows:
$${\rm{DSI}}=({R}_{{\rm{up}}}-{R}_{{\rm{down}}})/({R}_{{\rm{up}}}+{R}_{{\rm{down}}})$$
where \({R}_{{\rm{up}}}\) is the peak response to an upwards moving edge (0° direction) and \({R}_{{\rm{down}}}\) is the peak response to a downwards moving edge (180° direction). The index ranged from −1 to 1, with negative values indicating downwards sensitivity and positive values indicating upwards sensitivity. The heatmap of the DSI for the tested positions was smoothed with a Gaussian filter (σ = 1).
Imaging data analysis
Images exported from Slidebook 2024 were processed following established protocols53. We used a custom MATLAB toolbox developed by B. J. Hardcastle (available at https://github.com/bjhardcastle/SlidebookObj) to correct for motion artefacts in the x–y plane and to delineate regions of interest (ROIs) around individual LPLC2 neurites within the dendritic tree. For each recording, a time series was generated by calculating the mean fluorescence intensity of pixels within the ROI (Ft) in each frame. These mean values were then normalized to a baseline value using the formula:
$$\Delta F/F=({F}_{t}-{F}_{0})/{F}_{0}$$
where \({F}_{0}\) is the mean of Ft during the 0.5 s preceding stimulus onset. This approach ensures accurate correction for motion artefacts and reliable quantification of fluorescence intensity changes in LPLC2 neurites.
Statistical analysis of calcium imaging data
The time series for each ROI were then exported from MATLAB and imported in RStudio by using the R package ‘R. matlab’60. Custom R scripts were then written for data plotting and statistical analyses. Given the repeated sampling and unbalanced sample sizes between groups and conditions, we used linear mixed effects models to fit the DSI values. This method maintains statistical power by avoiding averaging procedures and provides more accurate estimates of model parameters, including both fixed and random effects. The fixed effects were defined by the interaction between genotype (control, beat-VI RNAi or UAS-beat-VI) and condition (dorsal or ventral), whereas the random effects were attributed to individual flies61,62. We modelled the data using the R package ‘lme4’63 assuming residuals followed a Gaussian distribution. ANOVA was then run for the model by using the R package ‘car’64. Pairwise post-hoc comparisons of the fixed effects were conducted using t-tests with Bonferroni adjustments, implemented through the R package ‘emmeans’65. With the same package, we calculated the Cohen’s d effect sizes as the pairwise difference between model estimates divided by the standard deviation of the data (Supplementary Table 2). In addition, to estimate the mean DSI differences across groups and conditions without assuming a specific distribution, we performed standard bootstrap simulations with 10,000 replicates using the R package ‘boot’66,67. Dot plots were generated with the R package ‘ggplot2’68. Smoothed heatmaps were generated with the R package ‘spatstat’69.
Generation of transgenic flies
UAS-DIP-ε, UAS-dpr13 and UAS-beat-VI transgenic flies
The coding sequences of DIP-ε, dpr13 (isoform RB) and beat-VI were cloned into a modified pJFRC5 vector (Addgene: 5×UAS-IVS-mCD8::GFP, plasmid #26218) by replacing the mCD8::GFP coding sequence. Cloning strategies were designed using SnapGene 4.1.9 (GSL Biotech). Synthesis and cloning were carried out by Genewiz, Inc. Plasmids and sequences are available on request. Flies were generated by injecting the plasmid into embryos for recombination into attP1 sites (BDSC #8621) by BestGene, Inc.
DIP-ε and dpr13 null alleles
The DIP-εnull allele was generated as previously described70. In brief, two single guide RNAs (sgRNAs) were used to generate a frameshift deletion in the DIP-ε coding sequence. High-score spacer sequences were chosen using the SSC tool71. Each sgRNA was cloned into pU6-2-sgRNA-short (Addgene #41700) plasmid and two plasmids were co-injected into the vas-Cas9 line (BDSC #51324) by Bestgene, Inc. Injected larvae were crossed with balancer lines and PCR screened in F1 for single flies carrying the deletion. A mutant stock was established from this single F1.
The sgRNA target sequences used for DIP-εnull allele generation were GCTGTTCTGTGGTCATACGATAGC and CTTCAATCGATTGACGGTGGAGC.
The dpr13null allele was similarly generated. sgRNA sequences were identified with an efficiency score above 5, as defined by the CRISPR Efficiency Predictor (https://www.flyrnai.org/evaluateCrispr/). The sgRNA sequence oligos were synthesized (Integrated DNA Technologies) and cloned into the pU6b-sgRNA-short vector72 to generate a large approximately 30-kb deletion spanning most of the dpr13 genomic region. All pU6 vectors generated were verified by Sanger sequencing. Two plasmids were co-injected into the vas-Cas9 line (BDSC #51323) in Bestgene, Inc. Injected larvae were crossed with balancer lines and PCR screened in F1 for single flies carrying the deletion. A mutant stock lacking the entire coding sequence of dpr13 was established from this single F1.
The sgRNA target sequences used for dpr13null allele generation were CGATATAATCCACTTGATGC and ACGTAGCAGCTCCAGGATGT.
Detailed protocols are available on request.
Immunohistochemistry and DPX mounting
All protocols in immunohistochemistry and DPX mounting were performed exactly as described in our previous study5.
Antibody information
Primary antibodies and dilutions
Chicken anti-GFP (1:1,000; Abcam #ab13970, RRID: AB_300798), rabbit anti-dsRed (1:200; Clontech #632496, RRID: AB_10013483), mouse anti-Bruchpilot (1:20; DSHB Nc82, RRID: AB_2314866), chicken anti-V5 (1:200; Fortis Life Sciences #A190-118A, RRID: AB_66741), mouse anti-V5 (1:500; Abcam #ab27671, RRID: AB_471093), rabbit anti-HA (1:200; 3724, Cell Signaling Technology, RRID: AB_1549585), rabbit anti-FLAG (1:200; Abcam #ab205606, RRID: AB_2916341), rat anti-N-cadherin (1:40; DSHB MNCD2, RRID: AB_528119), anti-GFP nanobody (1:200 for expansion microscopy and 1:500 for confocal microscopy; N0304-At488-L, NanoTag Biotechnologies, RRID: AB_2744629) and rat anti-HA (1:500 for expansion microscopy; 3F10, Roche, RRID: AB_2314622).
Secondary antibodies and dilutions
Goat anti-chicken AF488 (1:500; A11039, Invitrogen, RRID: AB_2534096), goat anti-mouse IgG2A (1:500; A21131, Invitrogen, RRID: AB_2535771), goat anti-rabbit AF568 (1:500; A11011, Invitrogen, RRID: AB_143157), goat anti-mouse AF647 (1:500; 115-607-003, Jackson ImmunoResearch, RRID: AB_2338931), goat anti-rat AF647 (1:500; 112-605-167, Jackson ImmunoResearch, RRID: AB_2338404).
Confocal image acquisition and processing
Immunofluorescence images were acquired using a Zeiss LSM 880 confocal microscope with 488-nm, 561-nm and 633-nm lasers using Zen digital imaging software with a Plan-Apochromat ×63/1.4 oil DIC M27 objective. Serial optical sections were obtained from whole-mount brains with a typical resolution of 1,024 μm × 1,024 μm, and 0.5-μm-thick optical sections. Image stacks were exported to either Fiji 2.0.0-rc-69/1.52k or Imaris 10.1 (Oxford Instruments) for level adjustment, cropping, removal of off-target brain regions and background noise, and 3D volume reconstructions.
Analysis of neuronal morphology from image stacks
To measure the axo-dendritic overlap between LPLC2 axons and GF dendrites, confocal image stacks of colocalized LPLC2 glomeruli and GF dendrites were imported into Imaris 10.1 for 3D reconstruction using the Surfaces tool to create masks for membranes of presynaptic and postsynaptic neurons from the corresponding channels. A Surfaces detail value of 1 μm was used for both LPLC2 and GF surfaces to ensure accurate reconstruction. Background subtraction was applied with a diameter of the largest sphere that fits into the object set to 1 μm to minimize noise and nonspecific signals. The overlap between the two reconstructed surfaces was then assessed to quantify the spatial relationship between the LPLC2 axons and GF dendrites. A similar approach was used to measure the overlap between Brp puncta and the GF dendrites in STaR experiments (Extended Data Fig. 7), but the number of overlapping reconstructed surfaces was considered regardless of the overlap. To measure LoP4 dendritic branch length in sparsely labelled LPLC2 neurons, corresponding image stacks were imported into Fiji 2.0.0-rc-69/1.52k, rotated so that LoP3 and LoP4 branches were oriented antiparallel, and the distance from the point of bifurcation to the most distal tip of the LoP4 branch was measured along Lop4. Dorsoventral differences in Beat-VI and Dpr13 at the protein level were measured in FIJI 2.0.0-rc-69/1.52k. ROIs corresponding to the cell bodies dorsal or ventral LPLC2 clones were drawn manually. Mean grey value (average pixel intensity) was used as a proxy of the GFP fluorescence intensity and was measured for two ROIs per sample after background subtraction.
ExLSM and HCR-FISH
Tissue staining, gelation and expansion for ExLSM protocols were adapted from Sanfilippo et al.73 with minor changes. After dissection, fixation and permeabilization, brains were stored in RNAse-free 0.5% PBST containing anti-GFP nanobody (N0304-At488-L, NanoTag Biotechnologies) overnight at 4 °C. All samples were subsequently processed using a protein and RNA retention ExM protocol with minor modifications73,74 and minor adjustments for the fly brain34.
HCR-FISH
The HCR-FISH protocol was adapted from Wang et al.74 with minor optimizations for the fly brain34. Following digestion with proteinase K, gels with embedded brains were washed three times with PBS, transferred into 24-well plates (4624-24, Laguna Scientific) and digested with DNAse diluted in RDD buffer (RNase-Free DNase Set, 79254, Qiagen) to limit DAPI signal to RNA only and facilitate subsequent analysis for 2 h at 37 °C. After three washes in PBS, gels were equilibrated in probe hybridization buffer (Molecular Instruments) for 30 min at 37 °C, and then transferred to new 24-well plates containing custom-designed probes (Molecular Instruments) diluted in pre-warmed probe hybridization buffer (1 μl of 1 μM stock probe solution per 200 μl of buffer) and left shaking overnight at 37 °C. The following day, gels were washed four times with pre-warmed probe wash buffer (Molecular Instruments) for 20 min at 37 °C, then washed twice for 5 min with SSCT buffer (SSC with 0.05% Triton X-100; AM9763, Thermo Fisher) at room temperature and transferred to new 24-well plates with HCR amplification buffer (Molecular Instruments) for equilibration. Hairpins (HCR Amplifiers, Molecular Instruments) conjugated with AF546 or SeTau647 dyes were diluted in amplification buffer (2 μl of each hairpin per 100 μl of buffer), heat-activated in a thermal cycler (90 s at 95 °C), removed and kept for 30 min at room temperature in the dark. After 30 min, the hairpins were added to the 24-well plates with gels (300 μl per well) and incubated with shaking at room temperature in the dark for 3 h. The hairpin solution was then removed, and the gels were washed four times with SSCT and two times with SSC for 10 min at room temperature in the dark. Gels were subsequently stored at 4 °C in SSC until final expansion.
Sample mounting
Samples were expanded to approximately three time in 0.5× PBS containing 1:1,000 SYTO-DAPI (S11352, Thermo Fisher) at room temperature for 2 h before mounting onto PLL-coated coverslips (see description for DPX mounting above). The coverslips were then bonded with Bondic UV-curing adhesive (Bondic starter kit, Bondic) onto a custom-fabricated sample holder (Janelia Tech ID 2021-021) to be suspended vertically in the imaging chamber. Mounted samples were imaged in 0.5× PBS with 1:10,000 SYTO-DAPI after a minimum of 1 h of equilibration in the imaging chamber. Unexpanded gels were stored at 4 °C in 1X PBS + 0.02% sodium azide (S8032, Sigma-Aldrich) for up to 14 days before final expansion and imaging.
Light-sheet microscopy
Images were acquired on a Zeiss LS7 microscope equipped with 405-nm, 488-nm, 561-nm and 638-nm lasers. Illumination optics with a ×10/0.2 NA were used for excitation (400900-9020-000, Zeiss). Detection was performed using a W Plan-Apochromat ×20/1.0 DIC M27 water immersion objective (421452-9700-000, Zeiss). The LS7 optical zoom was set to 2.5×, resulting in a total magnification of ×50. DAPI and Alexa Fluor 546 dyes were simultaneously excited by the 405-nm and 561-nm laser lines, and emission light was separated by a dichroic mirror SBS LP 510 with emission filters BP 420-470 (404900-9312-000, Zeiss) and a modified BP 527/23 (ET672/23m, Chroma). Similarly, Alexa Fluor 488 and SeTau647 dyes were simultaneously excited via 488 nm and 638 nm, and the emission was split through a dichroic SBS LP 560 with emission filters BP 505-545 and LP 660 (404900-9318-000, Zeiss). To eliminate laser transmission, a 405/488/561/640 laser blocking filter (404900-9101-000, Zeiss) was added to the emission path. Images were captured using dual PCO.edge 4.2 detection modules (400100-9060-000, Zeiss) with a 50-ms exposure time. Filter and camera alignment were manually calibrated before each imaging session. Image volumes were acquired at optimal Z-step and light-sheet thickness, and the Pivot Scan feature was used to reduce illumination artefacts by sweeping the light sheet in the xy plane. The LS7 microscope was operated using ZEN Black 3.1 (v9.3.6.393).
Analysis of HCR-FISH data from ExLSM image stacks
The full details of our analysis are available in our previous publication35. The acquired light-sheet z-stacks, stored in CZI format, were imported and pre-processed to remove noise and artefacts generated by the imaging modality. These artefacts included limited channel contrast, variations in contrast across images within a dataset, background noise fluctuations due to both intra-channel variations and inter-channel crosstalk, and localized brightness changes caused by varying fluorophore concentrations within and among stained nuclei. Pre-processing involved the following steps: full-scale contrast stretching to normalize luminosity across different channels, local background removal using a 3D Gaussian filter, a second full-scale contrast stretching to compensate for any contrast loss due to background removal, and a final median filter to eliminate any remaining localized noise. These pre-processed stacks served as the starting point for instance segmentation of the nuclei. First, nuclear centres were identified using a Laplacian-of-Gaussian filter. Then, the imaged volume was subdivided into 3D Voronoi cells, using the detected centres as seeds and Euclidean distance. Each cell contained one nucleus, which was segmented using a threshold obtained by minimizing an energy functional designed to find the optimal surface separating the nucleus from the surrounding cytoplasm. Once nuclei were segmented, the FISH puncta were identified within the associated 3D volume using a Laplacian-of-Gaussian filter, and only the puncta within the nucleus region and its immediate surrounding volume were counted. Pre-processed products, segmented nuclear features, associated FISH puncta, and their features were stored for further analysis. Puncta counts were normalized by the maximum count for each brain. The significance of gene expression relationships inferred from HCR-FISH (Fig. 2) was assessed using both a linear regression model and a multi-level negative binomial generalized linear mixed model, accounting for inter-animal heterogeneity: random effects were attributed to individual animals (Supplementary Table 2). The package was written in Python, is open source and is available for download on GitHub (https://github.com/avaccari/DrosophilaFISH).
Genetic intersection of cell types and genes
To assess gene expression patterns within VPN cell types, we used a combination of GAL4 and LexA binary expression systems. Expression of a LexAop-FRT-stop-FRT-membrane marker controlled by a cell-type-specific LexA driver remained blocked until the FRT-stop-FRT cassette was excised by Flippase, driven by a gene-specific T2A-GAL4 driver line75. In addition, a constitutive membrane marker controlled by the same LexA driver was used to visualize the entire cell population. The list of fly stocks used is available in Supplementary Table 1.
Sparse labelling of neuronal populations
To visualize single-cell morphology of LPLC2 dendrites in the LoP (Fig. 4) and to perform HCR-FISH analysis (Extended Data Fig. 4), we used MultiColor FlpOut76, a genetic tool for sparse labelling of individual cells within a population downstream of a given GAL4 driver. Twenty-four-hour-old pupae were heat shocked in a 37 °C water bath for 10 min to achieve the labelling of one LPLC2 neuron per hemibrain on average.
Analysis of the Flywire connectome reconstruction
To analyse the FlyWire connectome, we developed an open-source Python package, available on GitHub (https://github.com/avaccari/DrosophilaCon). The primary library used by DrosophilaCon to interface with the FlyWire connectome is fafbseg23,77 (v3.0.0). This package enables users to specify the labels of ‘source’ and ‘target’ neurons and generates a connectivity diagram where target neurons are colour-coded based on the total count of synapses with the source neurons. Once the labels are specified, the package queries the latest available annotations to identify all neurons matching (or containing) the labels. The primary sources of annotation used to identify the neurons are: (1) free-form community annotations provided through the neuroglancer user interface (https://github.com/google/neuroglancer); (2) systematic annotations for the entire brain23; and (3) systematic cell types for the right optic lobe78.
Next, the latest version of the FlyWire production dataset was queried for the adjacency matrix representing the connectivity between each neuron in the source and each neuron in the target on the selected side of the brain. This information was returned as an adjacency table, providing the counts of synapses between each source–target pair. There are two versions of the synapse datasets: one filtered by synaptic cleft and one unfiltered. We used the unfiltered dataset because the filtered version applies a fixed threshold for distance, resulting in reduced synapse counts. The adjacency table was used to evaluate the total synapse counts for each target neuron. These counts were normalized by the maximum count observed across all target neurons. The mesh representation for each identified target neuron was downloaded from the FlyWire dataset, skeletonized for optimized processing and visualized with colour-coding corresponding to the normalized synapse count, allowing for comparison across different source–target pairs.
Statistics and reproducibility
All statistical analyses were performed using RStudio 1.4.1103, MATLAB 2022b or Prism 9.2.0 (GraphPad). Significance levels were defined as follows: *P < 0.05, **P < 0.01, ***P < 0.001 and ****P < 0.0001 for all figures. Statistical tests were chosen based on data distribution, which was assessed using the Kolmogorov–Smirnov test in R with a P value threshold of less than 0.05 for normality. Two groups of normally distributed datasets were tested for statistically significant differences using unpaired t-tests with Welch’s correction for non-identical variance. For comparisons involving more than two groups, we used either one-way ANOVA followed by Tukey’s honestly significant difference test for post-hoc pairwise comparisons or the Kruskal–Wallis test followed by Dunn’s multiple comparisons post-hoc test with Bonferroni correction. Binary data were compared using Chi-squared tests. Detailed statistical analyses for behavioural data, HCR-FISH data and neuroanatomical data are described in Supplementary Table 2. All other statistical tests, number of replicates, significance levels and other elements of the statistical analysis (including measure of centre and error bars) have been reported within the corresponding figure legends. No data were excluded from the analysis unless specified in the corresponding Methods section. All neuroanatomical and behavioural measurements were taken from distinct samples (that is, individual brains or hemibrains and individual flies, one takeoff per fly).
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.