Transcription factor codes patterning neuronal groundplans of the cerebrum Authors: Najia A Elkahlah, Yunzhi Lin, Yijie Pan, Joseph A Carter, Troy R Shirangi, E Josephine Clowney Published: 2026 ABSTRACT AbstractBrain regions that regulate motivated behaviours, including the vertebrate hypothalamus and arthropod cerebrum, house bespoke neural circuits dedicated to perceptual and internal regulation of many behavioural states1,2. These circuits are built to purpose from complex sets of cell types whose patterning has been challenging to elucidate. Here we developed methods in Drosophila melanogaster to embed well-studied neurons that regulate mating in the transcriptional contexts of the neuronal lineages that generate them3–5. By comparing transcription within and between lineages, we identified a large set of transcription factors expressed in complex combinations that delineate cerebral hemilineages—classes of postmitotic neurons born from the same stem cell and sharing Notch status6,7. Hemilineages comprise the major anatomic classes in the cerebrum8–10 and these transcription factors are required to generate their gross features. We show that subtypes of the same hemilineage can provide a common computational module to circuits regulating different drives, and identify an orthogonal set of transcription factors that stratify hemilineage subtypes of differing birth order. Our findings suggest that distinct sets of transcription factors operate in a hierarchical system to build, diversify and sexually differentiate lineally related neurons that compose motivated behaviour circuits. By linking developmental patterning to separable transcriptional axes that produce gross versus fine aspects of information flow, we provide a logical framework for cerebral control of diverse drives.Subject terms: Neural patterning, Neural circuits, Sexual dimorphism Main Motivated behaviours, such as mating, feeding or aggression, are regulated by neurons that each perform singular information-processing functions1,2. These neurons are organized into unique feed-forward circuits in vertebrate subcortical nuclei and the arthropod cerebrum. The genome contains the information necessary to assign meaning to sensory inputs and to organize relationships among different drives into motivated behaviour circuits. Yet the immense diversity of contributing neurons has made their patterning too difficult to address. To explain the anatomic and functional principles that structure these circuits and states, we need to describe the logical principles and molecular mechanisms through which their constituent neurons are patterned during development. Four logical axes diversify neuronal cell types. They are used distinctly across brain regions in organisms, and in different kinds of neurogenesis programs across clades11–13: neural stem cells are (1) spatially differentiated and (2) progress through temporal expression windows as they divide asymmetrically; differentiating daughter cells can be further separated by (3) a Notch switch; and (4) sex further differentiates a subset of cell types. In the arthropod cerebrum, approximately 200 anatomic units called hemilineages form an information highway system traversing brain regions, as their constituent neurons share neurite outgrowth tracts, gross morphology and, often, neurotransmitter systems8–10,14–17. In adult Drosophila melanogaster (D. melanogaster), cerebral hemilineages—like those of the ventral nerve cord (VNC)—are composed of the NotchON or NotchOFF cousins from the same neuroblast7–10,18,19. Within hemilineage ground plans, individual cells have identifiable differences in fine axonal and dendritic anatomy and connectivity, linked to their birth order15,18,20,21. Although lineages of nerve cords, visual systems or cortices repeat across segments or columns, the unique functions of the cerebrum are produced by mostly singular lineages. Thus cerebral cell types, defined at the level of anatomy, connectivity or circuit function, are often specific birth-order cohorts from within one hemilineage. This singularity is what makes the complex circuit computations of the cerebrum possible; at the same time, the rarity of these neuroblasts and their daughter cells has impeded efforts to describe the transcriptional mechanisms that link neurogenic patterning to the formation of circuit architecture. Here we break this impasse by starting with the unusually well-understood circuit that regulates male mating in D. melanogaster. This circuit is built from over 60 populations of neurons that arise as subtypes of defined lineages and that are sexually differentiated by the Fruitless and/or Doublesex transcription factors (TFs)3,4,10,18,22,23. We transcriptionally characterized neuronal subtypes in the mating circuit in the context of their lineages and identified groups of TFs that play separable logical roles in diversifying hemilineage ground plans, versus birth-order-associated subtypes within hemilineages. Focusing on a hemilineage that generates sexually differentiated neurons that gate mating, we found that mutation of hemilineage TFs disrupted general morphological features; that manipulation of birth-order TFs shifted subtype fates; and that cellular sex differentiated transcription within subtypes. Our results demonstrate that cerebral neurons with singular circuit functions are specified through a nested code: hemilineage identity sets the ground plan, whereas birth order carves this plan into distinct subtypes and sexual differentiation overlays additional specialization onto selected cohorts. These separable bits of transcriptional information durably barcode neurons, allowing the brain to build uniquely purposed circuit elements from the same basic developmental logic. Transcriptional analysis of developing cerebral lineages Most of the adult D. melanogaster cerebrum derives from approximately 100 spatially patterned, bilaterally symmetric type I neuroblasts, which each divide 70–100 times from embryonic to pupal stages as they progress through expression of temporal TFs and RNA-binding proteins24. Neuroblast asymmetric divisions produce a ganglion mother cell (GMC), and these divide once to produce two neurons, which assume NotchON versus NotchOFF fates6,7,25. The 70–100 neurons of the same neuroblast that share Notch status form a hemilineage. To interrogate hemilineage patterning in the cerebrum, we used an intersectional genetic approach to lineage trace the progeny of identified cerebral neuroblasts that produce well-studied, fruitless-expressing neurons in the male mating circuit (Fig. 1a). In this system, expression of GAL4 within the neuroblast initiates a recombination cascade, resulting in permanent expression of LexA within its progeny (Fig. 1b)5. We drove lineage tracing using the R19C05Pdfr enhancer, which has been empirically shown to be expressed in the CREa1 and SMPad1 neuroblasts, among additional lineages (Fig. 1b,d)22. The NotchOFF (B) hemilineage from CREa1 includes fruitless mAL neurons, which inhibit courtship-promoting P1 neurons in the presence of males or heterospecific females18,26–28. The NotchON (A) hemilineage from SMPad1 includes fruitless aSP2 neurons, which are activated in the presence of females and enhance courtship persistence3,4,10,29. We registered twenty labelled brains to a standard template and annotated 13 lineages labelled in at least half of hemispheres, and 13 further clones labelled less frequently (Fig. 1d, Methods and Extended Data Fig. 2). Using this method, all neurons born after the completion of the recombination cascade are labelled, thus embryonically born (primary) neurons may not be included. Transcriptional analysis of developing cerebral lineages. a, Type I neuroblasts generate hemilineages, which form anatomic highways structuring arthropod cerebral circuits. The D. melanogaster CREa1B hemilineage produces fruitless mAL neurons (black) and other morphologies across time. Furthest right: mAL neurons receive gustatory pheromone input from vAB3 and inhibit P1 neurons to gate courtship15,18,26,27. b, Intersection of R19C05Pdfr enhancer with deadpan allows lineage tracing of CREa1 and other neuroblasts (magenta)5,22, including their fruitless progeny (RNA FISH, green). Dashed lines outline the central brain. Further information is provided in Extended Data Fig. 1 and the Methods. Scale bars, 50 μm. c, Clonal induction of p35 in the CREa1 lineage prevents the completion of apoptosis. CREa1B soma marked by R19C05Pdfr-lineage labelling, combined with RNA FISH for fru (green) and grim (grey). grim transcript marks neurons fated to apoptose. In the female sample shown, CREa1B is labelled (and p35 expressed) only in the right hemisphere. In males, fru is translated into FruM and suppresses grim. Scale bars, 10 μm. d,d′, Registered average signal of ten male or female R19C05Pdfr-lineage-traced brains, highlighting hemilineage tract morphologies. Census of labelled lineages provided in Extended Data Fig. 2. Scale bars, 50 μm. e,e′, We performed scRNA-seq transcriptional analysis of developing R19C05Pdfr-lineage neurons (12 h and 48 h APF), with and without the p35 apoptosis block. We clustered neurons using TF transcripts. Quality control and analysis details are provided in Extended Data Fig. 1, whereas CREa1A, CREa1B and SMPad1A hemilineage markers are provided in Extended Data Fig. 2. Allele and full genotype tables are provided in the Methods. Characterization of transcriptional clusters and anatomic lineages. a, UMAP feature plots of scRNA-seq data from R19C05-labelled lineages, split across time points (12 hr APF and 48 hr APF) and conditions (±p35). CREa1A, B and SMPad1A marked by arrows. At right, contribution of each library type to each cluster. b, Distribution of UCell gene enrichment scores for apoptotic genes grim, rpr, and skl across cells from libraries of each type. Cells with an apoptosis UCell score above 0.4 only arise from libraries in which we blocked the completion of apoptosis (+p35); we thus designate cells above this threshold as “resurrected”. b’, Proportion of resurrected cells in each cluster from the UMAP. Three clusters, 0, 36, and 37, are dominated by resurrected cells. c, Census of lineage/hemilineages labelled by R19C05Pdfr lineage trace. We registered 10 male and 10 female labelled brains to the JRC201862, unisex, common brain template and annotated which tracts were labelled in each hemisphere (columns) to identify hemilineages (rows). Pairs of hemilineages that arise from the same neuroblast are always labelled together. At right, sum of how often each hemilineage was observed in the census. d, d’, Identification of ectopic, resurrected tracts that are only observed in the R19C05Pdfr-lineage-traced clones in the presence of p35. Example hemispheres ±p35 were registered to the common brain template and overlaid. Arrows in (d) highlight the addition of ectopic tracts similar to those naturally produced by ALv1, and in (d’) addition of a medially-extending tract from the SMPpm1 lineage. Note that additional differences between the individual hemispheres shown are due to inconsistent clonal induction by R19C05Pdfr lineage trace. Source data Some neuroblasts produce two living hemilineages with distinct ground plans and neurotransmitter usage, whereas others produce one living hemilineage and one that undergoes programmed cell death in part or in full6,7,18,30. Sexually differentiated cell death is also common26. We therefore genetically blocked the completion of apoptosis by expressing the caspase inhibitor p35 using our lineage labelling strategy (Fig. 1b,c)22. Resurrected cells were easily identified in histology due to their enduring high-level transcription of the pro-apoptotic gene grim (Fig. 1c). Using past clonal analyses, connectomic annotations and comparative histology in brains with and without p35, we confirmed and updated which pairs of living hemilineages are sisters, and which are lone hemilineages, with apoptosing sisters (Methods and Supplementary Table 1). Having established the ground truth of the lineages included in our genotype, we used fluorescence-activated cell sorting (FACS) of labelled neurons from both sexes, with and without p35, and performed single-cell RNA sequencing (scRNA-seq) at 12 h after puparium formation (APF, around the end of neurogenesis) and 48 h APF (when neurites have reached target neuropils and are beginning to contact potential partners; Extended Data Fig. 1). We retained central brain neurons and sexed them post hoc using expression of the male-specific lncRNAs rox1 and rox2 (Methods and Extended Data Fig. 1). To study the diversification of neuronal fates, we performed semi-supervised clustering using the 628 annotated D. melanogaster TFs. After integrating time points, we tested a variety of methods and resolutions to probe how the four logical axes of diversity related to patterns of TF expression in the dataset, and selected an intermediate resolution on the basis of standard bioinformatic tools, producing 55 clusters after further manual curation (Fig. 1e, Methods and Extended Data Fig. 1). At this resolution, neurons did not separate by sex, suggesting that lineage, Notch status and birth order dominate neuronal patterning31. Resurrected cells (those with high levels of pro-apoptotic genes) derived only from libraries in which we blocked the completion of apoptosis (Extended Data Fig. 2). The majority of resurrected cells co-clustered with natural cells, but a few clusters were dominated by resurrected cells, indicating potentially new cell types. We also observed new neuronal tracts in these animals (Extended Data Fig. 2). scRNA-seq analysis of cerebral lineages. a, The R19C05 fragment of pdfr drives expression of GAL4 in CREa1 and other neuroblasts22. GAL4 drives KD recombinase. The intersection of KD and the neuroblast-specific deadpan promoter activates Cre. Cre excises a stop codon upstream of LexA. This results in permanent LexA expression in the NB and its daughters, which can be used to drive expression of effectors, including fluorophores or the viral caspase inhibitor p35. Genetic strategy adapted from Awasaki et al. 20145. b, R19C05 Clonal labelling strategy in early larval stages (L1) versus L2/L3 determined by mouth hooks. c, scRNA-seq and analysis workflow. d, example of FACS gating strategy showing viable singlets. In this case, cells are from 48 hr APF animals. P6 are GFP- cells and P7 are GFP+ cells. e, UMAP feature plots of pre-filtered scRNA-seq data from R19C05-labelled lineages. Ey, dac and Mef2 mark Kenyon cells, repo marks glia and dpn and dap mark progenitor cells. f, UMAP feature plots of nSyb expression split across time points (12 hr APF and 48 hr APF) and conditions (±p35) before filtering nSyb-low cells (top) and after (bottom). g, The number of genes, UMIs, percent mitochondrial gene expression and the “library complexity” (log10 genes/log10 UMI) across cells for each library after filtering. The final number of cells from each dataset is between parentheses. h, The proportion of cells coming from each of our 8 datasets for every cluster. i, Sexing cells using lncRNA:roX1 and lnRNA:roX2 and contribution of male and female cells across the integrated UMAP. j, The proportion of cells coming from males versus females based on the expression of lncRNA:roX1 and lnRNA:roX2. k,l, Basis and method for splitting clusters 0 (k) and 11 and 41 (l) into distinct hemilineage clusters; rationale is described in the Methods and in Supplementary Table 1. We next used known markers to match neuron types within the R19C05Pdfr lineages in transcriptional space: mAL neurons from CREa1B, mushroom body dopaminergic neurons from CREa1A (protocerebral anterior medial (PAM) dopamine neurons) and aSP2 neurons from SMPad1A (Extended Data Fig. 2). Although we did not use neurotransmitter transcripts in clustering, we found that most clusters in our dataset expressed unified neurotransmitter systems, as do hemilineages14. Moreover, fruitless neuron types in our dataset that are subsets of known hemilineages formed subsets of transcriptional clusters that also included non-fruitless neurons (Extended Data Fig. 2). We therefore adopted the working hypothesis that our transcriptional clusters correspond to hemilineages, rather than single cell types. If this is the case, then hemilineage [lineage × Notch status] produces the primary variation in TF expression across developing cerebral neurons. This is consistent with the idea that hemilineages provide the major anatomic building blocks of the arthropod brain and VNC8,17,19. Distinct TF combinations define two sister hemilineages We used the CREa1 lineage—which produces GABAergic mAL neurons in the NotchOFF B hemilineage and PAM dopamine neurons in the NotchON A hemilineage18—as a model to test the hypothesis that our transcriptional clusters represent anatomic hemilineages, with these fru subtypes embedded in them. Seven TFs were enriched and pervasive in putative CREa1B cells and endured across developmental time: Fer1 (bHLH family, homologue of vertebrate PTF1A), TfAP-2 (AP-2 family, AP-2 homologue), fd59A (forkhead, FoxD3 homologue), dsf (nuclear receptor, NR2E1/TLX homologue), tup (LIM homeobox, ISL1 homologue), and ara and caup (both TALE homeobox, homologous to IRX4) (Fig. 2a,b and Extended Data Fig. 3). These TFs were all excluded from the putative CREa1A cluster, which was instead marked by scro, dmrt99B, erm, D, Lim1, hth, SoxN, Fer2 and CG9932 (Extended Data Fig. 4). Although putative CREa1A or CREa1B TFs were not shared between them, each was expressed in other clusters in our transcriptional dataset (Fig. 2b and Extended Data Figs. 3 and 4). The presence of dsf in CREa1B and Fer2 in CREa1A match past studies32,33. Notably, dsf mutant males court promiscuously, consistent with a requirement for Dsf in mAL neuron function34. A unique TF combination defines a model hemilineage. a,a′, Volcano plots showing differential gene expression between putative CREa1B and other clusters in the dataset identify hemilineage candidate factors at 12 h and 48 h APF. Labelled genes: TFs with –log10(P-adjusted) > 100, on the basis of two-sided, Wilcoxon rank-sum test, adjusted with Bonferroni correction procedure. CREa1A factors are shown in Extended Data Fig. 4. b,b′, UMAP plots of putative hemilineage-defining TFs in scRNA-seq data from the integrated R19C05Pdfr-labelled lineages split by time. c, Fer1 RNA fills the CREa1B lineage clone (dashed outline). Scale bars, 10 μm. d, CREa1B neuronal morphologies in male and female brains; black are fru-expressing mAL neurons. The morphologies were informed by refs. 15,18,26. e, Confocal or two-photon Images of cerebral neurons expressing Fer1, dsf, TfAP-2 or fd59a using knock-in reporter alleles, combined with fruitless reporter expression. Generation of Fer1-T2A-GAL4 is described in the Methods and shown in Extended Data Fig. 3. White arrows show the CREa1B axonal tract. Each gene labels CREa1B as well as a distinct pattern of other cerebral neuron bundles. For example, both Fer1 and dsf are also expressed in the SMPad1A hemilineage. Scale bars, 50 μm. f–h′, Hybridization chain reaction RNA FISH or immunostaining for indicated TFs in CREa1B somata (outlined) at indicated time points. All factors are expressed consistently from at least 12 h APF until adulthood. Scale bars, 10 μm. i, Two-photon images of the split-GAL4 intersections of hemilineage TFs, labelling CREa1B neurons. Scale bars, 50 μm. j, Model of hemilineage patterning downstream of the CREa1 neuroblast. Here and throughout, two-photon imaging of native fluorescence and confocal imaging of fixed and stained brains produce slightly different brain dimensions. Analysis of additional transcription factors in CREa1B hemilineage or CREa1 neuroblast. a, (Left) R19C05Pdfr clonal labelling combined with RNA FISH for Fer1 at 48 hr APF. (Right) RNA FISH for Fer1 and fru (close-up view of somata shown in Fig. 2). b, (Top) CRISPR knock-in strategy to C-terminally tag Fer1 with T2A-GAL4. (Bottom) CREa1B cell bodies labelled by the Fer1-T2A-GAL4 in green and fruitless-expression labelling in magenta with fru-lexA. c, Two-photon image of neurons labelled by genetic intersection of Fer1-T2A-GAL4 with fru-Flp. d, e UMAP plots of additional TFs expressed in CREa1B, displaying the log-normalized expression in cells split by time (12 h and 48 hr APF). f, Lineage labelling using the Awasaki strategy driven by TfAP-2-GAL4 (left), dsf-GAL4 (middle), and tub-GAL4 with the apoptotic block (lexAop-p35) (right). Fer1-T2A-GAL4 and TfAP-2-intersect-dsf-split-GAL4 did not produce lineage labelling. g, UMAP plot displaying the log-normalized expression of vnd, showing that vnd is not expressed in postmitotic neurons. Matching the CREa1A and SMPad1A hemilineages to transcriptional clusters. a. TFs enriched in the putative CREa1A cluster. Labelled genes: TFs with -log10(p-adjusted) > 100 based on two-sided, Wilcoxon Rank Sum test, adjusted with Bonferroni correction procedure. b, b’ The only natural hemilineage within the R19C05Pdfr clone set that expresses Fer2 is CREa1A (DAT-negative Fer2 cells undergo PCD); tubulin split-GAL4 is universally expressed and used to convert another split-GAL4 allele into a “regular” GAL4. c, UMAP Feature plots integrated across time showing hemilineage factors in CREa1A. d. TFs enriched in the putative SMPad1A cluster. Labelled genes: TFs with -log10(p-adjusted) > 100 based on two-sided, Wilcoxon Rank Sum test, adjusted with Bonferroni correction procedure. e, e’ The only glutamatergic hemilineage within the R19C05Pdfr clone set that expresses dsf is SMPad1A. f, UMAP Feature plots integrated across time showing hemilineage factors in SMPad1A. We used knock-in alleles in TfAP-2, dsf and fd59a, and generated a T2A-GAL4 knock-in translational reporter in Fer1, to examine their expression over space and time (Fig. 2e and Extended Data Fig. 3). Across the brain, each marked a unique set of major tracts and clumps of neuronal somata, consistent with expression in diverse hemilineages and with the previous description of cerebral neuron “packets” sharing the same TF17. We used these morphologies—combined with RNA fluorescent in situ hybridization (RNA FISH) and immunostaining on the R19C05Pdfr-lineage trace background—to demonstrate that only CREa1B expresses all four transcription factors, confirming that our transcriptional cluster corresponds to this anatomic hemilineage (Fig. 2c,f–h′). Expression of all four endured from 12 h APF to adulthood, similar to descriptions of hemilineage-specific TFs in the VNC (Fig. 2e,i)35,36. We also confirmed the pervasive expression of dsf, Fer1 and tup in the SMPad1A hemilineage, and Fer2 in the CREa1A hemilineage; we matched these to transcriptional clusters (Extended Data Fig. 4, 6 and 7). These results support that the combination of our labelling strategy and our bioinformatic approach drives cells into their hemilineages. Using histology to match anatomic hemilineages to scRNA-seq clusters, 1. a-aa, In each section of panels, immunostaining or HCR RNA FISH is performed on top of the R19C05Pdfr clone set, as indicated, with the exception of panels (k) and (y) (which are images of GFP expression driven by split-GAL4), allowing identification of anatomic hemilineages that express the TFs of interest. At right, UMAP plots showing those same TFs and positively identified hemilineages that express them. ab, anatomy of matched hemilineages as annotated in FAFB15,64. Additional description is provided in the Methods, in Supplementary Tables 1 and 3, and in Extended Data Fig. 7. Using histology to match anatomic hemilineages to scRNA-seq clusters, 2. a-m, In each section of panels, immunostaining or HCR RNA FISH is performed on top of the R19C05Pdfr clone set, as indicated, allowing identification of anatomic hemilineages that express the TFs of interest. UMAP plots show those same TFs and positively identified hemilineages that express them. n, o, Identification of a resurrected hemilineage that is sister to SMPad2. SMPad2 is labelled in 100% of our R19C05Pdfr-lineage-traced brains. In the natural genotype, scant Fer2-positive cells are observed in this region of the brain, while many cells are observed in the +p35 genotype. The ectopic transcriptional cluster expressing Fer2 is shown in (i). This cluster corresponds to cluster 0 in Extended Data Fig. 2b’, which is enriched for resurrected cells. p, p’ Identification of resurrected cluster 37; Acj6 only appears in this part of the brain in the +p35 genotype. While this anatomic set corresponds to cluster 37 in the UMAP, we have not determined which neuroblast it arises from or its sister hemilineage. q, r, r’, Identification of a resurrected sister hemilineage to PSa1. The brain shown is of the +p35 genotype, but the PSa1 lineage clone is induced only in the right hemisphere. Absent PSa1 clone induction, or in non-p35 brains, there are just a few Fd59a cells in this regions, which correspond to primary neurons sister to PSa1, called aDT7. When p35 is expressed, many more Fd59a cells are labelled. The PSa1_PCD cluster is #36 in Extended Data Fig. 2b’, which is enriched for resurrected cells. Expression of fd59a in this cluster can be seen in Extended Data Fig. 6o. s, Apoptosis UCell highlights these three resurrected hemilineages. Additional description is also provided in the Methods and in Supplementary Tables 1 and 3. t, Use of Lim1, toy, and PoxN allow identification of ALv1A. u, Statistical analysis of the variation in expression of hemilineage, birth order, and other TFs across developmental time (x axis, as described by Jain et al., 202244) or across clusters (y axis). Examples of a hemilineage TF (Fer1), a birth-order TF (pdm3) and a maturation TF from Jain et al (Hr4) are highlighted. We defined hemilineage TFs as having high variability across clusters but stable expression over developmental time. Birth order TFs are variable within, but not across hemilineage clusters. To qualify, we required that they be expressed in subsets of cells within hemilineage clusters at both our developmental time points, but their expression levels can vary. TFs outside these groups follow the same distribution as the rest of the genes in the genome. Past case studies have identified instances of both concordance and discordance between expression of a TF in a neuroblast and in its differentiated daughters30,37. To ask whether the CREa1 neuroblast had expressed the TFs we observed in CREa1B neurons, we drove lineage tracing using Fer1, TfAP-2 and dsf. Fer1 did not label any lineages using this strategy; TfAP-2 labelled many lineages, but not CREa1; and dsf labelled most or all lineages (Extended Data Fig. 3). Conversely, CREa1 and several other neuroblasts in the R19C05Pdfr set express vnd18, yet we observed only sparse vnd expression in neurons (Extended Data Fig. 3). Although these results do not exclude inheritance of neuroblast factors, they suggest a complex logical interaction between neuroblast spatial patterning and Notch signalling at neuronal birth to produce distinct TF codes in sister hemilineages of a single neuroblast. Complex TF combinations uniquely define hemilineages To test this model, we ascertained whether other TFs behaved hemilineagely in our dataset. In parallel with formal computational analysis of cluster markers (Methods), we blinded ourselves to TF identities and then manually inspected expression patterns of all 628 TFs across our cluster map split by developmental stage. We identified 89 TFs that had pervasive, enduring expression in subsets of clusters, of which 45 had a homeodomain fold (Extended Data Figs. 5 and 8). This threefold enrichment corresponds to the well-documented role of homeodomain TFs in neuronal diversification38–40. Many overlapped with hemilineage-defining TFs in the VNC35,36 and/or are expressed in subsets of neuroblasts41,42. Transcriptional clusters expressed a median of 11 of these hemilineage factors. In addition to the hemilineage TFs, we describe the expression pattern of each TF in the genome, including TFs consistently expressed, varying across maturation, varying within each hemilineage cluster, and reflecting more than one developmental axis (Supplementary Table 3). Complex transcription factor combinations uniquely define hemilineages. a, Heatmap displaying expression of 89 manually curated hemilineage TFs (columns) across integrated clusters (rows). Expression of each D. melanogaster TF in our dataset is described in Supplementary Table 3. Coloured pairs are sister hemilineages. We matched transcriptional clusters to anatomic hemilineages, and identified pairs of sister hemilineages, using data presented in Extended Data Figs. 4, 6, 7, Supplementary Table 1, and the Methods. Transcription factors were partitioned into protein families using domains annotated in FlyBase or DAVID. Dominant neurotransmitter program for each cluster (based on DAT, VGlut, VAChT and Gad1 transcripts) and UCell gene set enrichment scores for apoptotic programs (as described in Extended Data Fig. 2) and fru are displayed at right. fruitless expression is not linked to any single hemilineage TF. Rows and columns clustered by k-means. PCD: Clusters undergoing programmed cell death, which derive predominantly from p35 libraries in which we blocked the completion of apoptosis. A single cluster (“early born”) contains primary cells of mixed hemilineage, based on Imp and lov expression shown below. b, Clusters in the integrated dataset that we matched to morphological hemilineages. c. Knock-in reporter expression of an example transcription factor, otp, that labels a collection of hemilineage bundles. ALlv1, ALad1B, and SLPpm2 are included in the R19C05Pdfr-labelled hemilineages and identified by their unique tract morphology; otp expression is also visible in additional hemilineages that are not part of our transcriptional dataset. Additional description of putative birth order and other TFs. a, Transcription factors with “weird” expression, i.e. varying along more than one developmental/diversification axis. b, While we required that putative birth order TFs be expressed in subsets of cells within hemilineage clusters at both our developmental time points, expression levels could vary across time points, as in the examples shown here. c, Expression of temporally associated RNA-binding proteins Imp and Syp. In cerebral Type I lineages, Imp transcription resembles that of a birth order factor, while Syp transcription is pervasive. As these proteins regulate each other’s translation, Syp expression is likely to be more specific at the protein level. d, Identification of a cluster of cells enriched for lov. This cluster is enriched for Imp and likely to contain mixed, early born neurons (described in Methods). e, Assesment of the expression pattern of lov within clones. Consistent with a role as a birth order factor, lov-expressing cells are a small set of each clone. f, Distribution of BTB, pipsqueak, and homeo-domains among birth order and hemilineage TFs compared to the genome. To test the model that anatomic or developmental hemilineages are defined by a combinatorial hemilineage TF code, we examined expression of 15 putative hemilineage TFs in the adult brain, often on the background of R19C05Pdfr-lineage labelling (Extended Data Figs. 6 and 7, and Supplementary Table 1). These factors were clonally restricted, expressed in hemilineage soma bundles, and their expression extended to adulthood. Combining our histology with past literature, we matched the majority of frequently labelled R19C05Pdfr hemilineages to transcriptional clusters, including some that otherwise apoptose (Methods, Extended Data Figs. 6 and 7, and Supplementary Table 1). In addition to CREa1, we were able to match the two living, sister hemilineages of the ALl1 and CLP1/SLPpm2 neuroblasts; as well as matching the SMPad2 and PSa1 natural hemilineages to their resurrected sister hemilineages. The TF codes for CREa1, PSa1 and ALl1 sister hemilineages had little or nothing in common, whereas those for CLP1/SLPpm2 and SMPad2 had some overlap (Extended Data Fig. 5). An orthogonal postmitotic TF code associated with neuronal birth order In our analyses of TF variance across clusters, we noticed TFs that were expressed in swathes of neurons in each hemilineage cluster, including at 48 h APF when neurogenesis had long ceased (Fig. 3a,b). We also identified a single cluster (cluster 4) enriched for early born cells expressing the temporal patterning RNA-binding protein Imp, which included neurons expressing early neuroblast temporal factors Kr and pdm2 (refs. 13,24). Combining swath TFs with those from cluster 4 yielded 36 TFs, which, we hypothesize, vary downstream of neuronal birth order. Like the hemilineage TFs, this set was enriched for homeodomain proteins compared with the genome overall. Furthermore, many putative birth-order TFs contain BTB (ab, br, mamo, chinmo) or pipsqueak (dan, danr, Eip93F) domains, or both (CG3726, bab1, bab2, lov) (Methods and Extended Data Fig. 8). Many of these 36 have been shown to act as temporal factors in neuroblasts; to label birth-order cohorts within VNC or central brain lineages; or to allocate postmitotic neurons to alternative fates13,21,24,43. We confirmed by histology that Br, Pdm3, Mamo and lov were expressed in subsets of neurons within hemilineages throughout the cerebrum (Fig. 3c and Extended Data Fig. 8). These factors showed complex patterns of transcriptional correlation and varied modestly across developmental stage compared to previously identified maturation TFs (for example, Hr3, Hr4) (Fig. 3d and Extended Data Fig. 7)44. An orthogonal postmitotic TF code associated with neuronal birth order. a,a′, Feature plots showing expression of putative birth-order factors pdm3, br and mamo within hemilineage clusters. b,b′, Neurons within each cluster express pdm3, br and/or mamo. c, Confocal images of R19C05Pdfr neuroblast clones combined with immunostaining for these putative birth-order TFs. These proteins are largely non-overlapping within hemilineages (CREa1, dashed outline) and their representation in subsets of neurons is nearly universal across hemilineages. Bright patches of Mamo signal correspond to Kenyon cells, which are not from typical type I lineages. Scale bars, 50 μm (left column); 25 μm (right column). d, Correlation of expression of 36 putative birth-order TFs (manually curated, as shown in Supplementary Table 3 and described in the Methods). Correlation was performed across all cells from the 12 h APF libraries. Imp, Syp and fru are included for comparison. Putative birth-order factors show complex patterns of correlation and anti-correlation with one another. The fruitless gene is not linked to any specific birth-order TF. e, Manually curated birth-order TFs vary within clusters, and hemilineage TFs vary across clusters. Factors that vary along more than one developmental axis are shown in Extended Data Fig. 8 and described in Supplementary Table 3 and the Methods. Hemilineage TFs are required for CREa1B morphogenesis Neurons in the same hemilineage share anatomic ground plan and excitatory or inhibitory valence, and this developmental axis is thus the major determinant of information routing in motivated behaviour circuits. We hypothesize that hemilineage-specific TFs are required to give neurons within hemilineages their shared characteristics. We examined CREa1B in null mutants of fd59a and dsf, which survive to adulthood, and used the R19C05Pdfr enhancer to generate CREa1 clones with TfAP-2 knocked down by RNAi. In all three cases, neurons were still specified and retained GABA immunoreactivity but had clear morphological disruptions: removing fd59A truncated axonal and dendritic projections, and we could not identify typical outgrowth tracts in TfAP-2 knockdown clones (Fig. 4a–c and Extended Data Fig. 9). In dsf mutants, CREa1B neurite tracts are intact, but dendritic and axonal anatomy are disrupted (Extended Data Fig. 9). In each case, morphological disruptions are shared by fru and non-fru neurons, suggesting these factors are required for the development of gross hemilineage features across subtypes. Proper expression of hemilineage and birth-order TFs is required for neuronal development. Samples analysed throughout this figure are male (female samples and additional analyses can be found in Extended Data Fig. 9). a–c, Morphology of mAL neurons labelled by fru-mCherry or GABA immunostaining in controls versus fd59a mutants. Whole brain views (a,c) and magnification of the mAL neuron dendrites (b) are shown. Arrows indicate mAL axons or dendrites. The number of biologically independent brains were n = 11 (a–c), n = 8 (a′–c′). Scale bars, 50 μm (a,a′,c,c′); 25 μm (b,b′). d, Summary of the qualitative effect of the loss of fd59A on mAL axonal and dendritic morphology; n = 22 control hemispheres and n = 16 mutant hemispheres. e,e′, Number of CREa1B neurons (GABA+) or mALs (fruitless-expressing) per hemisphere. e, n = 22 control and n = 12 mutant hemispheres. e′, n = 22 control and n = 13 mutant hemispheres. Significance: two-sided, unpaired t-test (e, P = 0.0254; e′, P = 0.0017). Black horizontal bars represent medians; dot colors, different staining batches. f–h, Morphology and quantification of CREa1B neurons, labelled by dsf ∩ TfAP-2 split-GAL4, in control and when the putative birth-order factor dan is overexpressed. f, n = 8 control and n = 10 experimental brains. h, n = 13 control and n = 18 experimental hemispheres. Significance: two-sided, unpaired t-test (h, P = 0.0846). Black horizontal bars represent medians. Y-shaped dendrites are lost in the overexpression condition (g versus g′) and axons are sometimes misrouted (f′′). Scale bars, 50 μm (f,f′,f′′); 25 μm (g,g′). Extended Data Fig. 9 shows phenotypes for additional hemilineage and birth-order TF manipulations. Source data Phenotypes associated with alteration of additional hemilineage or birth order TFs. a-d, Morphology of mAL neurons labelled by fru-mCherry in controls versus TfAP-2 RNAi clones. The CREa1B soma are labelled by R19C05-lineage labelling and mAL soma and morphology are labelled using fru-mCherry. Arrows, mAL axons or dendrites. (a) Displays whole brain view. Zoomed in views of (b) dendrites, (c) soma and (d) axons in the same brain. e, e’, f, f’. The number of total CREa1B neurons (GABA +) or mALs per hemisphere (fruitless-expressing). “Non-induced” refers to hemispheres from animals of the TfAP-2 RNAi genotype in which clonal labelling of CREa1 was not induced, while “control” refers to the genotype lacking the RNAi allele. Number of samples and statistics for this figure are listed in the methods, under section Statistics and reproducibility. Throughout this figure: black horizontal bars represent medians. Red horizontal bars represent means. g, The qualitative effect of the loss of TfAP-2 on mAL axonal and dendritic morphology. n = 18 control and 11 mutant hemispheres. h, Morphology of mAL neurons labelled by intersection of dsf and fru in controls versus dsf mutants. i, Texas red Dextran electroporated into the mAL axonal tract in control and dsf mutants; insets showing somata indicate that dye fill is restricted to fru-expressing cells in the lineage. Representative of three or more experiments per genotype. j, The intersection of R43D01 and dsf labelling in control and dsf-mutant brains. This intersection includes fruitless-expressing and non-expressing CREa1B neurons. k, k’, l, l’. The number of total CREa1B neurons (dsf +) or mALs per hemisphere (fruitless-expressing). m, Summary of the qualitative effect of losing dsf on dendritic morphology. n = 5 control and 6 mutant brains. n, Additional images of the samples shown in (i). o, o’, p, p’, The split-GAL4 intersections of dsf and TfAP-2 in control versus Pdm3 overexpression in males and females. Red arrows highlight structures of CREa1B axonal and dendritic subtypes. q, q’, r, r’,: Number of total mAL neurons (fruitless-expressing) or total CREa1B cells (labelled by dsf intersect TfAP-2 split-GAL4) per hemisphere in control or Pdm3-overexpressing males and females. s, s’, t, t’ Number of Br-expressing CREa1B neurons (based on TfAP-2 protein expression) per hemisphere and number of Br-expressing mAL neurons (fruitless-expressing) in male and female control and Pdm3 overexpression animals. u, v mAL cell bodies labelled with the fru transcriptional reporter (fruMiMIC-GFP) in green and Br protein in magenta in male and female control and Pdm3 overexpression animals. w, x Images and quantification of female brains with Dan overexpressed under control of the split-GAL4 intersection of dsf and TfAP-2. y,y’ Quantification of CREa1B and mAL neurons in females control or mutant for fd59a. Source data Loss of each TF impacted the number of cells in the hemilineage and the distribution of fru mAL neurons versus non-fru hemilineage cousins (Fig. 4e and Extended Data Fig. 9). Consistent with our previous identification of cell-type-specific fru regulatory programs45, no single hemilineage or birth-order factor was predictive of fru expression across our dataset. Nevertheless, clonal knockdown of TfAP-2 strongly reduced the number of fruitless-expressing CREa1B neurons in both sexes (Extended Data Fig. 9). Putative birth-order TFs shift subtype patterning Neurons with different birth orders from the same hemilineage traverse the same tract highways, but diverge in fine axonal and dendritic anatomies. CREa1B anatomies have been birth-ordered using twin-spot Mosaic analysis with a repressible cell marker (tsMARCM) in females18, which showed that diverse single-copy neurons with complex dendritic wings are born first; then neurons with a Y-shaped dendrite are generated over a long larval span; and neurons with a simple dendrites and antler axons are born last. Furthermore, male mAL neurons have a straight horsetail dendrite, although these have been only roughly birthdated26. We constructed a split-GAL4 that labels all of these subtypes by intersecting the dsf and TfAP-2 hemilineage TFs and used it both to label the hemilineage and to drive ectopic expression of putative birth-order TFs. Using this split-GAL4 to drive neuroblast lineage tracing did not produce any labelling, thus ectopic expression is unlikely to be driven in the neuroblast. Ectopic expression of Pdm3 or Dan each shifted subtype distributions: when Pdm3 expression was induced throughout the hemilineage, female fru (that is, mAL) neurons were lost, Br-expressing neurons were reduced in number, and the antler morphology characteristic of the late-born fate was gained at the expense of the wing morphology characteristic of the early born fate (Extended Data Fig. 9). When Dan expression was induced, males lost the horsetail mAL morphology, and both sexes lost the Y-shaped dendritic type; there was a gain in the early born winged morphology (Fig. 4f,g and Extended Data Fig. 9). These results confirm that putative birth-order factors can causally alter the development of birth-order-specific morphologies, with Dan and Pdm3 induction mimicking earlier- and later-born morphologies, respectively. Birth order and sex diversify CREa1B transcription Finally, we sought to understand how fruitless mAL neurons arise from within the CREa1B hemilineage. In females, the winged, Y-shaped and antler CREa1B morphologies described above can be resolved into eight subtypes18; male-specific types and those that typically apoptose add additional complexity. We reclustered the CREa1B set of cells and resolved twelve transcriptional subclusters, consistent with the expected diversity. mAL neurons are sexually differentiated due to differential splicing of the fruitless transcript, which generates functional FruM protein only in XY cells: of 30–40 fru mAL neurons specified per hemisphere, 80% apoptose in female26; male mAL cells, which make FruM protein, have the horsetail dendrite and straight axon, whereas the surviving female fru mAL neurons have a Y-shaped dendrite and ring-shaped axon26. We identified two fruitless-expressing regions of the cluster map, which were the only regions in which male and female cell transcriptomes diverged (Fig. 5a). Comparing these two regions, we found they were differentiated by birth-order factors—prominently pdm3 and br—as well as by expression of pro-apoptotic genes among female cells of the pdm3 set. Those female cells derived from libraries in which we blocked apoptosis (Fig. 5b). We therefore hypothesized that mALpdm3 cells are those programmed to apoptose in female, whereas mALbr cells survive. We confirmed co-expression of Br and pdm3 with fru by histology (Fig. 5e). Birth-order TFs differentiate mAL neurons and sex-shared sisters. a, UMAP of subclustered CREa1B neurons, integrated across time points. Feature plots display log-normalized expression. Subclustering was performed using all variable features. b, Volcano plot showing differential gene expression analysis between the two fruitless domains of the UMAP in a. Black dots represent significance based on two-sided, Wilcoxon rank-sum test, adjusted using the Bonferroni correction procedure. Gene labels highlight putative birth-order factors and cell death genes, as described in the text. c, Comparison of mlSEZt and mAL neurons. Left: maximum intensity projection of confocal stack. Right: substacks focused on dendrites or somata. mlSEZt somata lack fru. Scale bars, 50 μm (left), 25 μm (upper right), 10 μm (lower right). d, Maximum intensity z projections of split-GAL4 intersections of CREa1B hemilineage TFs and putative birth-order TFs, as indicated. Arrows indicate CREa1B dendrites. Some morphologies in z projections are obscured by neurons of other hemilineages, like FLAa2A or FLAa3A (labelled). Scale bars, 50 μm. e, Histology for fru RNA with pdm3 RNA or Br protein. The dashed outline represents CREa1B cells. Scale bars, 10 μm. f, Volcano plots showing differential gene expression analysis between male versus female pdm3 or br mAL neurons. Black dots show significance based on a two-sided, Wilcoxon rank-sum test, adjusted using the Bonferroni correction procedure. Labels represent protein coding genes, –log10(P-adjusted) > 5. Sxl is a member of the sex differentiation hierarchy. g, Maximum intensity z projection of the triple intersection of a CREa1B hemilineage TF (TfAP-2), putative birth-order TFs (br-Z4) and fru. Arrows indicate CREa1B dendrites. h, Model displaying circuit roles and likely birth order of CREa1B subtypes, and expression of order TFs and fruitless. Whether the two fruitless/mAL domains are contiguous remains ambiguous; the ordering shown is parsimonious with a single window of bab2 expression and ordering of transcriptional types along the UMAP. We searched the literature for neurons sharing the CREa1B outgrowth tract. Remarkably, we identified mlSEZt neurons, which have an analogous function to mAL neurons, but participate in a different circuit: where sex-differentiated mAL neurons gate male mating in response to pheromone tastes, mlSEZt neurons are sex-shared and gate feeding in response to flavours46. We confirmed that mlSEZt somata are intermingled with mAL neurons but lack fruitless (Fig. 5c). Strikingly, the mlSEZt neurons of both sexes have identical morphology to female mAL neurons (Y-shaped dendrite and ring-shaped axon), despite their molecular discriminability via the mlSEZt split-GAL4 and fruitless (Fig. 5c). To link further CREa1B subtypes to birth-order TFs, we genetically intersected bab2, pdm3, br and rn with CREa1B hemilineage TFs (Fig. 5d). We found that bab2 labelled both horsetail mAL neurons in males, as well as the Y-shaped morphology reminiscent of mlSEZt neurons. rn labelled neurons with elaborate dendritic wings, consistent with its expression in early born cells; pdm3 labelled male mAL neurons, which were absent in females, confirming that this is the set that undergoes programmed cell death unless rescued by FruM. In females, br labelled neurons with the shared mlSEZt and female mAL morphology. We confirmed genetically that these include fru neurons, and thus that mALbr cells indeed survive in females (Fig. 5g). We note that as br is on X, males with this knock-in allele are mutant for the br-Z4 isoform. Males with this br allele had feminized mAL morphology and lacked fru, consistent with a requirement for Br-Z4 to allow fru expression in this window. Together with the birth-ordering previously performed18 and our genetic manipulations (Fig. 4f,g and Extended Data Fig. 9), these results confirm that putative birth-order TFs are indeed linked to production of the specific morphologies generated over developmental time. Blocking cell death in CREa1B equalized the proportion of mALbr versus mALpdm3 types between the sexes and allowed us to compare other aspects of their transcription (Fig. 5f and Extended Data Fig. 10). The differences in transcription between birth-order subtypes within a hemilineage (that is, mlSEZt, versus mALbr, versus mALpdm3) were greater than differences between sexes (for example, mALbr male versus female) (Fig. 5f, Extended Data Fig. 10 and Supplementary Table 4). This suggests that FruM tweaks a sex-shared cell type that arises from the interaction of hemilineage and birth-order patterning, rather than producing a completely different cell type31. In mALpdm3 cells, FruM protein’s most prominent impact was to suppress pro-apoptotic transcripts grim, rpr and skl. Loss of mALpdm3 cells to cell death also removed expression of the neuropeptide Dh31 in the female CREa1B hemilineage, as this peptide was restricted to the pdm3 temporal cohort (Extended Data Fig. 10). Although mALbr cells survive in both sexes and are sexually differentiated, transcriptional differences were modest: about 20 genes—including a neuronal adhesion molecule (DIP-delta), a neuropeptide (Nplp1) and an RNA-binding protein (mbl)—were downregulated in male mALbr cells, consistent with direct repression by FruM (Fig. 5f, Extended Data Fig. 10 and Supplementary Table 4)45. Thus, sex differentiation occurs by conservative transcriptional adjustments within the plan laid down by hemilineage and birth order, supplying a male-specific variant to the male-specific mating circuit. Additional analyses of gene expression differences among CREa1B subtypes and across sexes. a, Volcano plot showing differential gene expression between fru mAL’s and non-fru CREa1B subtypes. Black dots are significant based on two-sided Wilcoxon Rank Sum test, adjusted with Bonferroni correction procedure. Gene labels highlight putative birth order factors and fru. b, UMAP plot showing log-normalized expression of mamo in subclustered CREa1B neurons. c, rn-expressing CREa1B neurons of females have complex dendritic wings; male sample shown in Fig. 5. d, Histology for Pdm3 and Mamo protein on the mlSEZt split-GAL4 genotype. Most of the cells labelled in this genotype have small soma and the Y-shaped dendrite and ring-shaped axon. The small soma lack both Pdm3 and Mamo protein. The single large somata per hemisphere expresses Mamo. As neurons with larger soma are usually early born or primary neurons, this somata most likely corresponds to a single winged CREa1B neuron per hemisphere that is also included in the mlSEZt split-GAL4 expression pattern. e, Volcano plot showing differential gene expression between mAL and mlSEZt neurons. Black dots are significant based on two-sided Wilcoxon Rank Sum test, adjusted with Bonferroni correction procedure. Gene labels: Birth order TFs and fru. f, Volcano plot showing differential gene expression between “natural” female mAL neurons (i.e. mALbr) and resurrected female cells that usually undergo programmed cell death (i.e. mALpdm3). Black dots are significant based on two-sided Wilcoxon Rank Sum test, adjusted with Bonferroni correction procedure. Gene labels: protein coding genes with average log2(FC) > 2 or <−2. g, Proportion of the br and pdm3 mAL subtypes in male and female ±p35. h, Dh31 expression is male-specific because it is restricted to the pdm3 temporal cohort, which apoptoses in females. i, Examples of genes that are differentially expressed in male versus female mAL neurons. Discussion Here we describe a model for the diversification of rare neuronal types with unique behavioural roles. Although motivated behaviours are well studied at the circuit and behavioural level, the transcriptional logic generating these immensely diverse cell types has been obscure. By capturing and sequencing postmitotic neurons of specific type I lineages of the arthropod cerebrum, we identified two orthogonal TF codes, one of which diversifies hemilineages, and the other the neurons within hemilineages. Hemilineage tract morphology is derived from neuronal origins and is recognizable in connectomes and across individuals and species8–10,15–17. We show that this dominant organizational feature of cerebral circuits is produced by dedicated transcriptional programs, such that hemilineage is a Rosetta Stone linking ontogeny to molecular, anatomic and functional axes. Although neurons of the same hemilineage share gross projection pattern and neurotransmitter, subtypes diversified by birth-order TFs have diversified axonal and dendritic morphologies and can thus supply the same computational module to distinct circuits18,21,47. Hemilineage and birth-order TFs thus serve as barcodes of identity both in a causal developmental sense and from our position as observers of the brain. Our model thus decomposes cerebral terminal selectors into two groups defined by the separable developmental axes that induce them48. Finally, both hemilineage and birth-order factors set the table that sex differentiation acts on. Coincident studies reach similar models of the relationships between lineage, birth order and sex in transcriptional differentiation of type I lineages49–51. Paths from lineage to TF expression Transcription factors are re-used in different neurogenesis programs: many of the birth-order factors we describe pattern VNC and/or Kenyon cell temporal cohorts, and many also act as temporal factors in VNC or cerebral neuroblasts13,24. Members of our hemilineage TF set participate in multiple combinations in the cerebrum, and probably in further combinations within VNC hemilineages35,36. Many in the set also serve as neuroblast spatial factors and as temporal or spatial factors in the visual system13,41,52,53. The re-use of these factors across different neurogenic events likely relies on a diversity of upstream paths through which they can be switched on54. Similarly, we found that fruitless expression emerged out of diverse hemilineage and birth-order contexts and depended on subtype-specific upstream factors. Although singular cerebral neuroblasts can be identified on the basis of differential TF expression41,42, few have been matched to the anatomic hemilineages they produce. The TFs we test here are disjoint between the neuroblast and its differentiated daughters, suggesting that linking neuroblast transcriptional profiles to those of their daughters may be complex. In a few cases, handoffs have been observed between neuroblast spatial factors and those in differentiating daughters55,56, raising the potential for a web of regulatory interactions guiding the emergence of hemilineage TF combinations downstream of spatial and Notch developmental axes. Diversification downstream of hemilineage and birth-order TFs Spatial, temporal and Notch diversification axes have been observed repeatedly across neuropils in arthropods as well as in mammals, including in recent work focused on the dorsal horn of the spinal cord57. Yet the relationship between these patterning axes and circuit architecture varies. The cerebrum controls survival behaviours including feeding, mating, sleep, care of offspring and aggression. As the control system in the centre of the brain, these circuits integrate multimodal sensory signals and the animal’s own internal state to adjudicate what behaviour should be performed in the moment. To perform its function, the cerebrum has a unique circuit architecture compared with other well-studied neuropils: a tract highway system determines gross information flow, whereas the fine branching and connectivity of neurons that follow the same tracts allows them to join circuits regulating distinct behaviours. Here we find that lineage spatial patterning and Notch lateral inhibition produce dense TF combinations in postmitotic neurons of the same hemilineage, which innervate the same tract. Birth-order diversification can be transcriptionally separated from this axis and allows neurons that share major tracts to join distinct circuits. Although tract anatomy is a hallmark of the cerebrum, rare neurons, especially those born early, can depart from their familial tracts and take on more different morphologies than the bulk of their cousins. Early birth-order factors acting in these neuronal subtypes may hold greater sway over their fates. The degree of differentiation produced along specific developmental axes must ultimately result from the characteristics of the TFs that vary along that axis, in particular whether they can activate gene expression patterns de novo or only edit regulatory events laid down by others58. In the arthropod cerebrum, we find that BTB and pipsqueak domain proteins, which often act as repressors, are enriched among, and specific to, the birth-order TFs. Extant versus potential TF codes We were struck by the apparent excess of TFs devoted to hemilineage patterning: the 89 postmitotic hemilineage TFs we identify, taken ten at a time, could produce billions of unique combinations, yet there are fewer than 200 cerebral hemilineages. Thus, the TF combinations that exist in the brain are a very sparse subset of the combinations that could be formed from the individual factors. Recent analyses in the visual system have found that the amount of transcriptional diversity that could be produced by the available TF set is also far in excess of the number of cell types actually made53. How these cocktails are generated, and what is special about those combinations that occur in extant brains, awaits further study. Methods Statistics and reproducibility Supplementary Table 5 lists the number of independent samples, brains or hemispheres that we examined. All samples are biological replicates. Results were consistent across samples. In cases in which lineages were labelled, numbers indicate total samples collected; however, in some cases a given lineage might not be labelled in every brain. Data grouped together in the same row are from the same samples. If a figure panel is not labelled here, the data are present in its legend. Number of samples and statistics for Extended Data Fig. 9 For Extended Data Fig. 9e, n = 17 control, 11 mutant and 4 non-induced hemispheres (TfAP-2 RNAi versus control P < 0.0001; TfAP-2 RNAi versus not induced P = 0.0004; control versus not induced P = 0.9989). For Extended Data Fig. 9e′, n = 17 control, 11 mutant and 5 non-induced hemispheres (TfAP-2 RNAi versus control, P < 0.0001; TfAP-2 RNAi versus not induced, P < 0.0001; control versus not induced, P = 0.3209. For Extended Data Fig. 9e,e′: significance, one-way ANOVA with Tukey’s multiple comparisons test. For Extended Data Fig. 9f,f′,k,k′,l,l′,q,q′,r,r′,s,s′,t,t′,x,y,y′, significance two-sided, unpaired t-test. For Extended Data Fig. 9f, n = 17 control, 13 mutant and 1 non-induced hemispheres (TfAP-2 RNAi versus control P = 0.0016). For Extended Data Fig. 9f′, n = 19 control, 14 mutant and 1 non-induced hemispheres (TfAP-2 RNAi versus control P < 0.0001). For Extended Data Fig. 9k, n = 10 control and 10 experimental hemispheres (P = 0.0043). For Extended Data Fig. 9k′, n = 6 control and 8 experimental hemispheres (P = 0.0444). For Extended Data Fig. 9l, n = 16 control and 12 experimental hemispheres (P < 0.0001). For Extended Data Fig. 9l′, n = 10 control and 8 experimental hemispheres (P = 0.0047). For Extended Data Fig. 9q, n = 14 control and 18 experimental hemispheres (P = 0.7686). For Extended Data Fig. 9q′, n = 12 control and 10 experimental hemispheres (P < 0.0001). For Extended Data Fig. 9r, n = 6 control and 6 experimental hemispheres (P < 0.0001). For Extended Data Fig. 9r′, n = 10 control and 10 experimental hemispheres (P < 0.0001). For Extended Data Fig. 9s, n = 14 control and 18 experimental hemispheres (P = 0.0034). For Extended Data Fig. 9s′, n = 14 control and 19 experimental hemispheres (P < 0.0001). For Extended Data Fig. 9t,t′, n = 6 control and 6 experimental hemispheres (t, P = 0.7134; t′, P < 0.0001). For Extended Data Fig. 9x, n = 18 control and 12 experimental hemispheres (P = 0.8401). For Extended Data Fig. 9y, n = 25 control and 22 experimental hemispheres (P = 0.0002). For Extended Data Fig. 9y′, n = 25 control and 23 experimental hemispheres (P < 0.0001). Fly husbandry Flies were maintained on Bloomington food with a yeast sprinkle (B recipe; Lab Express, Ann Arbor, MI) at 25 °C on a 12:12 light–dark cycle with at least 60% humidity (provided by a beaker of water in the incubator). For staging developmental time points, pupae were marked at the 0 h APF white pre-pupae stage. Animals for scRNA-seq were collected ±1–2 h from the stated developmental time points (for example, 48 h APF were collected from 47–49 h APF). Supplementary Tables 6 and 7 list all genotypes and alleles used in the study and associated references. Reagents and software Reagents and software used in this study (as detailed in the sections below) and their associated references are listed in Supplementary Tables 8–14. Flow cytometry Flow cytometry to sort GFP-positive neurons from pupal brains was performed similarly to approaches for adult brains45: we pretreated plasticware including tips and Eppendorf tubes with PBS +1% BSA to prevent cells from sticking to the plastic. Dissections of fly brains were performed in Schneider’s +1% BSA for up to 1 h. Optic lobes were removed for the 48 h APF time points. After dissections, collagenase was added to the brains at a concentration of 2 mg ml–1 in Schneider’s 1% BSA, and then placed at 37 °C for 12 min (versus 20 min for adult brains). We then performed a manual dissociation by pipetting the brains up and down at least 30 times, and then spun down the cells at 300 g for 5 min. We removed the supernatant and then resuspended the pellet in 200 μl of PBS +0.1% BSA; we then passed it through a cell strainer cap and spun it down briefly to collect cell suspension at the bottom of the tube. We added 50 ng ml–1 of 4′,6-diamidino-2-phenylindole (DAPI) to our sample and then sorted them into a PBS +1% BSA cushion by using a FACSAria III (University of Michigan BRCF Flow Cytometry Core). During flow cytometry, dead and dying cells were excluded using DAPI signal, and forward and side scatter measurements were used to gate single cells. Scatter profiles consistent with somata (rather than neurite fragments) were determined by back-gating on DAPI. Using our dissociation methods, about 70–90% of singlets seemed viable (DAPI-low) for both time points. As the cells were to be analysed using single-cell sequencing, we set our gates generously (that is, tolerated sorting false positive cells so as to capture all true positives). With these generous gates, about 20% of these viable cells were gated as GFP+ for our 48 h APF time points, and around 2% for 12 h APF. During sorting, we made two adjustments to protect the fly primary cells, which were very delicate: we disabled agitation of the sample tube and sorted using the large nozzle (100 μm; that is, we used larger droplet size and lower pressure). Single cell RNA sequencing scRNA-seq library preparation, sequencing and quality control metrics We prepared eight libraries using the lineage labelling strategy: two replicates at 48 h APF; two replicates at 48 h APF with apoptosis blocked; two replicates at 12 h APF; and two replicates at 12 h APF with apoptosis blocked. At the University of Michigan Advanced Genomics Core, single-cell suspensions collected by flow cytometry were subjected to counting and viability checks on the LUNA Fx7 Automated Cell Counter (Logos Biosystems) and diluted to a concentration of 700–1,000 cells μl–1. Single cell libraries were generated using the 10x Genomics Chromium Controller with 3′ Gene Expression reagents following the manufacturer’s protocol (10x Genomics). As D. melanogaster cells are small, many are lost during the dropletting process; we thus loaded up to 15,000 cells per sample, with the goal of retaining 10,000. Final library quality was assessed using the LabChip GX (PerkinElmer). Libraries were subjected to paired-end sequencing according to the manufacturer’s protocol (Illumina NovaSeq 6000 or Illumina NovaSeqXPlus). We targeted 50,000 reads per cell. Potential doublets and low-quality cells were filtered out by discarding: cells that did not express at least one read for any of our transgenes (lexAop-GFP, lexAop-p35 or LexA-p65), cells with over 50,000 unique molecular identifiers or cells with fewer than 1,000 unique features. The approximately 10% of cells with the highest percentage of mitochondrial transcripts were discarded for all libraries. Features corresponded to genes that were expressed in at least one cell across libraries and were filtered for any mitochondrial genes, transposable elements, ribosomal proteins, mod(mdg4) trans-spliced precursors and non-coding RNAs besides lncRNA:roX1 and lncRNA:roX2 (which are used to assign sex to cells). After filtering, we had a total of 57,076 cells and the number of features used for downstream analyses was 12,957. scRNA-seq clustering and integration of libraries We merged all of the libraries and used the Seurat package (Seurat v.5.2.0 or 5.3.0)59 to cluster and integrate our datasets, and to visualize our clusters across conditions (with or without p35) and time points (12 versus 48 h APF). To do this, we normalized gene expression using the ‘NormalizeData’ function (with the ‘LogNormalize’ method). Rather than finding and using the most highly variable genes for the subsequent steps, we used a list of 628 TFs from FlyBase, 609 of which were expressed in our cells. We then scaled our data (ScaleData) while regressing out mitochondrial gene expression (percent.mito) and sequencing depth (nCount_RNA). We then ran principal component analysis using the scaled expression of our 609 TFs (RunPCA) otherwise using default parameters. For clustering and visualizing, we used default parameters, including 50 principal components based on an ElbowPlot (0–200) (‘FindClusters’, ‘FindNeighbors’ and ‘RunUMAP’). We then integrated our datasets (‘IntegrateLayers’) using Harmony Integration and ran the clustering (‘FindClusters’, ‘FindNeighbors’ and ‘RunUMAP’) as we described above to get an idea of the cell types and cell-type diversity that existed in our dataset. To enrich for non-MB type I hemilineages, we removed Kenyon cells, glia and 12 h APF-specific clusters we found to be optic lobe neurons or progenitor cells (Extended Data Fig. 1). In our top-level clustering, cluster 5 contained Kenyon cells on the basis of the expression of Mef2, ey and dac. Cluster 13 was glia on the basis of the expression of repo. Cluster 3 primarily contained cells from a single library (low-quality cells) and thus we removed it. Seven clusters (20, 15, 6, 22, 46, 27, 43) were specific to the 12 h APF time point and were enriched for scro, but were depleted of Imp and dati (ref. 60), indicating they are optic lobe neurons; we removed these (at 48 h APF, we removed optic lobes during our dissections; at 12 h APF, the optic lobes have not yet separated from the central brain and are thus present during our sorting). Clusters 21 and 47 expressed dpn or dap, were presumed to be progenitor cells, and were therefore removed. Some of these cell types are truly labelled by our recombination-based strategy (progenitors, glia deriving from type I lineages, sporadic clone induction in Kenyon cell lineages). Others are false positives due to a combination of our generous gating and their prevalence. After filtering, we retained a total of 42,844 neurons (18,854 cells from 48 h APF and 23,990 cells from 12 h APF). Extended Data Fig. 1 has the breakdown of how many cells come from each library. To generate the final clustering map we used for biological analyses, we re-ran the workflow above, except that after integrating the datasets, we used a resolution of 1.4 in ‘FindClusters’ determined using ClusTree61. This produced relative stabilization of 56 clusters that we assign as postmitotic neurons originating from cerebral lineages. These are almost all type I lineages; however, we did observe rare labelling of type II sublineages (Supplementary Table 1). As we describe in the main text, we hypothesize that these clusters mainly corresponded to hemilineages, with larger clusters representing hemilineages always labelled by our lineage trace, and smaller clusters representing hemilineages that were labelled more rarely. That said, as we worked back and forth between the transcriptional to histological points of view, we observed that there was no single clustering resolution that perfectly reflected hemilineage relationships: at lower resolution, some clusters contained multiple hemilineages (for example, anterodorsal and lateral olfactory projection neuron hemilineages), whereas at higher resolution, some hemilineages split into more than one cluster along the birth-order axis. We chose a resolution that kept most hemilineages unified and manually split some of our clusters, as shown in (Extended Data Fig. 1k,l). For example, cluster 0 contained the DAT + CREa1A neurons, which express scro, dmrt99B, erm, D, Lim1, hth, SoxN, CG9932, Sox21b and Fer2, along with other cells that strongly shared Fer2, scro, D, Sox21b, hth and Lim1 but lacked DAT and expressed Gad1 and seemed to be destined to apoptose based on expression of grim. This suggested they are a resurrected hemilineage that typically undergoes apoptosis (programmed cell death, or PCD), which we found experimentally was from SMPad2. We split this cluster into CREa1A and SMPad2_PCD. We also manually split cluster 11 and 41, which contained both Alad1B (adPNs) and a small set of ALl1B/lPNs based on the expression of acj6 (Alad1B/adPNs) versus vvl (ALl1B /lPNs). The matching of transcriptional clusters to hemilineages is described in Supplementary Table 1. Identifying the lineages labelled by R19C05Pdfr and their hemilineage sisterships To identify the lineages included in our set of clones, we collected ten male and ten female R19C05Pdfr-lineage trace brains without p35 (natural lineages), and ten male and ten female brains with p35 (which include resurrected cells). We performed IHC against GFP lineage labelling together with neuropil stain with anti-Brp (nc82) to allow image registration. Brains were cleared by mounting in SlowFade Glass. We imaged stained brains at 0.38 μm xy resolution and 1 μm z steps (as for most researchers studying the cerebrum, our z dimension is anterior–posterior) using a 40× oil immersion objective, and registered them to the JRC2018 Unisex common brain template62 using non-rigid registration via CMTK. As GFP in this strategy labels neuronal membranes, we could use both the positions of labelled soma and the morphologies of labelled tracts to identify hemilineages, which we did by comparing to the full adult female brain (FAFB) connectome, for which hemilineages are annotated (see below). For the natural genotype, we took a census of each of the 40 hemispheres (Extended Data Fig. 2c) to determine the labelling rate for each lineage. Overall, we labelled 13 lineages in at least half of brains, and 13 more at least once but fewer than 20 times in our census. This genotype was originally described in a previous work22, in which the authors catalogued ten labelled lineages. We found 8 of these in the set of 26 in our census. We observed a few additional lineages labelled sporadically in our histology experiments that we did not observe among the 26 in our census, and note that our sequencing datasets incorporated about 400 total brains. Although a number of papers had previously studied cerebral neuron anatomies and origins, adult anatomic hemilineages were systematically named and catalogued in a set of papers published in 2013, and a 2010 census of the lineage origins of fruitless neurons provided additional clonal data for the cerebrum3,8–10,63. Two nomenclatures (Ito/Lee versus Hartenstein) were reconciled and anatomic hemilineages were annotated in the FAFB connectome by V. Hartenstein and A. Bates (A. Bates, personal communication)15,64. These annotations have been used to seed hemilineage matches in other connectomes65,66. Most of the annotations in the connectome set include only the secondary parts of hemilineages (that is, the large sets of cells born in the larva); primary neurons, born in the embryo, are mainly categorized as putative_primary, and await association with the rest of their hemilineages. As many have noted, primary neurons share aspects of their anatomy with the secondary parts of their hemilineages, but often have more unique and elaborate innervation patterns, and larger somata67. Morphological subgroups from type II neuroblasts are also typically referred to as sublineages rather than hemilineages, because: (1) there are more than two major morphologies produced by type II lineages; and (2) the lineage tree is structured differently for type II lineages, involving two temporal axes (neuroblast and intermediate progenitor)68,69; however, in the connectome metadata, type II sublineage anatomies are simply called hemilineages (for neuroblasts such as ALl1 that produce more than one major morphology within a hemilineage, those different morphologies may also be referred to as sublineages). As the two hemilineages from a single neuroblast are generated in parallel (that is, each GMC division produces one neuron for each hemilineage), and because our lineage labelling here is restricted to initiation in Dpn+ cells, there is no way to label one type I hemilineage without labelling its sister (Dpn is also expressed in intermediate progenitors from type II neuroblasts; whereas we find that R19C05Pdfr is mostly restricted to type I neuroblasts, we occasionally label a type II sublineage, as detailed in Supplementary Table 1). Although hemilineages are clonally related and generated in parallel, the two sets of soma are usually pulled apart from one another as their primary neurites grow out along different tracts (this is why the cells expressing hemilineage-specific TFs, like Fer1 in Fig. 2c, are not mingled with their TF-negative sisters); in a minority of cases, the two hemilineages radically separate during metamorphosis (this is why there is sometimes ambiguity in identifying sister hemilineages)8–10,63. A survey of 18 type I neuroblasts suggested that around 40% of cerebral type I neuroblasts produce two living hemilineages, whereas 60% produce a lone living hemilineage whose sister hemilineage apoptoses18. The lineage-tracing datasets from 2013 identified many cerebral hemilineage pairs that derive from the same neuroblast. They also provided clues for cases in which a sister is suspected but has not yet been identified, including lineages that produce more than one cell body fibre8, which always occur together9,63, or that produce two first-born neurons observed in the adult10. Using these clues together with our own clone set, we exhaustively examined whether specific lone hemilineages always occurred together, and are therefore likely to be unidentified sister sets. CLP1 and SLPpm2 were a pair that we newly identified as sisters. We also found cases in which a full living hemilineage is paired with a small set of very different neurons, probably primary neurons of the sister hemilineage (born in the embryo) for which the secondary part of the hemilineage (that is, the large group of neurons born in the larva) apoptosed. PSa1 and SMPad2 are examples of this type of lineage. To find these ‘full hemilineage plus primary neurons of the second hemilineage’ cases, we were aided by: (1) the Cachero 2010 dataset3, which used clonal labelling to identify fruitless cell types from different lineages; (2) descriptions of the central complex cell types and their origins; and (3) images of clones from these and other papers. For example, for PSa1, we saw that the lineage clone for aDT5, which is from PSa1, also includes aDT7 neurons3,8. In the PSa1 clone8, these aDT7 neurons are also visible. In the connectome, aDT7 cells are annotated as ‘putative_primary’, and like most such putative_primary neurons, they are not assigned to a hemilineage. Unlike the annotated PSa1 hemilineage, which are predicted to be GABAergic, aDT7 cells are aminergic. In hemispheres in which we label PSa1, we always label aDT7 cells. We can now assign them as sister to PSa1. We also examined whether any of our hemilineages of interest in FAFB could be mixtures of two different hemilineages from the same lineage—we looked for cases where an annotated hemilineage included cells with different neurotransmitters that follow distinct outgrowth tracts (Alex Bates, personal communication). We took into account the number of cells annotated to each hemilineage across FAFB, BANC, and maleCNS15,65,66. We also used community annotations in Codex to connect well-studied neurons to their hemilineages. Finally, we compared our census brains with and without p35, to look for cases of resurrected whole or partial hemilineages. Although this seemed initially like it would be straightforward, we were humbled by the complexity of programmed cell death in brain development, which we understand can occur through at least four routes: first, one of the neurons from each GMC can be programmed to die as it is born, at embryonic or larval stages, as observed by Lin et al.6. Second, some neurons that functioned in the larval brain apoptose during metamorphosis70. Third, neurons can be removed by trophic cell death, that is, when they are overproduced relative to their partners71; while we have not yet observed this in the cerebrum (despite tinkering extensively with ratios of pre- and postsynaptic cells in our work in the mushroom body in Elkahlah et al.72, Ahmed et al.73 and Pan et al., unpublished data), we do not think it should be ruled out. Fourth, there is extensive sex-specific apoptosis in pupal stages26. In summary, we were able to find some clear resurrection of whole hemilineages via ectopic tract morphologies (from the ALv1 and SMPpm1 lineages) and were able to identify the lineage origins of two scRNA-seq clusters containing resurrected neurons (those from PSa1 and SMPad2). Cataloguing which cells apoptose from every lineage/hemilineage and the conditions under which they do so will require extensive further analysis and experimentation. Clues from the literature and our data and reasoning for lineages in our set are provided in Supplementary Table 1. The references we used to identify lineages/hemilineages and relate them to each other are refs. 3,6,8–10,15,18,20,30,63–66,69,74–80. Overall, in our 26 lineages, we conclude that one-quarter has two full living hemilineages; one-quarter has one living full hemilineage and a remnant of primary cells from the other hemilineage; and one-quarter has one living full hemilineage and one apoptosing full hemilineage; we did not have enough information to determine the last one-quarter. Three of the anatomic sets that we characterized include so many cells that they probably derive from more than one ‘twin’ neuroblast, SMPad1, SMPad2 and VLPl1_or_VLPl5. For the VLP groups, this is almost certainly the case, as we observe 1n and 2n quanta in different hemispheres. Matching anatomic hemilineages to transcriptional clusters Once we had determined the ground truth of which lineages are labelled by our genetic strategy, we began the work of matching anatomic hemilineages to transcriptional scRNA-seq clusters, guided by (and at the same time, testing) the hypothesis that we had clustered neurons in our dataset by hemilineage. We used many types of clues: papers in the literature that had studied TF expression in the pupal or adult brain; markers of neurons that are constituents of these hemilineages, especially fruitless neurons, which are often the best studied representatives of their hemilineage; experimentally determined or electron microscopy-predicted neurotransmitters and the principle that most hemilineages share neurotransmitter usage; patterns of apoptosis in the brain and expression of pro-apoptotic genes in transcriptional space; the expected stoichiometry of different lineages in our dataset; expectation that sister hemilineages would have similar stoichiometry; and the large set of histology experiments performed here, examining hemilineage TFs on the background of R19C05Pdfr-lineage tracing (Fig. 2, Extended Data Fig. 6 and Extended Data Fig. 7). We performed these histology experiments on adults, as we are not yet expert enough anatomists to make hemilineage matches during development. This also confirmed that the hemilineage TFs we identified at 12 h and 48 h APF continue to be expressed in similar patterns in adulthood. The evidence and reasoning for every match are provided in Supplementary Table 1. We note that almost all of the evidence we amassed was in agreement, and we eventually found explanations for most pieces of data that initially seemed to conflict. Ultimately the process was like the children’s logic puzzle in which one is asked to put characters in order around a table, given clues such as, “Sophie is sitting next to someone wearing a hat, Alfred doesn’t eat vegetables, the child with the hat is eating broccoli, one person is eating spaghetti, and there are no dogs sitting at the dinner table.” The references we used to learn what cell types are included in hemilineages of interest and to make transcription-to-anatomy matches were as follows: fru or dsx cell memberships within lineages, or their molecular markers3,4,10,22,31,80–84. Other cell-type memberships and molecular markers, by lineage: ALad1 (refs. 35,85–89); CLP1&SLPpm2 (ref. 90); CREa1 (refs. 26,32,33); VESa1 (ref. 30); ALv2 (refs. 14,77,91,92); PSa1 (refs. 3,83); LB7 (ref. 93); SLPpl3 (ref. 17); VLPl1_or_VLPl5 (refs. 80,81); SMPad1 (ref. 32); ALlv1 (refs. 93,94); ALv1 (refs. 85,88,95,96); AOTUv2 (ref. 97); ALl1 (refs. 35,74,76,79,86–89,95,96,98); LHl2 and LHl4 (ref. 99). Transcriptional analyses Subclustering and integration of CREa1B cells Subclustering was performed using the standard Seurat workflow: gene counts were normalized (using the ‘NormalizeData’ function); 2,000 highly variable genes (FindVariableFeatures) were scaled and used for PCA (using the ‘ScaleData’ and ‘RunPCA’ functions); the first 50 principal components were used for clustering (using the ‘FindNeighbors’ and ‘FindClusters’ functions) and UMAP projections (using the ‘RunUMAP’ function). For integration we used the standard integration workflow of Seurat 5 using Anchor-based canonical correlalation analysis integration to identify shared cell types across time (12 h and 48 h APF). It works by correcting the previously identified PCA coordinates and these corrected coordinates are used for clustering (using the ‘FindNeighbors’ and ‘FindClusters’ functions; resolution = 0.8, clusters = 11) and UMAP projections (using the ‘RunUMAP’ function)59. Clusters 3 and 4 lacked fd59A and TfAP-2. Those cells were removed and the workflow above was re-run (955 cells, resolution = 1.2, clusters = 12). Resolutions were determined using ClusTree. The proportion of mAL types in males versus females was calculated by dividing the number of pdm3- or br-expressing mALs for each sex by the total number of fru neurons for each condition (with or without p35). To compare wild-type female mAL neurons and mAL neurons that undergo programmed cell death, first, female mAL neurons were subsetted and then neurons with a high apoptosis signature were determined by UCell using grim, rpr and skl (≥0.04). These were compared with mAL neurons with a low apoptosis signature (<0.04) using the Seurat ‘FindMarkers’ function. Differentially expressed gene analyses All differentially expressed gene analyses were performed using the ‘FindMarkers’ function with the default parameters. The differentially expressed genes were then filtered for any non-coding RNAs besides lncRNA:roX1 and lncRNA:roX2; mitochondrial genes; transposable elements; ribosomal proteins; and mod(mdg4) trans-spliced precursors. Plots were made using the ggplot2 package. CREa1B, CREa1A, cluster 0 (SMPad2_PCD), ALad1B (adPNs) and ALl1B (lPNs) marker genes were determined by comparing each of those clusters to all of the other clusters in the dataset (Supplementary Table 2). In the case of CREa1B, clusters were first split by time point, and then marker genes were found as described above (Supplementary Table 2). Categorizing TF expression (using a computational approach and FindAllMarkers) We used the FindAllMarkers function from Seurat for the differential gene expression analyses59, using the default Wilcoxon rank-sum test on log-normalized feature counts for our 55 clusters (hemilineage annotated clusters). We selected for TFs that had a minimum percentage difference (min.diff.pct) between the two populations of 50% because we were looking for positive marker TFs for our clusters, resulting in 101 TFs. The results of this analysis are included in Supplementary Table 1 (DEGs (TFs_0.5)). Categorizing TF expression (manual categorization of TF expression) For manual categorization of TF expression, we used Seurat’s ‘FeaturePlots’ function to display the expression of the 609 FlyBase TFs that were expressed in at least one cell in our integrated dataset; we split our dataset by time point to discern maturation-based changes in TF expression. We blinded ourselves to gene names, and then categorized each expression pattern as ‘lineage’ (expression in one or more, but not all, whole clusters); ‘order’ or ‘order-like’ (expression in subsets of cells within each cluster); or ‘possibly maturation’ (broad expression, varying across time points). Transcription factors that did not fit into these three simple categories were categorized as either ‘consistent’ (anything that was not differentiated across or within clusters, including near absence of expression, scattered positive cells or pan-neuronal expression); ‘lineage-confusing’ or ‘unclassified/confusing’ (usually a combination of the other axes); ‘Clk-related’ for circadian TFs co-expressed in a small Clk-expressing cluster’; ‘Dsx’ for doublesex; ‘Fru’ for fruitless; and, rarely, multiple labels. Overall, we found 112 putative hemilineage TFs, of which 89 had cluster-defining and -specific expressions without varying over other axes. We identified 35 TFs that we hypothesize reflect birth-order. Our manual descriptions of the expression patterns of each TF are provided in Supplementary Table 3. We manually added chinmo to that list of TFs, due to its known roles in temporal patterning and after re-inspection; it has a gradient, rather than binary, expression, as described in the literature100. This resulted in 36 TFs that we refer to as birth-order TFs. We focused our spatial TF analyses on the 89 TFs with simple cluster-defining expression, as described above, and we refer to them as hemilineage TFs. We note one cluster in which other aspects of patterning won out over hemilineage identity: cluster 4, which is enriched for cells expressing Imp, lov, nub, pdm2 and Kr. Most of these are well-studied early neuroblast temporal factors101,102, suggesting that this is a cluster of primary cells of mixed lineage; additional cells expressing Imp and lov joined typical hemilineage clusters. To confirm that cluster 4 was not a hemilineage, we performed RNA FISH for lov on the R19C05Pdfr-lineage trace background and found that within type I cerebral hemilineages, it labels a subset of cells per clone, not large bundles of soma (Extended Data Fig. 8e). Among the 101 computationally identified TF markers, 82 of those TFs were contained in our list of 89 hemilineage TFs. Ten were called ‘lineage-weird’, and the rest were fru, vri (clk-related) or birth-order TFs. The hemilineage codes in Supplementary Table 1 were determined by filtering the differentially expressed genes identified by Seurat (Supplementary Table 2; all DEGs) for our list of manually identified hemilineage transcription factors. Lineage variability and temporal dynamicity scores We also computationally assigned each gene in our dataset a lineage variability score and a temporal dynamicity score (Extended Data Fig. 7u). These scores were calculated using code generously shared by S. Jain and implemented similarly44: we converted our cells into pseudobulk RNA-seq datasets on the basis of their cluster identity and time (cluster 1, 12 h APF; cluster 1 48 h APF, and so on) by aggregating the expression of counts according to cluster and time (AggregateExpression)59. The lineage-variability score was calculated by determining the variance in gene expression across lineages within either time point when the gene was expressed, taking the maximum of those two scores, and then normalizing it by the average expression across cell types at the relevant time point. The temporal dynamicity score was calculated by taking the absolute difference between our 12 h and 48 h time points for each of our hemilineages or clusters in which the gene was expressed, and the averaged value across clusters was then normalized by the average of the peak expression. For a gene to be considered expressed it had to have an aggregated expression level of over 0.2. Both scores had their mean centred to 0 and were transformed to the natural logarithm scale for visualization. Heatmaps Heatmaps were made using the ComplexHeatmap package in R in Extended Data Fig. 5 (ref. 103). We identified protein domains enriched within the 89 hemilineage TFs and 36 birth-order TFs using DAVID Bioinformatics Functional Annotation Tool and FlyBase104–106. The plots in Fig. 3b,b′ were made by subsetting neurons that express (expression level > 0) either br, pdm3 or mamo but not the other two (expression level == 0). Pairwise Pearson correlation coefficients between the 36 birth-order TFs (Imp, Syp and fru) based on 12 h APF expression data were computed (cor, method = pearson), and values were hierarchically clustered and visualized using ggcorplot in Fig. 3d. For visualization, Imp was manually set as the first value in an attempt to order cells on the basis of their birth order. We used the UCell package107 to calculate the gene set enrichment scores at the single-cell level of the following genes: (1) VAChT, DAT, VGlut, Gad1; (2) fru; and (3) rpr, skl and grim. We used the scores to assign our pseudobulk clusters a neurotransmitter identity, whether it is sexually dimorphic on the basis of fru expression, and an apoptosis score. The ranking in UCell uses the Mann–Whitney U statistic. Variance across versus within clusters versus across time We calculated the variance in expression for each TF across our pseudobulk clusters grouped by either cluster or time. Median cluster variance was calculated by finding the variance in expression for each TF for each cluster and taking the median value for each TF. Generation of fly alleles fruMiMIC[mcherry] (fru-mCherry) The fruMiMIC[mcherry] flies were made via recombinase-mediated cassette exchange (RMCE) performed by Rainbow Transgenic Flies, with the pBS-KS-attB1-2-GT-SA-mcherry-SV40 vector ordered from the Drosophila Genomics Resource Center108. The DNA was prepared with a Qiagen Plasmid Midi Kit and injected into the original fru[MI05459] line109. Transformants were crossed to yw double-balancer flies and were screened for loss of y+ over the third balancer. As the swap-in construct can incorporate in either direction, we screened F1 progeny of animals positive for loss of the original MiMIC allele for fru-mCherry expression using our two-photon microscope (mCherry has a poor two-photon excitation profile, but we captured the edge of its one-photon excitation using illumination of approximately 700 nm). Fer1-T2A-Gal4 The Fer1-T2A-GAL4 construct was made using CRISPR/Cas9 homology-directed repair as described in a past work110. The donor cassette was designed to have homology arms of about 1 kb flanking the stop codon (5′ PAM silently mutated, 3′ PAM deleted) with the T2A-GAL4 sequence, taken from Addgene no. 125211 (ref. 111), immediately preceding the stop codon. The donor construct was synthesized and cloned into pBluescript II SK(–) by GENEWIZ from Azenta Life Sciences. Two Fer1 gRNA sequences were generated, as listed in the ‘Oligonucleotides’ section (Supplementary Table 9), and each was synthesized as overlapping primers and annealed to generate dsDNA with BbsI overhangs. Each guide (5′ and 3′) was cloned into pU6-BbsI-chiRNA, generating 5′ and 3′ Fer1 gRNA plasmids. These two plasmids, together with the homology-directed repair donor, were cleaned and injected into y,sc,v; nos-Cas9; +/+ (ref. 112) by Rainbow Transgenic Flies. Injected flies were crossed to double balancers and their progeny were screened by PCR genotyping of amputated legs using the primers listed in the ‘Oligonucleotides’ section (Supplementary Table 9). Histology and microscopy Brain dissection and two-photon imaging Brains were dissected in external saline (108 mM NaCl, 5 mM KCl, 2 mM CaCl2, 8.2 mM MgCl2, 4 mM NaHCO3, 1 mM NaH2PO4, 5 mM trehalose, 10 mM sucrose and 5 mM HEPES at pH 7.5, with the osmolarity adjusted to 265 mOsm). For two-photon imaging, brains were then transferred fresh to 35 mm imaging dishes and pinned to sylgard squares with tungsten wire. Ex vivo two-photon imaging was performed on a Bruker Investigator using a 1.0 NA, 20× water-dipping objective. Stacks were collected along the anterior–posterior axis with 1 μm spacing in z and variable resolution in x and y. Immunostaining and confocal microscopy For immunostaining, after dissections brains were transferred to paraformaldehyde in PBS. Brains were fixed overnight at 4 °C in 1% PFA in PBS, or for 25 min at room temperature in 4% PFA in PBS. In general, the 4% PFA method preserves cellular structures better, whereas the 1% PFA method allows better antibody penetration. After same-day (4%) or overnight (1%) fixation, brains were washed three times in PBS supplemented with 0.1% Triton-X-100 on a shaker at room temperature; they were then blocked for at least 1 h in PBS, 0.1% Triton and 4% normal goat serum, and then incubated for at least two nights in primary antibody solution, diluted in PBS, 0.1% Triton and 4% normal goat serum. Primary antibodies were washed three times in PBS supplemented with 0.1% Triton-X-100 on a shaker at room temperature; the brains were then incubated in secondary antibodies for at least two nights, diluted in PBS, 0.1% Triton and 4% normal goat serum. DAPI (1 mg ml–1) was included in secondary antibody mixes. Antibody information can be found in Supplementary Table 8. Brains were mounted in 1× PBS, 90% glycerol supplemented with propyl gallate or SlowFade mounting medium in binder reinforcement stickers sandwiched between two coverslips. Samples were stored at 4 °C in the dark before imaging. The coverslip sandwiches were taped to slides, allowing us to perform confocal imaging on one side of the brain and then flip over the sandwich to allow a clear view of the other side of the brain. Scanning confocal stacks were collected along the anterior–posterior axis on a Leica SP8 with 1 μm spacing in z and an axial pixel size of about 150 nm, using a 40×, 1.3 NA oil immersion objective. The z dimension corresponds to anterior to posterior dimension of the central brain. For Extended Data Fig. 9h,j, brains were stained and imaged as described in a past work113. IHC with DPX mounting In some cases, we sought to improve tissue clarity in IHC experiments using distyrene plasticizer xylene (DPX) mounting. To do this, brains were dissected in dissection saline, and then fixed in cold 4% PFA in PBS for 25 min. Following fixation, brains were washed three times with 0.1% PBS containing 0.1% Triton-X-100 (PBST), and then mounted onto a poly-l-lysine-coated coverslip. Blocking, primary antibody incubation and secondary antibody incubation were performed as described above. After secondary antibody incubation, the samples were washed with 0.1% PBST three times, and then post-fixed with 4% PFA for 2 h at room temperature. After post-fixation, PFA was removed, and samples were washed four times with 0.1% PBST. The tissues were then dehydrated through a graded ethanol series (30%, 50%, 75%, 95% and 2 × 100%), with each step lasting 5 min. This was followed by three washes in xylene (5 min each). Finally, samples were mounted onto glass slides using DPX mounting medium. Mounted slides were air-dried for at least two days at room temperature before confocal imaging; they were then stored at room temperature. Hybridization chain reaction RNA FISH RNA FISH experiments were performed as described in a past work114, using hybridization chain reaction (HCR) probe-sets, hairpins and reagents (Molecular Instruments)114,115. Brains were dissected in Schneider’s Drosophila medium and fixed in cold 4% paraformaldehyde in PBS for 20 min at room temperature. Brains were rinsed three times at room temperature in PBS supplemented with 1% Triton-X-100. Samples were pre-hybridized in prewarmed probe hybridization buffer (Molecular Instruments) for 10 min at 37 °C and then incubated with HCR probes in probe hybridization buffer overnight at the same temperature. The next day, they were washed with pre-heated probe wash buffer (Molecular Instruments) and then washed twice in 5× sodium chloride sodium citrate supplemented with 0.1% Tween-20 (SSCT). Samples were then pre-amplified in amplification buffer (Molecular Instruments) for 10–30 min at room temperature and then incubated with snap-cooled HCR hairpins (heated to 95 °C for 90 s before being placed in the dark at room temperature for at least 30 min) in the dark overnight at room temperature. Before washing the brains, 300 μl 5× SSCT was added to the samples to make the solution less viscous. The brains were then washed three times at room temperature first in 5× SSCT, then in probe wash buffer (Molecular Instruments) and then again in 5× SSCT. The brains were then rinsed once in nuclease-free PBS to remove any detergent and then were mounted in 1× PBS, 90% glycerol supplemented with propyl gallate and imaged as described above. In some cases, RNA FISH experiments were performed as described in ref. 116. Combined RNA FISH and immunohistochemistry RNA FISH and immunohistochemistry experiments were performed as described in a past work117 using Molecular Instruments HCR probe-sets, hairpins and reagents117. The protein detection stage was first, with care to avoid introducing RNases into the solutions. Brains were dissected in external saline (108 mM NaCl, 5 mM KCl, 2 mM CaCl2, 8.2 mM MgCl2, 4 mM NaHCO3, 1 mM NaH2PO4, 5 mM trehalose, 10 mM sucrose, 5 mM HEPES pH7.5 and osmolarity adjusted to 265 mOsm) and fixed in 4% paraformaldehyde in PBS for 25 min at room temperature. Brains were then washed three times with PBS supplemented with 0.1% Triton-X-100 at room temperature, blocked in antibody buffer (Molecular Instruments) at 4 °C for around 4 h, and then incubated overnight at 4 °C in primary antibody solution in antibody buffer (Molecular Instruments). Samples were then washed four times in PBS supplemented with 0.1% Triton-X-100 at room temperature and incubated in secondary antibody solution made in Antibody Buffer (Molecular Instruments). For some experiments we used the Molecular Instruments initiator labelled secondary antibody to amplify GFP signal (donkey anti-rabbit-B4 for use with amplifier B4) and in other cases we used standard secondary antibodies (goat anti-rabbit-488). Samples were incubated at room temperature for 3 h; they were then washed five times in PBS supplemented with 0.1% Triton-X-100 and once in 5 × SSCT, both at room temperature. Samples then were then post-fixed in 4% paraformaldehyde for 10 min at room temperature, washed twice in PBS supplemented with 0.1% Triton-X-100, and then twice in 5 × SSCT. Samples were then pre-hybridized in probe hybridization buffer for 30 min at 37 °C and then put into a probe mixture made in probe hybridization buffer and incubated at 37 °C overnight. Samples were then washed four times in probe wash buffer at 37 °C and then again in 5 × SSCT at room temperature. Samples were then preamplified in Amplification Buffer (Molecular Instruments) for 10–30 min at room temperature and then incubated with snap-cooled HCR hairpins (95 °C for 90 s and then placed in the dark at room temperature for at least 30 min) in the dark overnight at room temperature. The brains were then washed in 5 × SSCT at room temperature for: (1) 2 × 5 min; (2) 2 × 30 min; and (3) 1 × 5 min. The samples were then mounted as described above. Alternatively, for R19C05Pdfr clonally labelled brains, we found that GFP was visible after RNA FISH even without immunostaining enhancement. Thus for some RNA FISH experiments on this genetic background, we conducted RNA FISH with care to keep the samples dark, and then imaged enduring native GFP fluorescence to visualize clones. The following antibodies were used: rabbit anti-GFP (Thermo Fisher Scientific, 1:250 or 1:400), chicken anti-GFP (Dawen Cai lab, 1:5000), rat anti-RFP (Chromtek, 1:400), mouse anti-Br (DSHB, 1:100), guinea pig anti-Mamo (Desplan Lab, 1:200), rat anti-Pdm3 (Desplan Lab, 1:800), guinea pig anti-Otp (Walldorf Lab, 1:400), rat anti-fd59A (Skeath Lab, 1:500 or 1:1,000), mouse anti-ChAT (DSHB, 1:200), rabbit anti-GABA (Sigma, 1:500), mouse anti-nc82 (DSHB, 1:30), guinea pig anti-TfAP-2 (Desplan Lab, 1:100), mouse anti-Acj6 (DSHB, 1:50) and guinea pig anti-Fer2 (1:400, Desplan Lab). Catalogue numbers and references are listed in Supplementary Table 8. Dye filling of mAL neurons Dye filling of mAL neurons was performed as previously described27,118. Dye filling electrodes were pulled using a Brown–Flaming puller (Sutter Instruments) and were guided to the mAL axonal tract using fru-GFP. Voltage pulses (50 V pulses, 0.5 ms) were used to electroporate dye into the cells. Image analysis and statistical considerations The sexes were separated across experimental conditions because mAL neurons are sexually dimorphic. To count cell populations, we used genetically encoded fluorescence or antibody staining as indicated. We counted labelled somata in every third slice in the stack (every third micron along the anterior–posterior axis), with reference to DAPI to distinguish individual cells from one another. Effect of mutations on axons and dendrites were done in a binary fashion due to the overt changes on brain structures induced by our manipulations, which also made it difficult for the researchers performing quantification to be blinded to experimental conditions. However, analysis was performed blind to the goals of the experiment when possible. Figure drawings Drawings of male and female mAL neurons and mlSEZt neurons in Figs. 1a, 2d and 5h were inspired by drawings in a past work119; drawings of their cousins were inspired by CREa1 twin-spot clone data in another past work18. The circuit map in Fig. 1a was inspired by a work by Clowney and co-workers27. Images of hemilineages in Figs. 1a and 2j and Extended Data Fig. 6a,b were screenshotted from Codex (https://codex.flywire.ai) or made using Navis from FAFB dataset15,120–122. FlyWire’s public release data is made available under license CC BY-NC 4.0. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Online content Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41586-026-10526-3. Supplementary information Supplementary Tables 5–14 and references. Reporting Summary Hemilineage relationships and assignment to transcriptional clusters. Differential gene expression analyses related to hemilineage and birth order factors. Categorization of TF roles in developing cerebral neurons. Differential gene expression analyses related to mAL neurons. Peer Review file Source data Source Data Fig. 4 and Extended Data Fig. 9 Source Data Extended Data Fig. 2 Acknowledgements We thank T. Lee, H. Lacin, Y.-C. D. Chen, M. N. Özel, T. Erclik, M. Syed, J. Skeath and U. Walldorf for developing and sharing critical fly alleles, composite genotypes and antibodies, without which this work would not have been possible; we also thank the Bloomington Drosophila Stock Center. M. Brovkina provided conceptual and technical input. V. Sikora collected mlSEZt images. FAC-sorting was performed with K. Saiya-Cork in the BRCF Flow Cytometry Core. Library preparation and next-generation sequencing was performed in the Advanced Genomics Core at the University of Michigan. E.J.C. and N.A.E. disclose support from the University of Michigan Advanced Genomics Core, the UM Single Cell Spatial Analysis Program and the National Cancer Institute (award no. P30CA046592) by the use of the following Cancer Center Shared Resource: the Single Cell and Spatial Analysis Shared Resource. N.A.E. discloses support for the research of this work from the National Institute of Neurological Disorders and Stroke (grant no. DSPAN F99NS139459) and National Institute of General Medical Sciences (CMB T32 award nos. GM145470 and GM007315). E.J.C. discloses support for the research of this work from the National Institute on Deafness and Other Communication Disorders (grant no. R01DC018032), McKnight Endowment Fund for Neuroscience (Scholar Award), Pew Charitable Trusts (Biomedical Scholar Award) and the University of Michigan (startup funds). T.R.S. discloses support for the research of this work from the National Science Foundation (grant no. IOS-1845673). Extended data figures and tables Author contributions N.A.E. and E.J.C. conceived and supervised the study, acquired funding and wrote the original manuscript. T.R.S. discovered a role of dsf in the development of CREa1-lineage neurons. All experiments and analyses were performed by N.A.E. with contributions of Y.L., Y.P. and J.A.C. as follows: J.A.C. generated the Fer1-T2A-GAL4 allele and assisted with animal husbandry for scRNA-seq experiments; Y.P. lead the census of lineages labelled by our lineage trace and identified ectopic tracts present in apoptosis-blocked lineages; and Y.L. developed the RNA FISH approach and contributed RNA FISH and other histology experiments. N.A.E., E.J.C., Y.L. and Y.P. contributed to matching morphological hemilineages to transcriptional clusters. N.A.E. prepared the figures with help of all authors. All authors revised the figures and manuscript. Peer review Peer review information Nature thanks Claude Desplan, Ellie Heckscher and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available. Data availability Raw and processed sequencing data and the final Seurat object are available in GEO (GSE298900). Source data are provided with this paper. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Extended data is available for this paper at 10.1038/s41586-026-10526-3. Supplementary information The online version contains supplementary material available at 10.1038/s41586-026-10526-3. References Associated Data Supplementary Materials Supplementary Tables 5–14 and references. Reporting Summary Hemilineage relationships and assignment to transcriptional clusters. Differential gene expression analyses related to hemilineage and birth order factors. Categorization of TF roles in developing cerebral neurons. Differential gene expression analyses related to mAL neurons. Peer Review file Source Data Fig. 4 and Extended Data Fig. 9 Source Data Extended Data Fig. 2 Data Availability Statement Raw and processed sequencing data and the final Seurat object are available in GEO (GSE298900). Source data are provided with this paper.