Main

The brain is an information processing network comprising a set of nodes interconnected with sophisticated wiring patterns. Superimposed on this anatomical infrastructure are genetically encoded molecular machines that mediate cellular processes, shaping the neural circuit dynamics underlying cognition and behaviour. Historically, brain organization has been explored using different techniques at descending levels of granularity: grey matter regions (macroscale), cell types (mesoscale), individual cells (microscale) and synapses (nanoscale)1. MRI and classic anatomical tracing have produced macroscale connectomes in human2 and other mammalian brains3,4,5, providing a panoramic—but still coarse—view of organizational principles for further exploration6. An essential step toward a comprehensive understanding of brain function is to establish a structural framework with cellular resolution on which multi-scale and multi-modal information spanning molecules, cells, circuits and systems can be registered, integrated, interpreted and mined.

Several recent technical advances together enable large-scale mapping of mammalian brain circuits with cellular resolution. High-throughput single-cell RNA-sequencing efforts are creating transcriptomic cell-type censuses for multiple brain regions7. These data contribute to the development of genetic toolkits enabling reliable experimental access to an increasingly large set of molecularly defined cell types8. Continued innovations in volumetric light microscopy enable automated high-resolution imaging of cells and single axons across entire rodent brains. With computational advances in image processing, machine learning and management of large (terabyte) volume image datasets9, and with the construction of 3D common coordinate framework (CCF) brain atlases that serve as a unified anatomical reference brain for cross-modal data integration10, new datasets will contribute to revealing general organizational principles of brain architecture at all scales.

Recognizing this emerging opportunity, the BICCN established a multi-laboratory collaboration with the goal of systematically classifying neuron types and mapping multi-scale connectivity in the mouse brain. As a first step, we focused our combined efforts on the MOp-ul. We applied expertise in cell-type-targeted genetic and viral labelling, high resolution whole-brain imaging, barcoded anatomy resolved by sequencing (BARseq)-based projection mapping11, complete single-neuron morphological reconstruction, and state-of-the-art neuroinformatic methods for CCF registration. We derived a comprehensive, projection neuron (PN) type-based wiring diagram of the mouse MOp-ul that will facilitate future analyses of motor control infrastructure across molecular, cellular and systems levels. This exemplar brain structure provides a roadmap towards a cellular description of mammalian whole-brain architecture and the multi-scale connectome.

Results

We established an integrated cross-laboratory anatomical analysis platform comprising myriad technologies, tools, methods, data analyses, visualizations and web-based portals for open access to data and tools3,4,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 (Extended Data Fig. 1, Methods). Structure abbreviations are defined in Supplementary Table 1 and specific mouse lines in Supplementary Table 2.

MOp-ul borders and cell types

The spatial location of rodent primary motor cortex (MOp) has been defined by cytoarchitecture, micro- or optogenetic- stimulation28 and anatomical tracing29,30, yet discrepancies remain, including between standard 2D and 3D mouse brain reference atlases10,31,32,33. Here, we first defined the MOp-ul borders in 3D using a collaborative workflow with multimodal data co-registered and cloud-visualized26,27 at full resolution for joint review, delineation and reconciliation (Fig. 1a, Supplementary Video 1; datasets can be viewed at https://viz.neurodata.io/?json_url=https://json.neurodata.io/v1?NGStateID=LwZ24nSZk1JTHw).

Fig. 1: Delineation of the MOp-ul region and its cell-type organization.
figure 1

a, Brains with different anatomical labelling modalities (Nissl-stained: n = 3; AAVretro-labelled cervical spinal projecting neurons: n = 2; Cre reporter expression, n = 1 for Vglut1 and Vglut3) were co-registered in the CCF average template and viewed in Neuroglancer to facilitate delineation of MOp-ul borders. b, MOp-ul delineation based on combinatorial Nissl-stained cytoarchitecture (left) (Extended Data Fig. 2) and regional and laminar distributions of AAVretro labelling and Cre expression (middle). A triple-injection strategy was used to further validate distinctive projections of MOp-ul versus adjacent SSp-ul and MOs (right, n = 3 for each injection). AAV-RFP (red), PHAL (pink) and AAV-GFP (green) were injected into the MOs, MOp-ul and SSp, respectively (inset, right), revealing mostly non-overlapping terminal fields in the thalamic nuclei, mediodorsal nucleus (MD), CL, PCN and PO (Extended Data Fig. 5). Scale bars, 500 µm. c, The MOp-ul was rendered in 3D within the CCF. d, Left, schematic showing classification of cortical projection neuron types based on their laminar positions, projection neuron class (IT, PT and CT), and specific projection targets. Right (top), analysis of the MOp-ul layer organization by hierarchical clustering of soma depth for retrogradely labelled cells and Cre driver data (Extended Data Fig. 3). Bottom, clustering dendrogram based on MOp-ul soma depth grouped every 25 µm. ACA, anterior cingulate area; MY, medulla; RN, red nucleus.

MOp-ul shares its lateral border with the primary somatosensory area (SSp); seen in Nissl- and NeuroTrace-stained sections as a transition from larger layer 5 (L5) somas in MOp to smaller somas in the SSp cell-sparse L5a and cell-dense L5b sublayers (Fig. 1b, Extended Data Figs. 2a, b; see also the Allen Reference Atlas33 (ARA) and http://brainmaps.org). MOp is classically described as agranular cortex, but we identified a ‘granular’ L4, with densely packed small somas throughout primary (MOp) and secondary (MOs) motor cortex, albeit narrower than in SSp (Fig. 1b, Extended Data Fig. 2b; see also algorithmic analysis of MOp–SSp border, revealing individual variations between animals in Extended Data Fig. 2c, d, Supplementary Information).

Next, we used neuron-type distribution and long-range projection patterns in determining areal delineations3,10,20,31. The density of VGluT1 (also known as Slc17a7)-positive neurons corroborated the transition of L4 and L5 at the MOp–SSp border (Fig. 1a, b, Supplementary Video 2), and VGluT3+ neurons highlighted the MOp-ul–MOs medial border (Fig. 1a, b). Lateral and medial borders were further delineated by adeno-associated virus (AAV)-based axonal labelling from SSp upper limb area (SSp-ul) to MOp-ul, and from ventrolateral orbital area (ORBvl) or dorsal retrosplenial area (RSPd) to MOs3 (Extended Data Fig. 3a). Rostro-caudal borders were defined using AAVretro tracing from the cervical (to delineate upper limb) or lumbar (to delineate lower limb) spinal cord (Fig. 1b, Extended Data Figs. 3b, c, 4, Supplementary Video 1). This revealed two adjacent clusters of cervical spinal cord-projecting neurons: a medial cluster in MOp L5 (projecting to the intermediate and ventral horn) and a lateral cluster underneath SSp L4 (projecting to the dorsal horn) (Fig. 1b, Extended Data Figs. 4, 5i). Finally, the MOp-ul borders were further validated using triple anterograde labelling. Injecting AAV-RFP, Phaseolus vulgaris leucoagglutinin (PHAL) and AAV-GFP into MOs, MOp-ul and SSp, respectively, revealed topographically organized, discrete terminal fields in different brain structures (Fig. 1b, Extended Data Fig. 5).

MOp-ul borders were drawn on the CCFv3 average template10 using Neuroglancer to render a 3D volume aligned with other 3D histological data (Fig. 1c, Extended Data Fig. 2e, Supplementary Video 2). To facilitate integration with existing atlases, we also imported ARA33 and Franklin–Paxinos32 delineations onto the Allen CCFv3 (Extended Data Fig. 2f, Supplementary Information).

Using the new MOp-ul volume delineation as a region of interest, we precisely mapped cell type distributions for several genetically identified cell populations, for example, glutamatergic (VGluT1+), GABAergic (γ-aminobutyric acid-producing) (GAD2+) neurons, major GABAergic subpopulations, and other Cre driver-based populations12,20 (Extended Data Fig. 3d).

Laminar organization of neuron types

The traditional parcellation of cortex into 6 or 8 layers is based largely on cytoarchitecture34, developmental evidence35 and long-range projection patterns36. Cortical PNs comprise three broad classes: (1) intratelencephalic (IT), primarily targeting cortex and striatum with somas in L2–L6; (2) pyramidal tract (PT) (also known as extratelencephalic (ET)), projecting to lower brainstem and spinal cord with somas in L5; and (3) corticothalamic (CT), projecting to the thalamus with somas in L637. To examine the finer-scale relationship between PNs and soma distribution across layers in MOp-ul, we injected classic retrograde (fluorogold and cholera toxin B subunit (CTB)) and rabies viral tracers into 15 known MOp targets in cortex, contralateral caudoputamen (CP), thalamus, midbrain, pons, medulla and spinal cord (Fig. 1b, Extended Data Figs. 3b, c, 7). Labelled MOp-ul PNs were classified according to soma position and projection target (Fig. 1d, Extended Data Fig. 3b, c, 7), and included 16 types of IT, 7 types of ET and 3 types of CT neurons. These experiments also revealed a more refined laminar organization than previously appreciated, with the 26 PN subtypes spanning 11 newly delineated layers and sublayers (1, 2, 3, 4, 5a, 5b-superficial, 5b-middle, 5b-deep, 6a-superficial, 6a-deep and 6b) (Fig. 1d). This connectivity-based manual delineation was confirmed computationally with hierarchical clustering on the spatial locations of the retrogradely labelled PN somas (Fig. 1d) and corroborated with Nissl-stained cytoarchitecture and gene expression-based cell type distributions (Extended Data Fig. 6).

Of note, we found several novel IT types: (1) temporal association area (TEa)-projecting neurons in L2 and L5, which generate symmetrical or asymmetrical projections to the two hemispheres; (2) MOs- and SSp-projecting neurons in L4; and (3) ipsilateral projecting neurons in L6b (Extended Data Fig. 7). As these PN types were defined on the basis of single-target retrograde tracing, we validated collateral projections in a subset of types using Cre-dependent, target-defined AAV anterograde tracing (Extended Data Fig. 8a). This method revealed several notable findings (Extended Data Fig. 8b, c): both L5a and L5b IT neurons generate bilateral cortical projections. However, L5a IT neurons preferentially innervate ipsilateral CP, whereas L5b IT neurons generate dense bilateral CP projections. Furthermore, axonal terminals of L5b IT neurons are densely clustered into one specific CP domain13, whereas those arising from the L5a IT neurons spread diffusely into other CP domains.

Visual inspection of gene or transgene expression by in situ hybridization12,38,39 also revealed many notable, distinct laminar distribution patterns in MOp (Extended Data Fig. 9).

Outputs of MOp-ul

Axonal projections from rodent motor cortex have been studied extensively37,40,41,42,43. However, it is challenging to directly compare these independently generated data, as they exist in different spatial frameworks. We integrated our datasets in CCF to map the output of MOp-ul at regional and cell-type levels. First, we labelled the overall MOp-ul output patterns with PHAL3,13. MOp-ul projects to more than 110 targets in brain and spinal cord, with approximately 60 receiving moderate to dense innervation (Extended Data Figs. 5, 10, Supplementary Information). Second, we mapped projections from L2/3, L4, L5 IT, L5 ET and L6 CT PN types with Cre-dependent viral tracers in lines selective for these cell types4,17 (Fig. 2a, b). Synaptic innervation of targets (versus passing fibres) was also confirmed in a subset of experiments using two alternative viral tracing methods (Extended Data Fig. 11).

Fig. 2: Brain-wide MOp-ul projection patterns by layer and class.
figure 2

a, Key shows tracer types, mouse lines and layer and projection class selectivity for Cre driver lines used to label axons from MOp neurons. Numbers in brackets represent the number of tracer injection experiments per type. Symbols and colour code are used in bd. b, Injection sites are plotted on a top-down view of the right cortical hemisphere from CCFv3 with the MOp-ul delineation from Fig. 1 in white. Distance between injection sites is 443.0 ± 185.04 μm (mean ± s.d.). c, A directed, weighted connectivity matrix (15 × 628) from MOp to 314 ipsilateral and 314 contralateral targets for each of the fifteen mouse lines or tracers listed in a. Each row shows the fraction of the total axon measured from a single experiment or the average when n > 1. Rows are ordered by major brain division. For AAV1-Cre monosynaptic tracing, known reciprocally connected regions are coloured grey. We performed hierarchical clustering with Spearman rank correlations and complete linkages, splitting the resulting dendrogram into four clusters. AAV1-Cre was not included in the clustering owing to the many excluded regions. A subset of target regions is indicated. The colour map ranges from 0 to 0.01 and the top of the range is truncated. d, Schematic summarizing all major MOp outputs by area, layer and projection class on a whole-brain flat map (Extended Data Fig. 14). ACB, nucleus accumbens; AUD, auditory area; BAC, bed nucleus of the anterior commissure; CB, cerebellum; cc, corpus callosum; CLA, claustrum; DN, dentate nucleus; ENTl, entorhinal area, lateral part; FN, fastigial nucleus; GP, globus pallidus; GRN, gigantocellular reticular nucleus; GU, gustatory areas; HY, hypothalamus; HPF, hippocampal formation; IO, inferior olivary complex; IP, interposed nucleus; IRN, intermediate reticular nucleus; IZp, spinal cord intermediate zone; MARN, magnocellular reticular nucleus; MDRNd, medullary reticular nucleus, dorsal part; MOp-ll, primary motor area, lower limb; MOp-tr, primary motor area, trunk; OLF, olfactory areas; ORB, orbital area; PL, prelimbic area; POST, postsubiculum; PPN, pedunculopontine nucleus; PRNc, pontine reticular nucleus, caudal part; RE, nucleus of reuniens; RR, midbrain reticular nucleus, retrorubral area; SCm, superior colliculus medial zone; sp, spinal cord; SI, substantia innominata; SNr, substantia nigra, reticular part; SPVO, spinal nucleus of the trigeminal, oral part; SSp-ll, primary somatosensory area, lower limb; SSp-m, primary somatosensory area, mouth; SSp-tr, primary somatosensory area, trunk; STN, subthalamic nucleus; TTd, taenia tecta, dorsal; VTA, ventral tegmental area; ZI, zona incerta.

Source data

We quantified labelled axons in 314 ipsilateral and contralateral grey matter regions in CCFv310, creating a weighted connectivity matrix to visualize brain-wide projection patterns (Fig. 2c, Source Data Fig. 2). Outputs from MOp-ul predominantly target isocortex, striatum and thalamus (44.9, 29.0 and 8.1% of total axon density, respectively) with less axon in midbrain, medulla and pons (Extended Data Fig. 13d). Cre-defined projection mapping revealed distinct components of the regional output pathway (Fig. 2c, Extended Data Figs. 12, 13a, 14). Projections in Sepw1-L2/3, Cux2-L2/3, Nr5a1-L4, Scnn1a-L4/5, Plxnd1-L2/3 + L5, and Tlx3-L5 were restricted to isocortex and CP, the defining IT feature. Projections in Sim1-L5 and Fezf2-L5/6 were predominantly subcortical, consistent with the ET classification. Projections in Ntsr1-L6 and Tle4-L6 targeted thalamic nuclei, reflective of CT. Several Cre lines labelled multiple PN classes, for example, IT and ET in Rbp4-L5 (Fig. 2a, c, Extended Data Fig. 12).

We performed unsupervised hierarchical clustering on the basis of connectivity weights in all brain regions and identified four main clusters (Fig. 2c). Cluster 1 comprised all experiments with L5 ET cells, including PHAL, AAV-GFP and Rbp4-L5 IT/ET. Cluster 2 contained L6 CT projections, that is, Ntsr1-L6 and Tle4-L6. Clusters 3 and 4 contained IT PN types: Cux2-L2/3, Tlx3-L5 and Plxnd1-L2/3 + L5 in cluster 3, and Sepw1-L2/3, Nr5a1-L4 and Scnn1a-L4 in cluster 4. Clustering confirmed the visual classification of anterograde tracing into expected major PN types, but notable differences do exist in the relative fraction of total projections per structure between lines in the same cluster (for example, Tle4-L6 versus Ntsr1-L6; Extended Data Fig. 13d, left). Our integrated analyses revealed a comprehensive PN type-based output projection map of the MOp-ul (Fig. 2d, Extended Data Fig. 14).

Inputs to MOp-ul

Next we mapped brain-wide inputs to MOp at region and cell-type levels from three types of tracing experiments (Fig. 3a, b): (1) injection of CTB (Extended Data Figs. 7, 10, 15) in wild-type mice; (2) injection of Cre-dependent monosynaptic rabies viral tracers in the Cre lines described above plus three interneuron-selective lines (Pvalb, Sst and Vip); and (3) a modified tracing the relationship between input and output (TRIO) strategy combining AAVretro-Cre with monosynaptic rabies viral tracing to reveal inputs to projection target-defined neuron types44 (Extended Data Fig. 16a). CTB tracing revealed the overall set of input areas projecting to MOp-ul, including somatomotor cortical regions (MOp, SSp, supplemental somatosensory area (SSs) and MOs) and related thalamic nuclei (ventral anterior–lateral complex (VAL), parafascicular nucleus (PF), posterior complex (PO) and ventral medial nucleus (VM)) (Extended Data Figs. 10, 15). Monosynaptic rabies tracing from Cre- and target-defined neurons showed highly similar global input patterns (Extended Data Figs. 13b, 15, 16a). Notably, rabies viral tracing labelled inputs to MOp-ul from pallidal (globus pallidus, external segment (GPe), globus pallidus, internal segment (GPi) and central amygdalar nucleus, capsular part (CEAc)) and other subcortical regions (superior central nucleus raphe (CS) and dorsal raphe (DR)) not seen with CTB (Extended Data Fig. 15).

Fig. 3: Brain-wide inputs to MOp-ul by layer and class.
figure 3

a, Key shows tracer types, mouse lines and layer and projection class selectivity for Cre driver lines used to label inputs to MOp neurons. Numbers in brackets represent the number of tracer injection experiments per type. Symbols and colour code are used in bd. b, Injection sites are plotted on a top-down view of the right cortical hemisphere from CCFv3 with the MOp-ul delineation from Fig. 1 in white. Distance between injection sites is 622.4 ± 337.01 μm (mean ± s.d.). c, A directed, weighted connectivity matrix (26 × 628) to MOp from 314 ipsilateral and 314 contralateral targets for each of the mouse lines or tracers listed in a. Each row shows the fraction of the total input signal measured from a single experiment or the average when n > 1. Rows are ordered by major brain division. We performed hierarchical clustering with Spearman rank correlations and complete linkages, splitting the resulting dendrogram into two major clusters (rabies + CTB and TRIO experiments). A subset of input regions is indicated. The colour map ranges from 0 to 0.01 and the top of the range is truncated. d, Schematic summarizing major MOp inputs by area (red), layer (L5 IT Tlx3+ neurons, green), and target-defined projection class (CP-projecting neurons, blue) on a whole-brain flat map. The sizes of dots represent relative connectivity strength. AId, agranular insular area, dorsal part; AM, anteromedial nucleus; AUDv, ventral auditory area; bfd, barrel field; CEAl, central amygdalar nucleus, lateral part; CM, central medial nucleus of the thalamus; inh, inhibitory; LHA, lateral hypothalamic area; NDB, diagno band nucleus; proj, projecting; RSP, retrosplenial area; Ssp-bfd, primary somatosensory area, barrel field; VPL, ventral posterolateral nucleus of the thalamus.

Source data

Labelled inputs to MOp-ul were quantified across the entire brain in each CCFv3 region to create a weighted connectivity matrix (Fig. 3c, Source Data Fig. 3). Input arises mostly from cells in isocortex and thalamus (90.1%, 7.7%, respectively; Extended Data Fig. 13f, pie chart). Consistent with visual observation of highly similar brain-wide input patterns, unsupervised hierarchical clustering revealed only two main clusters (Fig. 3c). The first (larger) cluster comprised CTB and most Cre line rabies tracing datasets. The second cluster comprised all TRIO experiments and one Cre-dependent experiment (Foxp2-L6). The clusters differed significantly in in-degree (average n = 91 versus 30 input regions, P < 0.0001, two-tailed t-test), suggesting that on average a more restricted set of inputs is labelled from target-defined projection classes.

Together, our data suggest that the sets of regions providing input to Cre- and target-defined MOp-ul neuron types are similar, a surprising result given distinct axonal lamination patterns from cortical and thalamic sources17,45 (Extended Data Fig. 16b). This result is nonetheless consistent with other recent findings that global input patterns mapped with rabies tracer methods are independent of starter cell type46. These results do not exclude the possibility of distinct presynaptic neuron types within a source area projecting to specific types within MOp. Notably, all input sources to MOp were also projection targets, indicating prevalent reciprocal areal connections with comparable strengths (Extended Data Fig. 10). In summary, integrated analyses of retrograde tracing experiments revealed a consensus brain-wide input map to MOp-ul (Fig. 3d).

To relate regional inputs and soma layer to single-cell morphology, we compared dendritic arbors of superficial (L2/3/4) and deep (L5) MOp pyramidal cells (Extended Data Fig. 17a–e): L5 neurons have larger and more complex basal trees, whereas superficial neurons have a greater proportion of their dendritic length distal from the soma.

BARseq projection mapping

Cre driver line and target-defined tracing resolves PNs to subpopulations. These methods do not achieve single-cell resolution and require injections in many animals. BARseq achieves high-throughput projection mapping with cellular resolution using in situ sequencing of RNA barcodes11. Using BARseq, we mapped projections from 10,299 MOp neurons to 39 target brain areas (Fig. 4a). Projection patterns were enriched in somas in distinct sublayers, consistent with previous retrograde tracing results and were comparable to those obtained by single-cell tracing (Extended Data Fig. 18a–f, Supplementary Information). The large sample size also revealed additional statistical structure in projections (Supplementary Information, Extended Data Fig. 18g–k).

Fig. 4: Projection mapping with single-cell resolution using BARseq.
figure 4

a, log-transformed projection patterns of 10,299 neurons mapped in the motor cortex. Rows indicate single neurons and columns indicate projection areas. See Supplementary Information for a detailed list of dissection areas. Colour bar indicates log of barcode counts. b, Scatter plot of soma locations of the mapped neurons in the cortex. The x-axis indicates relative medial–lateral positions, and the y-axis indicates laminar depth. Neurons are coloured by major classes as indicated. c, Mean projection strengths of the indicated subgroups. Rows indicate projection areas and columns indicate subgroups. Top, dendrogram constructed from the distance of mean projection patterns, with major classes and splits indicated. Bottom, histograms of the laminar distribution of subgroups. Sublayer identities as defined in Fig. 1d are indicated on the right, and sublayer boundaries are indicated by dashed lines. d, The most enriched subgroup (yellow) and the second most enriched subgroup (light blue) in each sublayer. e, Probabilities of projections to the ipsilateral MOs in IT neurons with (top) or without (bottom) contralateral MOs projections in layers L3 to L5b-d. f, The differences in probability for projection X in the indicated sublayer, conditioned on whether the neuron projects to Y. g, Cartoon model showing restricted IT projections in superficial layers and broad IT projections in deep layers. Thal, thalamus. OB, main olfactory bulb. Sp, spinal cord. ITc, intratelencephalic neurons with contralateral projections. ITi, intratelencephalic neurons with only ipsilateral projections.

Hierarchical clustering revealed CT, L5 ET and two subclasses of IT PNs with (IT Str+) or without (IT Str) projections to the striatum. Consistent with previous reports and with the above tract tracing results, these four classes occupy distinct laminar positions (Fig. 4b, Extended Data Fig. 19a–c, Supplementary Information). Beyond these classes, further divisions by projection patterns (Methods) resulted in 18 subgroups with distinct laminar distributions (Fig. 4c, Extended Data Fig. 19d–k, Supplementary Information). Notably, each of the 11 sublayers—previously defined by single-target projections—could be uniquely identified by the top two enriched subgroups of BARseq PNs (Fig. 4d), supporting a sublaminar organization of neuron types defined by overall projection patterns.

Differential distribution across layers explains some of the diversity in IT projection patterns, but projections from cells in a sublayer remained highly structured. For example, 72–93% of IT neurons in L3 to L5b-d projecting to contralateral MOs (MOs-contra) also target ipsilateral MOs (MOs-ipsi), whereas only 32–50% of IT neurons without MOs-contra projections target MOs-ipsi (Fig. 4e, Extended Data Fig. 19l). This interdependence between contralateral and ipsilateral projections also generalized to other homotypic pairs of projections (Extended Data Fig. 19l). By contrast, in some cases the relationships between target pairs varied across sublayers. For example, in superficial layers (L2 for MOs-ipsi, and L2-4 for ipsilateral SSs (SSs-ipsi)), neurons with MOs-ipsi and SSs-ipsi projections were unlikely to also make contralateral projections to MOp-contra, whereas in the middle layers these ipsilateral projections had no predictive value about the corresponding contralateral projection (Fig. 4f). Similar relationships exist between pairs of contralateral projections (for example, MOp-contra and contralateral somatosensory area (SS-contra); Fig. 4f). These observations suggest that IT neurons in superficial sublayers (L2/3) have more dedicated and selective projections, whereas IT neurons in middle and deep sublayers (L5a, 5b and 6a) have broader projections (Fig. 4g). Therefore, the laminar distribution of neurons not only predicts the areas to which neurons project to, as revealed by retrograde labelling (Fig. 1d), but also affect higher-order statistics—that is, projection selectivity.

Single-neuron projection patterns

We reconstructed 140 motor cortex PNs across all layers using genetic driver line-based sparse labelling, fluorescence micro-optical sectioning tomography (fMOST) imaging and registration to CCFv39. We augmented this dataset with 121 single neuron reconstructions from the Janelia MouseLight Project43, and a third set of reconstructions from fMOST images (n = 42 cells, 12 of which were previously published47), for a total of 303 single neurons. Given the difficulty in obtaining large numbers, we included cells across all of the MOp; 113 of the 303 are within the newly defined MOp-ul borders (Fig. 5a, Extended Data Fig. 20a).

Fig. 5: Full morphological reconstructions reveal diverse single-cell projection motifs.
figure 5

a, Soma locations (n = 303) plotted in a top-down view of CCFv3. MOp-ul delineation from Fig. 1 is shown in purple. b, Matrix showing the fraction of total axon projections from tracer (following the colour scheme from Fig. 2a) and single-cell reconstruction experiments to each of 314 targets across all major brain divisions. Columns show individual experiments. Rows show target regions ordered by major brain division. Hierarchical clustering and cutting the dendrogram as indicated with the dashed line revealed thirteen clusters. Some subclusters are indicated by the circled numbers. Cells from specific layers were significantly enriched within clusters (Fisher’s exact test, two-sided, *P < 0.05). c, Top views of all single cells and their axons assigned to cluster 2 (CT), clusters 3 and 4 (ET) and clusters 7 to 13 (IT). Cells are registered to CCFv3, rendered in 3D, overlaid, and randomly coloured (see Extended Data Fig. 20d for single-neuron morphology). dg, Schematics of single-cell projection targets following visual inspection and classification of motifs. d, Two L6 CT patterns were identified: VAL/PO and VM-dominant projections. e, Four L5 ET motifs are shown: cortico-spinal-, cortico-medulla-, cortico-tectal- and cortico-pontine-dominant patterns. f, g, IT motifs included cells with (+) (g) or without (−) (h) projections to the striatum (STR). f, Bilateral IT motifs include asymmetrical and symmetrical projection patterns. Each schematic shows major projection targets for the cell(s) indicated. cc, corpus callosum; MEA, medial amygdalar nucleus; IMD, intermediodorsal nucleus of the thalamus; MDRNv, medullary reticular nucleus, ventral part; RH, rhomboid nucleus; SPV, spinal nucleus of the trigeminal; SPVI, spinal nucleus of trigeminal nerve, interpolar part.

Source data

We calculated the fraction of total axon length per brain region, summed across hemispheres, for each neuron (Fig. 5b, Source Data Fig. 5). To test whether single-neuron projection patterns vary across a continuum, we compared the distribution of differences in targets reached between all pairs with a randomized distribution (Extended Data Fig. 20b, c). The shuffled distribution is significantly narrower than the actual distribution, supporting the existence of distinct axon projection patterns at the single-cell level.

Unsupervised hierarchical clustering on the single cell axon and anterograde tracing data from Fig. 2 revealed 13 main clusters (C1–C13; Fig. 5b, c). We annotated clusters as CT, ET or IT on the basis of Cre line tracing data assigned to a cluster and/or brain-wide projection patterns. C1 comprises tracer experiments labelling projections from all layers or that include both IT and ET classes. C2 contains the CT Cre line tracer data and is significantly enriched for somas in L6. The CT cluster was further divided into three subclusters. Neurons in the largest subcluster (C2.1) have collateral projections to ventral posteromedial nucleus of the thalamus (VPM). Details, including specific target weights, can be found in Source Data Fig. 5.

MOp L5 ET neurons in C3–C5 project to subcortical structures with some collaterals in cortex and striatum (Fig. 5b, c, e). C3 and C4 differ in having dense projections to medulla (C3) or thalamus (C4), as previously reported41. Within C3, one subcluster (3.2) has stronger collateral projections to the spinal nucleus of the trigeminal, principal sensory nucleus of the trigeminal (PSV) parabrachial nucleus (PB) and facial motor nucleus, which are interconnected and involved in orofacial sensorimotor activities48. C3.2 also has stronger projections to medullar reticular nuclei, which mediates skilled forelimb motor tasks through connections with spinal cord49. C4 ET neurons terminate in midbrain (that is, midbrain reticular nucleus (MRN), superior colliculus (SC), anterior pretectal nucleus (APN) and periaqueductal grey (PAG)) and pons (that is, pontine grey (PG), tegmental reticular nucleus (TRN) and pontine reticular nucleus (PRNr)), in addition to collateralizing to thalamic nuclei (that is, VAL, VM, PO and PF), and are likely to relate to corticotectal and corticopontine PNs found in L5b-superficial (Fig. 1d). C4 neurons were also divisible into two subclusters, with C4.2 lacking projections to reticular thalamic (RT) and mediodorsal thalamic nuclei.

IT cells and Cre line tracer experiments are in C6–C13. IT clusters are differentiated by: (1) soma layer (enriched for L2/3 in C7, C10 and C11, and L4 in C7 and C13); (2) number of targets per experiment (C8 has significantly more non-zero targets than all other IT clusters; one-way ANOVA and Tukey’s post hoc test, P < 0.0001); and (3) fraction of axon in specific targets (two-way repeated measures ANOVA, P < 0.0001 interaction effect of cluster × target area). For example, we found that C9 has more axonal projections to agranular insular area, dorsal part (AId), presumably via the rostral pathway (Supplementary Information), compared with C7, C8, C12 and C13 (Tukey’s post hoc test, P < 0.05). Cells in C11 have more axon in medial prefrontal areas (that is, anterior cingulate area, ventral part (ACAv)), compared with C6, C9 and C12 (Tukey’s post hoc test, P < 0.05). Finally, C12 cells project more extensively to other sensorimotor areas (that is, SSp-ul and SSs) than cells in C6, C9, C11 or C13 (Tukey’s post hoc test, P < 0.05).

IT cells in C11 and C13 also have fewer axons in CP compared with C8–C10 and C12 (Tukey’s post hoc test, P < 0.02), similar to IT Str and IT Str+ neurons identified with BARseq. C8 includes many L5 IT cells and has the most extensive collateral projections to other targets, including some to central amygdalar nucleus (CEA) and GPe. By contrast, C7, C11 and C13, which are enriched for L2/3 and L4 neurons, project to a more limited set of targets, also consistent with BARseq data showing that IT neurons in superficial layers have more ‘dedicated’ projections.

We estimated the relative proportions of clusters and PN types in MOp by matching single-cell axon projections against the regional patterns from PHAL tracing. This problem is equivalent to a set of constrained, weighted, linear equations that can be solved by standard non-negative least-squares or bounded-variable least-squares optimization50. We excluded clusters with fewer than 15 neurons (C1, C5 and C6). Results converged with minimal error (less than 0.5% residual sum of squares) on the following compositions: 32% C2, 40% C4, 12% C8, 7.7% C9, 2.9% C11, 4.9% C12 and less than 1% for C3, C7, C9 and C13, which correspond to 40% ET, 32% CT and 28% IT.

Diverse PN axon projection motifs

Single-cell analyses also revealed different levels of variability across projections for cells in the same cluster (Fig. 5c, Extended Data Figs. 20d). CT neurons (C2) are most like each other (average Spearman R = 0.66) compared with ET (C3–C5: R = 0.52, 0.51 and 0.56, respectively) and IT clusters (C6–C12: range 0.54–0.61 and C13: R = 0.66). Lower ET and IT correlation coefficients indicate more within-cluster diversity of axon targeting in these PN types.

We examined whether projection variability within a class might be constrained to a set of finer-scale structural motifs (in between ‘every neuron is unique’ and the projection class level). Among CT neurons, we describe two projection motifs (Fig. 5d): one strongly projecting to VM, the other to VAL and PO; both types also project to other thalamic nuclei, for example, mediodorsal nucleus of thalamus, lateral part (MDl), paracentral nucleus (PCN), central lateral nucleus (CL) and PF. We also observe four ET projection motifs (Fig 5e): (1) cortico-spinal, (2) cortico-medullary, (3) cortico-tectal and (4) cortico-pontine. IT Str+ neurons (Fig. 5f) can be further differentiated on the basis of ipsilateral versus bilateral striatal connections. Most ipsilateral-dominant IT Str+ cells are in L2/3 or L4 (8 out of 9 cells; Fig. 5f, left) and notably bilaterally asymmetric. L5 IT Str+ neurons (n = 3; Fig. 5f, right) displayed more bilaterally symmetric projections. Projections from IT Str cells are either ipsilateral only or had additionally or exclusively contralateral connections (Fig. 5g). IT Str cells with contralateral projections largely mirrored the projection patterns of their ipsilateral counterparts. These results suggest that the varying single cell axon projections may in part derive from definable finer-scale structural motifs.

Discussion

Our study integrated data generated by diverse methods for anatomical labelling, imaging and computational analyses to generate a comprehensive overview of brain structure with cell-type resolution for a single mammalian brain region. This achievement includes accurate 3D border delineation, classification of more than two dozen PN types, refined laminar parcellation, anatomical classification of PN types, a multi-scale input–output wiring diagram, around 300 single neuron reconstructions, and approximately 10,000 single neuron projections traced by molecular barcoding.

Our study represents a coherent, multifaceted analysis of neuron types across nested levels of cortical organization (Fig. 6a; Extended Data Fig. 21). The resulting multi-scale input–output wiring diagram provides a high level of structural detail and establishes a foundational framework for determining the functional importance of cell types and circuits (Fig. 6b).

Fig. 6: Cell type wiring diagram of the MOp-ul.
figure 6

a, Summary of the output connections of multiple MOp-ul cell types (ET, CT and IT) compared to those of the MOp-ul as a whole (left, black). Along each vertical path, the outputs from one Cre line tracing or single cell reconstruction experiment (identified by the prefix S, followed by a number) are summarized. The outputs begin at top with the originating MOp-ul layer(s); branches perpendicular to the main vertical path that end in ovals represent ipsilateral (right) and contralateral (left) sites of termination, identified by the brain division abbreviations at left. Branch thickness and oval size represent relative connection strength. b, A summary wiring diagram of MOp-ul cell types and predicted functional roles. A subset of cortical and striatal projection patterns is shown from the diverse MOp-ul IT cell types (six IT cell types in L2–L6b). Three types of CT neurons are shown representing different combinations of thalamic targets and MOp-ul layers of origin. Three of four types of ET neurons are also shown, projecting to subcortical targets involved in different motor functions: (1) cortico-spinal outputs to the cervical spinal cord controlling goal-directed upper limb motor activities, such as reaching and grasping; (2) cortico-medullar projections to and output from the reticular formation (for example, medullary reticular nucleus (MDRN)) are implicated in task-specific aspects of skilled motor programs49; (3) cortico-tectal projections to the SC are implicated in coordinating movements of eye, head, neck and forelimbs during navigation and goal-oriented behaviours (such as defensive and foraging behaviour) and (4) cortico-pontine projections to the pontine grey, which generates mossy fibres to the cerebellum (which is critically involved in associative motor learning). These ET neurons also generate collateral projections to other structures in the motor system, such as GPe, ZI, STN, RN and IO. ACAv/d, anterior cingulate area, ventral and dorsal part; AIp, agranular insular area, posterior part; AIv, agranular insular area, ventral part; CBN, cerebellar nuclei; CNU, cerebral nuclei; CTX, cortex; MB, midbrain; MDc, mediodorsal nucleus of thalamus, capsular part; NPC, nucleus of the posterior commissure; P, pons; ORBvl/l, orbital area, ventrolateral and lateral part; PARN, parvicellular reticular nucleus; SMT, submedial nucleus of the thalamus; SPFp, subparafascicular nucleus, pavicellular part; TH, thalamus.

Despite substantial progress in cell-type censuses, a rigorous definition of PN types remains elusive. Some PN types are well aligned with transcriptomic types—for example, two transcriptomic types of TEa– ectorhinal area (ECT)–perirhinal area (PERI)-projecting neurons in L2 and L5 exist with distinguishable asymmetric or symmetric projection patterns to their ipsilateral or contralateral targets, among several other examples7,41,51. However, mapping between PN types and transcriptome types is not always clear9,52. For example, we identified L6 CT VM-projecting neurons that differ from other CT neurons by their location in deep L6a and L6b (Fig. 1d). Spatial transcriptomics51 also identified several L6 CT clusters distributed across top to bottom of L6; but how these anatomical and molecular types relate to each other remains to be determined. The correspondence between molecularly and anatomically defined PN types will be clarified by future studies and will probably require further method development53.

Knowledge of evolutionary conservation and divergence of brain structures often yields insights into organizational principles. Previous cross-species comparisons of mammalian brains have largely focused on the macroscale, such as cortical areas and layers, leaving many open questions regarding what is and is not conserved. The joint molecular and anatomic identification of PNs provides a higher resolution and more robust metric for cross-species translation. Although the primate cortex has more functionally distinct areas and potentially orders of magnitude larger cortical networks than in rodents, a PN-type-resolution analysis may reveal truly conserved core subnetworks and novel species innovations. The MOp provides a good starting point for such comparative studies, given the clearly recognizable conservation and divergence of forelimb structures and motor behaviours from rodents to humans.

Methods

Animal subjects

All animal procedures were performed under Institutional Animal Care and Use Committee (IACUC) approval (Allen Institute for Brain Science (AIBS), Cold Spring Harbor Laboratory (CSHL), University of Southern California (USC), MIT and Huazhong University of Science and Technology in China) in accordance with NIH guidelines. Mice had ad libitum access to food and water and were group-housed within a temperature- (21–22 °C), humidity- (40–51%), and light- (12-h light:dark cycle) controlled room in the vivariums of the institutes listed above. Male and female wild-type C57BL/6J mice at an average age of postnatal day (P)56 were purchased from Jackson Laboratories for histological, multi-fluorescent tract tracing and viral tracing experiments, and single-neuron reconstructions. The mouse lines used at different institutes for specific experiments are described below and listed in Supplementary Table 2.

Cell-type atlasing

Cell-type atlasing was performed at the laboratory of P.O. (CSHL).

Brain sample preparation and imaging of cell-type distributions

Cre-reporter transgenic mice were created by crossing ‘knock-in’ Cre drivers with reporter mice (CAG-LoxP-STOP-LoxP-H2B-GFP) as described previously20. General procedures of brain extraction, histology and imaging methods were described previously20,21,54. Whole-brain imaging of Cre reporter lines was achieved using automated whole-brain serial two-photon tomography (STPT). The entire brain was coronally imaged20,21,54 at an xy resolution of 1 µm and z-spacing of 50 µm. Whole-brain Neurotrace staining was performed with a modified iDISCO+ protocol55 (R.M.-C. and P.O., manuscript in preparation).

STPT cell counting

Automatic cell counting in MOp-ul was done as previously described20. A convolutional neural network was trained using H2B-GFP nuclear signalling. First, we develop an unsupervised detection algorithm for cell detection based on structure tensor and connected components analyses. Results were used to automatically generate 270 random segmented image tiles from 3 different datasets (~1,350 cells), which were used as the ground truth (R.M.-C. and P.O., manuscript in preparation).

ARA Nissl registration

Two-dimensional ARA Nissl slices were registered onto the Allen CCF (https://biccn.org/standards/common-coordinate-frameworks-biccn) reference brain. In brief, ARA 2D slices were pre-aligned to a subset of CCF slices spaced 100 μm apart, producing a total of 132 slices as in the ARA (using a custom Python 3.7 script). After 2D alignment, a 3D affine transformation was applied followed by a 3D B-spline transformation (see ‘Image registration’; Extended Data Fig. 2).

Image registration

Whole-brain 3D datasets were registered to the CCF reference brain. In brief, a 3D affine transformation was calculated first, followed by a 3D B-spline transformation. Similarity was computed using advanced Mattes mutual information metric in the Elastix 2.0 registration toolbox56. Two-dimensional datasets pre-registered to the ARA were initially aligned using the output transformations from the original ARA Nissl 2D alignment. Non-pre-registered 2D datasets were initially pre-aligned (see ‘ARA Nissl registration’ for description; Supplementary Video 1).

Anatomical feature enhancing

To improve whole-brain registration, both CCF and image series datasets were pre-processed to enhance intrinsic anatomical features (see below). Anatomical features in the reference brain were initially enhanced (custom Matlab R2018a scripts). Then, a Sobel operator was applied to reduce noise and computational cost during image registration (custom Python 3.7 scripts). Brain image datasets were enhanced following the same process (R.M.-C. and P.O., manuscript in preparation).

Depth-based cluster analysis

Cell soma coordinates were grouped every 25 μm from the pia after registration to CCF. Depth-based analysis of MOp organization was performed using unsupervised hierarchical clustering of soma depths distribution on the basis of injection projection patterns or cell-type (Fig. 1f). Proximity was computed using Euclidean distance with complete linkages. All cortical depths were later rearranged based on depth organization and layers were defined by grouping depths by cluster. Thus, layers were defined by adjacent depth belonging to the same cluster.

High resolution image registration transformation

After image registration, output transformations were used to generate high resolution registered datasets (custom Matlab R2018a scripts). We automatically generated the displacement field of the initial registration, which was used to compute the high-resolution registration transformations (Supplementary Video 2; R.M.-C. and P.O., manuscript in preparation).

Cloud-based visualization and delineation with Neuroglancer

Brains registered at high resolution were converted and stored in a ‘precomputed’ format in the Google Cloud Platform using Cloud-Volume (https://github.com/seung-lab/cloud-volume). Cloud-based visualization was done using Neurodata’s fork (https://viz.neurodata.io/) of Google Neuroglancer WebGL-based viewer27,57 (https://github.com/google/neuroglancer). Cloud-based delineation of MOp-ul was done using Neuroglancer’s annotation tools on the high-resolution registered datasets (Supplementary Video 1).

MOp-ul 3D rendering

MOp-ul annotations were exported from Neuroglancer and converted to binary image files using custom scripts (Python 3.7). Cortical layers were delineated on the basis of cell types distribution. For depth-distribution analysis, MOp-ul was divided in 50-µm thickness bins equally spaced between pia surface and white matter. Finally, MOp-ul images were 3D rendered using ParaView (v5.8.1) software58.

Multi-fluorescent tracing and cell type-specific input–output viral tracing experiments

Mouse Connectome Project

The Mouse Connectome Project was carried out at the laboratory of H.-W.D.

Tracer injection experiments

The Mouse Connectome Project uses a variety of combinations of anterograde and retrograde tracers to simultaneously visualize multiple anatomical pathways within the same Nissl-stained mouse brain3,13. Triple anterograde tracing experiments involved three separate injections of 2.5% PHAL (Vector Laboratories, catalogue (cat.) no. L-1110, RRID:AB 2336656), and adeno-associated viruses encoding enhanced green fluorescent protein (AAV-GFP; AAV2/1.hSynapsin.EGFP.WPRE.bGH; Penn Vector Core) and tdTomato (AAV1.CAG.tdtomato.WPRE.SV40; Penn Vector Core). Retrograde tracers included CTB Alexa Fluor conjugates 647, 555 and 488 (0.25%; Invitrogen), Fluorogold (FG; 1%; Fluorochrome, LLC), and AAVretro-EF1a-Cre (AAV-retro-Cre; Viral Vector Core; Salk Institute for Biological Studies). Retrograde tracing from the spinal cord (Fig. 1b; Extended Data Fig. 4) was performed with AAVretro-hSyn-GFP-WPRE (Addgene, cat. no. 50465) and AAVretro-hSyn-Cre-WPRE (Addgene, cat. no. 105553) in Ai14 tdTomato Cre-reporter mice (Jackson Laboratories, stock no. 007914, aged 2–3 months). To further establish synaptic connectivity in downstream targets of MOp-ul (Extended Data Fig. 11), AAV-hSyn-mRuby2-sypEGFP (custom design, laboratory of B.K.L.) was used to label axons-of-passage with mRuby2 (red) and presynaptic puncta with EGFP (green). Patterns of synaptic innervation were further demonstrated in Ai14 mice using injections of self-complementary (sc) AAV1-hSyn-Cre (Vigene Biosciences; 2.8 × 1013 GC per ml), which is capable of anterograde transneuronal spread to post-synaptic targets18,20.

To reveal mono-synaptic inputs to a projection defined neuronal populations (Fig. 3; Extended Data Fig. 16a), we used a modified TRIO strategy44. In brief, AAVretro-Cre was injected into a MOp downstream projection target (that is, caudoputamen) and Cre-dependent TVA- and RG-expressing helper virus (AAV8-hSyn-FLEX-TVA-P2A-GFP-2A-oG) and mCherry-expressing G-deleted rabies virus (produced by the laboratory of I. Wickersham at MIT) were injected into the MOp to label the MOp PN population (1st order) and their brain-wide monosynaptic inputs (2nd order).

All injection experiments in this study are listed in Source Data Fig. 2 and Source Data Fig. 3. No statistical methods were used to pre-determine sample sizes, but our sample sizes are similar to those reported in previous publications3,13. In most cases, anterograde tracing results are cross-validated by retrograde injections at anterograde axonal terminal fields, and vice versa. The procedures of stereotaxic surgeries, histology and immunohistochemical processing are described in the Supplementary Information.

Imaging processing and data presentation

Tissue sections were scanned with an Olympus VS120 slide scanning microscope using a 10× objective. Each tracer was visualized using appropriate fluorescent filters and whole tissue section images were stitched from tiled scanning into VSI image files. An informatics workflow was specifically designed to reliably warp, reconstruct, annotate and analyse the labelled pathways in a high-throughput fashion through our in-house image processing software Connection Lens13,8, where each section was matched and warped to its corresponding atlas level of the ARA and the labelling was segmented. Threshold parameters were individually adjusted for each case and tracer, resulting in binary image output files for quantitative analysis. Adobe Photoshop was used to correct conspicuous artifacts in the threshold output files that would have spuriously affected the analysis. Results were recorded and output in a spreadsheet for statistical analysis and matrix visualization.

Atlas-registered TIFF image files were converted into JPEG2000 image format, while images with thresholding were aggregated into SVG images. All fluorescently labelled connectivity data are presented through the iConnectome viewer, the iConnectome Map Viewer, and published to the Data Repository Dashboard page, www.MouseConnectome.org. Quantified cell count files and projection matrix also are accessible from www.MouseConnectome.org.

Allen Institute Mouse Brain Connectivity Atlas Project

Tracer injections

Whole-brain axonal projections from MOp-ul were labelled with AAV using the previously established Allen Mouse Brain Connectivity Atlas pipeline. Experimental methods and procedures have been described previously4,17. In brief, a pan-neuronal AAV expressing EGFP (AAV2/1.hSynapsin.EGFP.WPRE.bGH, Penn Vector Core, AV-1-PV1696, Addgene ID 105539) was used for stereotaxic injections into wild-type C57BL/6J mice. To label genetically defined populations of neurons, we used a Cre-dependent AAV that expresses EGFP within the cytoplasm of Cre-expressing infected neurons (AAV2/1.pCAG.FLEX.EGFP.WPRE.bGH, Penn Vector Core, AV-1-ALL854, Addgene ID 51502). For retrograde mono-synaptic whole-brain tracing of inputs to Cre-defined cell types in MOp-ul, we used a dual-virus strategy (S.Y. et al., manuscript in preparation and refs. 59,60). A Cre-dependent rAAV helper virus co-expressing TVA receptor, rabies glycoprotein (G), and tdTomato in the cytoplasm of Cre-expressing infected neurons (AAV1-Syn-DIO-TVA66T-dTom-N2cG) was injected stereotaxically into MOp, followed 21 ± 3 days layer by another injection in the same location of a G-deleted, ASLV type A (EnvA) pseudotyped rabies virus expressing a nuclear GFP reporter (RV.CVS-N2c(deltaG)-H2bEGFP). Information on Cre driver lines is provided in Extended Data Table 2. Detailed procedures for stereotaxic surgeries and histology are described in the Supplementary Information.

Imaging and post-acquisition processing

STPT imaging procedures were previously described20,21 (TissueCyte 1000, TissueVision). In brief, following AAV tracer injections, brains were imaged at high xy resolution (0.35 µm × 0.35 µm) every 100 µm along the rostrocaudal z-axis. Images of rabies tracer-labelled nuclei were also collected every 100 µm, but were imaged at 0.875 µm × 0.875 µm xy resolution. Images underwent quality control and manual annotation of injection sites, followed by signal detection and registration to the CCFv3 through an informatics data pipeline10,61 (IDP). The IDP manages the processing and organization of the images and quantified data for downstream analyses. The two key algorithms in the IDP are signal detection and image registration. For segmentation, high-threshold edge information was combined with spatial distance-conditioned low-threshold edge results to form candidate signal object sets. The candidate objects were then filtered based on their morphological attributes such as length and area using connected component labelling. In addition, high-intensity pixels near the detected objects were included into the signal pixel set. Detected objects near hyper-intense artifacts occurring in multiple channels were removed. The output is a full-resolution mask that classifies each pixel as either signal or background. An isotropic 3D summary of each brain is constructed by dividing each image series into 10 µm × 10 µm × 10 µm grid voxels. Total signal is computed for each voxel by summing the number of signal-positive pixels in that voxel. Each image stack is registered in a multi-step process using both global affine and local deformable registration to CCFv3 as previously described10,61.

Rabies-labelled starter cell counting

Antibody-stained starter cells were scanned using a 10× objective lens and using a 4-µm step size on a Leica SP8 TCS confocal microscope using appropriately matched fluorescent filters. Images were auto-stitched from tiled scanning into TIFF image files and compiled into maximum intensity projection images for every section of the injection site. A cell-counting algorithm was used to initially identify starter cells from the injection site. Following automated identification of starter cells each section was then manually corrected using ImageJ62 (v1.53).

Each image containing the injection site was adjusted for brightness and false-positive or false-negative starter cells were corrected using the Cell Counter tool. Starter cells were assigned to cortical layers based on DAPI staining patterns.

Quantification of whole-brain anterograde projections from MOp-ul

We generated a weighted connectivity matrix with data obtained from all anterograde tracer experiments60 for Fig. 2. Experiments and data are provided in Source Data Fig. 2. Segmentation and registration outputs are combined to quantify signal for every voxel in CCFv3. To quantify signal per brain structure, segmentation results are combined for all voxels with the same structure annotation. We defined connection weight in these analyses as the fraction of total axon volume; that is, the axon volume segmented per each brain region divided by the total axon volume across all regions, excluding the injection site (MOp). We note that even with stringent quality control, informatically derived measures of connection weights can include artefacts (false positives), and the AAV-EGFP tracer reports signal from labelled axons, including passing fibres and synaptic terminals. For this reason, all targets (n = 628 total, 314 per hemisphere) were visually inspected for presence of axon terminals, and a binary mask was generated to reflect ‘true positives’ for these regions. We applied the true positive binary mask to remove true negative connections and regions with only fibres of passage. We compiled a weighted matrix and performed comparative analyses across tracer datasets acquired from multiple laboratories (Allen, Z.J.H. and H.-W.D.). In the case of data from the Z.J.H. laboratory, integration was straightforward as these experiments were directly registered to CCFv3 as in the Allen pipeline. The H.-W.D. laboratory data were mapped to CCFv3 by matching structure name. As the ontology of the CCFv3 is derived from the ARA, corresponding structures were easily identified for most regions.

Quantification of whole-brain retrograde inputs to MOp-ul

We generated a weighted connectivity matrix with data obtained from all retrograde tracer experiments for Fig. 3. Experiments and data are provided in Source Data Fig. 3. The total volume of detected signal was informatically derived for each brain structure in CCFv3, as described above for axon segmentation. In contrast to the heavily manual quality control for axonal projection false positives, we estimated segmentation false positives per CCFv3 structure for the rabies data by quantifying segmentation results from n = 89–97 ‘blank’ brains; that is, brains processed through the imaging and informatics pipeline without rabies-mediated GFP expression. The distribution of false positives per structure was used to set a minimum threshold of six standard deviations from the mean. Any structure not passing this threshold was set to zero. Following this threshold step, the input connection weights were defined as the fraction of fluorescent signal segmented per brain region divided by the total volume above threshold for this set of regions, again excluding the injection site (MOp).

Clustering analyses based on connection weights

Unsupervised hierarchical clustering was conducted using the online software, Morpheus, (https://software.broadinstitute.org/morpheus/). Proximity between clusters was computed using complete linkages with Spearman rank correlations as the distance metric. The clustering algorithm works agglomeratively: initially assigning each sample to its own cluster and iteratively merging the most proximal pair of clusters until finally all the clusters have been merged. The software program GraphPad Prism v9 was used for statistical tests.

Cell distribution and tracing

Genetic targeting of cortical pyramidal neuron lines to produce gene expression, cell-type-specific input and output whole-brain imaging datasets

Cell distribution and anatomical tract tracing data were generated as part of the Comprehensive Center for Mouse Brain Cell Atlas in the laboratory of Z.J.H. at CSHL. Experimental methods and procedures have previously been described8,16,63. Knock-in mouse lines PlexinD1-2A-CreER, Fezf2-2A-CreER, Tle4-2A-CreER were generated8. Foxp2-IRES-Cre was generated by R. Palmiter (University of Washington, Seattle). We crossed CreER drivers (PlexinD1-2A-CreER, Fezf2-2A-CreER, Tle4-2A-CreER) with reporter mice expressing nuclear GFP or tdTomato (R26-CAG-LoxP-STOP-LoxP-H2B-GFP or R26-CAG-LoxP-STOP-LoxP-tdTomato, Ai14) for cell distribution data collection.

For both cell distribution and anterograde tracing analysis, these mice were induced with a 100 mg kg−1 dose of tamoxifen (T5648, Sigma) dissolved in corn oil (20 mg ml−1), administered by intraperitoneal injection at the appropriate age to enable temporal control of the CreER driver. In the case of the Foxp2-IRES-Cre line, cell distribution data was acquired based on a systemic AAV injection of AAV9-CAG-DIO-EGFP (UNC Viral Core) diluted in PBS (5 × 1011 viral genomes per mouse), injected through the lateral tail vein at 4 weeks of age with 100 μl total volume. Cell distribution datasets from ref. 8 were analysed in the MOp region. Experiments are detailed in ref. 8.

Tracer injection experiments

For anterograde tracing, AAVs serotype 8 (UNC Vector Core, Salk Institute for Biological Studies) were delivered by stereotaxic injection. Detailed procedures are described in Supplementary Information. In brief, cell-type specific anterograde tracing was conducted in the mouse knock-in CreER and Cre driver lines. CreER drivers were crossed with the Rosa26-CAG-LSL-Flp mouse converter line such that tamoxifen induction of CreER expression at a given time is converted to constitutive Flp expression for anterograde tracing with a Flp-dependent AAV vector. For anterograde tracing from Foxp2-IRES-Cre driver line, we used a Cre-dependent AAV to express EGFP in labelled axons. Three weeks after injection, mice were perfused with 4% PFA in PBS, brains were dissected out and processed for tissue collection.

For cell-type specific mono-trans-synaptic rabies tracing of inputs, in animals aged approximately 1 month, a Cre-dependent starter virus expressing TVA, EGFP and the rabies glycoprotein was delivered in MOp-ul, followed three weeks later, by the enVA-pseudotyped glycoprotein-deleted rabies virus, all administered with a pulled glass pipette as specified below. In the case of CreER drivers, the starter virus injection was followed by tamoxifen induction two and seven days after injection. Seven to 10 days after injection of the mono-trans-synaptic rabies virus, mice were perfused with 4% PFA in PBS, brains were dissected out and processed for tissue collection. We used the whole-brain STPT (TissueCyte 1000, TissueVision) pipeline to collect whole-brain images as described by the P.O. laboratory20,21.

Microscopy imaging of cell-type-specific input mapping

Imaging from serially mounted sections was performed using 5× objective on a Zeiss Axioimager M2 System equipped with MBF Neurolucida Software (MBF Bioscience). To image starter cells, sections encompassing the injection site were imaged using a 20× objective with a 5-µm step-size on a Zeiss LSM 780 or 710 confocal microscope (CSHL St Giles Advanced Microscopy Center) using matched fluorescent filters. Images were auto-stitched from tiled scanning into TIF image files and compiled into maximum intensity projection images for sections encompassing the injection site. Input cells were manually annotated within the serial sections to extract their position within the dataset. We matched the serial sections to the corresponding sections from CCFv3. Then, we placed fiduciary landmarks on both data and CCFv3 sections for warping conducted using moving least squares in Fiji/ImageJ.

Cell type specific whole-brain image dataset presentation

Cell type specific anterograde viral tracing data generated (high resolution STPT images and registration to CCFv3) are available through the Mouse Brain Architecture Cell Type project (http://brainarchitecture.org/cell-type/projection). Cell-type-specific anterograde viral tracing, cell distribution and input tracing image datasets are available through the Brain Image Library (https://www.brainimagelibrary.org/). Cell distribution and anterograde tracing image datasets can also be viewed as image sets registered to the Allen CCF by the P.O. laboratory using Neuroglancer (https://github.com/google/neuroglancer). Links to these various portals can be found in the metadata tabs in Supplementary Tables 3 and 4.

Dendritic morphology analysis

Dendritic morphology analysis was carried out at the H.-W.D. and X.W.Y. laboratories at UCLA. Several consortium partners in this project contributed two neuronal reconstruction datasets (that is, UCLA, USC and AIBS; Extended Data Figure 17). Both entailed sparse labelling of layer 2–5 pyramidal neurons using similar though distinct methodologies. The UCLA and USC contribution crossed Etv1-CreERT2 (layer 5-specific) and Cux2-CreERT2 (layers 2-4) mice with the Cre-dependent MORF3 (mononucleotide repeat frameshift) genetic sparse-labelling mouse line64. The MORF3 reporter mouse expresses a farnesylated V5 spaghetti monster fusion protein65 from the Rosa26 locus when both the LoxP flanked transcriptional STOP sequence is removed by Cre and when stochastic-mononucleotide repeat frameshift occurs66. After perfusion, the tissue was cut into 500-µm-thick coronal slices, iDISCO+ cleared55 with a MORF-optimized protocol, stained with rabbit polyclonal anti-V5 antibody (1:500) followed by AlexaFluor 647-conjugated goat anti-rabbit secondary antibody (1:500) and NeuroTrace. Sections were imaged via a 30× silicone oil immersion lens with 1-µm z step on a DragonFly spinning disc confocal microscope (Andor). These tissue generation and processing methods are described in ref. 64. Composite images of neurons were viewed with Imaris image software, manually reconstructed with Aivia reconstruction software (v.8.8.2, DRVision), and saved in the non-proprietary SWC digital morphology file format67.

The AIBS contribution crossed Cux2-CreERT2, Fezf2-CreER (layer 5-specific), and Pvalb-T2A-CreERT2 (layer 5) mice with the TIGRE-MORF (Ai166) fluorescent reporter line, which expresses farnesylated EGFP from the TIGRE locus64. Following tissue fixation, brains were processed and imaged using the fMOST method. Labelled neurons were reconstructed with Vaa3D software in a semi-automated, semi-user defined fashion68, using the TeraFly and TeraVR modules enabling a virtual reality reconstruction environment, and reconstructions were saved as SWC files.

Reconstructions from both datasets were analysed concurrently by the H.-W.D. laboratory. Geometric processing of the reconstructions was performed with the Quantitative Imaging Toolkit (http://cabeen.io/qitwiki), allowing us to isolate the basal dendritic tree for analysis, and to render sample visualizations (Extended Data Fig. 17a). The modified SWC files were imported into NeuTube and morphometrics were obtained using L-Measure69. Since tissue preparation and data acquisition techniques can have significant effects on certain morphometric properties70, only measures that are insensitive to these effects were used in the present analyses. These measures were number of primary dendrites, remote bifurcation amplitude and tilt angles, branch order, branch path length, tortuosity, arbor depth, height and width, Euclidian distance, total length, partition asymmetry, path distance, terminal degree and terminal segments length. Data outputs were normalized by dividing all values within each dataset by the mean value of all layer 2–4 neurons for each morphometric. Principal component analysis was run on the data, and the first two components were plotted to create a low-dimension scatter plot of the data (Extended Data Fig. 17b). Wilcoxon signed rank tests were applied to all measures comprising the loadings for these two components, with the comparisons made between superficial (2–4) versus deep (5) layers (Extended Data Fig. 17c); for the comparisons reported here the two datasets (AIBS and USC–UCLA) were not pooled together. A Sholl-like analysis was performed on the reconstructions to assess the distribution of dendritic distance as a function of relative path distance from the soma (Extended Data Fig. 17d). Moreover, we carried out a comparative analysis of persistence diagram vectors71 of superficial versus deep neurons for both datasets (Extended Data Fig. 17e).

High-throughput projection mapping at single-cell resolution with BARseq

BARseq data collection and processing

BARseq was carried out by the A.M.Z. laboratory at CSHL. Animals injected with Sindbis (see Supplementary Information for details) were sacrificed and dissected as described previously72 for BARseq (see Supplementary Information, tables 6, 7 for details). Pre-processing of data (see Supplementary Information for details) resulted in 10,299 projection neurons for further analysis.

Data analysis

Raw projection barcodes were first normalized by spike-in counts, and further normalized between the two brains so that neurons with non-zero counts in each projection area have the same mean across the two brains. We then performed hierarchical k-means clustering on log-transformed and spike-in corrected projection strengths to identify the major classes. However, this clustering did not identify small clusters with distinct laminar positions. To find subclusters with distinct laminar distributions, we used a second clustering method based on binary projection patterns. From a population of neurons, we first split off one subcluster with a particular binary projection to up to three brain areas. For example, a subcluster can be defined as having projections to the contralateral primary motor cortex, the ipsilateral caudal striatum, but not the caudal medial section of the ipsilateral thalamus. These projections were chosen to maximize the reduction in the entropy of the laminar distribution of neurons. This process was then iterated over the two resulting subclusters, until no subclusters resulted in statistically significant reduction in entropy (P < 0.05 without multiple-testing correction). This process resulted in many clusters, some of which may have similar laminar distributions. We then built a dendrogram based on the distance in projection space among the resulting clusters and iteratively combined subclusters similar in laminar distribution. Two subclusters were considered similar in laminae if differences in their laminar distributions were not statistically significant (P < 0.05 using rank-sum test with Bonferroni correction) and their median laminar positions were within 200 µm. This process was iterated over each split, starting from ones between the closest leaves or branches. We stopped combining clusters at the level of major classes.

To compare BARseq dataset to single-cell tracing, we randomly down-sampled BARseq dataset to the same sample size as a subset of the single-cell tracing dataset (~160 neurons). We further combined ipsilateral and contralateral cortical areas and combined all samples of the same non-isocortex brain divisions together. This resulted in an axonal resolution that can be compared to the single-cell tracing dataset. We then combined this down-sampled and low resolution BARseq dataset with the traced neurons and analysed the joint dataset. t-distributed stochastic neighbour embedding (t-SNE) was performed in MATLAB. Clustering was performed using two layers of Louvain community detection73 in MATLAB (R2018a).

Matching BARseq clusters to single-cell tracing clusters was done using the common axonal resolution, but full-size BARseq dataset using MetaNeighbor74. To test the homogeneity of clusters, we down-sampled the datasets with replacement to different sizes (1,000 random samples per cluster size) and calculated the correlation between the down-sampled cluster centroids to the full-data cluster centroids.

Raw bulk sequencing data are deposited at Sequence Read Archive (SRR12247894). Raw in situ sequencing images are deposited at Brain Image Library. Processed projection data and in situ sequencing data are available from Mendeley Data (https://doi.org/10.17632/tmxd37fnmg.1).

Single-neuron reconstructions

Single-neuron reconstruction data were produced at the AIBS, Huazhong University of Science and Technology (HUST) and the SEU–AIBS Joint Center.

Animal subjects

Male and female transgenic mice at an average age of P56 were used for all experiments (viral tracer and single neuron reconstructions). For the AIBS project, Cre reporter lines are listed in Supplementary Table 2, and include drivers: Gnb4-IRES2-CreERT2, Fezf2-CreER, Cux2-CreERT2, Pvalb-T2A-CreERT2, Sst-Cre, and Cre-dependent EGFP reporters: Ai139 or Ai1669. Induction of CreERT2 driver lines was done by administration via oral gavage of tamoxifen (50 mg ml−1 in corn oil) at original (0.2 mg per g body weight) or reduced dose for one day in an adult mouse. The dosage for mice age P7–P15 is 0.04 ml. Mice were transcardially perfused with fixative and brains collected more than 2 weeks after tamoxifen dosing.

Imaging and post-acquisition processing

Imaging and post-acquisition processing was carried out at HUST. All tissue preparation has been described previously75. Following fixation, each intact brain was rinsed three times (6 h for two washes and 12 h for the third wash) at 4 °C in a 0.01 M PBS solution (Sigma-Aldrich). The brain was subsequently dehydrated via immersion in a graded series of ethanol mixtures (50%, 70% and 95% (vol/vol) ethanol solutions in distilled water) and the absolute ethanol solution 3 times for 2 h each at 4 °C. After dehydration, the whole brain was impregnated with Lowicryl HM20 Resin Kits (Electron Microscopy Sciences cat. no.14340) by sequential immersions in 50, 75, 100 and 100% embedding medium in ethanol—2 h each for the first three solutions and 72 h for the final solution. Finally, each whole brain was embedded in a gelatin capsule that had been filled with HM20 and polymerized at 50 °C for 24 h.

Whole-brain imaging was performed using a fMOST system. The basic structure of the imaging system is a combination of a wide-field upright epi-fluorescence microscopy with a mechanic sectioning system. This system runs in a wide-field block-face mode but updated to obtain better image contrast and speed and thus enables high throughput imaging of the fluorescent protein-labelled sample (manuscript in preparation). A block-face fluorescence image across the whole coronal plane (xy axes), then the top layer is removed (z axis) with a diamond knife, exposing next layer, and the sample is imaged again, repeating the process. The thickness of each layer is 1.0 µm. In each layer imaging, we used a strip-scanning (x axis) model combined with a montage in the y axis to cover the whole coronal plane76. The fluorescence, collected using a microscope objective, passes a bandpass filter and is recorded with a TDI-CCD camera. We repeat these procedures across the whole sample volume to get the required dataset.

The objective used is a 40× water-immersion lens with numerical aperture (NA) 0.8 to provide a designed optical resolution (at 520 nm) of 0.35 μm in the xy axes. The imaging gives a sample voxel of 0.35 × 0.35 × 1.0 μm to provide proper resolution to trace the neural process. The voxel size can be varied upon difference objective. Other imaging parameters for GFP imaging include an excitation wavelength of 488 nm, and emission filter with passing band 510–550 nm.

Full neuronal morphology reconstruction

This was carried out at AIBS and the SEU–AIBS joint Center. Vaa3D, an open-source, cross-platform visualization and analysis system, was used to reconstruct neuronal morphologies as described in detail recently77. Critical modules were developed and incorporated into Vaa3D for efficient handling of the whole-mouse brain fMOST imaging data, that is, TeraFly77 and TeraVR24. TeraFly supports visualization and annotation of multidimensional imaging data with virtually unlimited scales. The reconstructors can flexibly choose to work at a specific region of interest with the desired level of detail. The out-of-core data management of TeraFly allows the software to smoothly deal with terabyte-scale of data even on a portable workstation with normal RAM size. Driven by virtual reality (VR) technologies, TeraVR is an annotation tool for immersive neuron reconstruction that has been proved to be critical for achieving precision and efficiency in morphology data production. It creates stereo visualization for image volumes and reconstructions and offers an intuitive interface for the reconstructors to interact with such data. TeraVR excels at handling various challenging yet constantly encountered data situations during whole-brain reconstruction, such as noisy, complicated or weakly labelled axons.

Trained reconstructors used the Vaa3D suite of tools to complete their reconstructions. Completion was determined typically when all ends had well-labelled, enlarged boutons. A final quality-checking procedure was always performed by at least one more experienced annotator using TeraVR who reviewed the entire reconstruction of a neuron at high magnification, paying special attention to the proximal axonal part or a main axonal trunk of an axon cluster, where axonal collaterals often emerge and branches are more frequently missed due to the local image environment being composed of crowded high contrasting structures. To finalize the reconstruction, an auto-refinement step fit the tracing to the centre of fluorescent signals. The final reconstruction file (SWC) is a single tree without breaks, loops, or multiple branches from a single point.

Registration of fMOST-imaged brains to Allen CCFv3

We performed 3D registration of each fMOST image series (that is, the subject) to the CCFv3 average template (that is, the target10) using the following steps9: (1) fMOST images were down-sampled by 64 × 64 × 16 (x × y × z) to roughly match the size of the target brain; (2) 2D stripe-removal was performed using frequency notch filters; (3) approximately 12 matching landmark pairs between subject and target were manually added to ensure correct affine transformation that approximately aligned the orientation and scales; (4) Affine transformation was applied to minimize the sum of squared difference of intensity between target and subject images; (5) intensity was normalized by matching the local average intensity of subject image to that of target image; (6) a candidate list of landmarks across CCF space was generated by grid search (grid size = 16 pixels); and finally (7) our software searched corresponding landmarks in the subject image and performed local alignment. CCF-registered single neuron reconstructions were visualized using Brainrender78.

Quantification of whole-brain single-neuron projections from MOp-ul

We generated a weighted connectivity matrix with data obtained from all single-neuron full morphology reconstruction experiments for Fig. 5. Experiment metadata and data are provided in Source Data Fig. 5. Reconstruction and registration outputs were again combined to quantify axon reconstructed for every CCF voxel, and combined for all voxels within the same CCF structure to generate total axon volume per brain structure for each single reconstructed cell. For Fig. 5, we summed voxels from the same structure across hemispheres to match the data format obtained from MouseLight MOp reconstructions, then calculated the fraction of total signal per structure.

fMOST data analysis pipeline

This data analysis was carried out at HUST, resulting in Fig. 5, sample nos. 193377 and 193663.

Data collection

PlexinD1-2A-CreER, Fezf2-2A-CreER mice8 were generated in the laboratory of Z.J.H. and were crossed with Rosa26-loxp-stop-loxp-flpo mice. We used adult double-positive hybrid mice aged 2–3 months for experiments. Each of these mice received injection of 50 nl of flp-dependent pAAV-EF1a-fDIO-TVA-GFP virus (8 × 1012 genome copies per ml; UNC Vector Core) in the MOp. Three days later, the mice were induced intraperitoneally with a small amount of tamoxifen (T5648, Sigma, dissolved in corn oil, diluted at a concentration of 5 mg ml−1, and the injection dose per mouse was 10 g ml−1), and the virus was expressed in brain for 5 weeks. The whole-brain images were collected using the fMOST system following similar procedures as described above. The objective used was a 20× water-immersion lens with NA 1.0, to provide a designed optical resolution (at 520 nm) of 0.35 μm in the xy plane. The imaging gives a sample voxel of 0.32 × 0.32 × 1.0 μm to provide proper resolution to trace the neural process. The voxel size can be varied with different objectives.

Data analysis pipeline

The fMOST datasets have two colour channels. The green channel (excitation wavelength of 488 nm, and emission filter with passing band 510–550 nm) containing fluorescent protein signals from labelled neurons is used to reconstruct neuronal morphology. The red channel (excitation wavelength of 561 nm and emission filter with longpass band of 590 nm) containing propidium-iodide (PI) signal with clear contours of most brain regions, was used to map original images to the Allen CCF space79. We have built a data analysis pipeline to perform neuron reconstruction and spatial mapping.

We used GTree software to reconstruct neuronal morphology with human–computer interaction80. GTree is an open-source graphical user interface tool, it offers a special error-screening system for the fast localization of submicron errors and integrates some automated algorithms to significantly reduce manual interference. To random access image blocks from brain-wide datasets, the original image (green channel) was pre-formatted to TDat, an efficient 3D image format for terabyte- and petabyte-scale large volume image71. GTree has a plugin to import TDat formatted data, and save reconstructions with original position in SWC format. All reconstructions were performed back-to-back by experienced technician and checked by neuroanatomists.

We used BrainsMapi to complete the 3D registration80. Specifically, the image of the red channel was down-sampled to an isotropic 10-μm resolution consistent with the CCFv3. We conduct the registration by several key steps including the initial position correction, regional feature extraction, linear and nonlinear transformation and image warping. Among them, a set of anatomically invariant regional features are extracted manually using Amira (version 6.1.1; FEI) and automatically using DeepBrainSeg81. Based on these, the unwarping neuron reconstructions can be accurately transformed to the CCFv3.

Axonal projection analysis

Some axonal projection analyses were carried out at the laboratory of G.A.A. The brain-wide, single-neuron axonal projections from MOp came from three distinct sources: Janelia MouseLight, fMOST processed and reconstructed at the AIBS, and fMOST processed and reconstructed at the SEU-Allen Center in Nanjing. Each reconstruction from all three datasets was provided with a point-by-point reporting of the regions targeted by each neuron. These were the same data analysed in Fig. 5 of the main text. Exclusive-or (XOR) pairwise comparisons were used to quantify the projection differences between two neurons. The targeted regions were then fully shuffled to produce a randomized distribution consistent with the regional projection patterns, corresponding to the ‘null’ hypothesis of continuous targeting patterns at the single-cell level. The distribution of pairwise XOR distances of the shuffled data was then contrasted with the real pairwise distribution, which enables discernment of how much of the real distribution is accounted for by chance. To this end, given the non-normality of these distributions, we performed a one-tail Levene test82 to ascertain whether the variance of the experimental distribution was significantly larger than that of the shuffled distribution.

To estimate the relative proportions of the 10 clusters containing 15 or more neurons, we matched their respective single-cell axonal patterns against the regional patterns from PHA-L anterograde tracing across all target regions. Specifically, the problem is equivalent to a set of constrained, weighted, linear equations that can be solved numerically by standard non-negative least-square (NNLS) or bounded-variable least-squares (BVLS) optimization. The NNLS algorithm solves the linear least squares problem83 arg minx ||Ax − b||2 with the constraint x ≥ 0. The BVLS variant84 minimizes the same objective function, but subject to explicit boundary conditions. We used the respective R implementations nnls85 and bvls86. Boundary conditions for bvls were 0.01 for lower bound and 1 for upper bound. The results were consistent between the two methods.

Data collection

Several microscopic methods were used to collect fluorescent imaging data: (1) epifluorescence images were collected with the Olympus VS120 fluorescence microscope running Olympus VS-Desktop v2.9; (2) high-resolution confocal images were captured using an Andor DragonFly 202 spinning disc confocal microscope running Fusion v2.1.0.81 software; (3) lightsheet images were captured with a LifeCanvas lightsheet microscope running SmartSPIM Acquisition Software 2019V3 and oblique light-sheet tomography (OLST version 1) running custom open source software (TissueCyte 1000, TissueVision); (4) 3D fluorescently labelled pathway images were collected using STPT instruments with TissueVision software; (5) single-neuron morphology data were collected using fMOST; (6) BARseq data were collected using an Olympus IX81 microscope with a Crest X-light v2 spinning disc confocal, an 89north LDI 7-channel laser, and a Photometrics Prime BSI camera. Image acquisition was controlled through micro-manager. STPT images at the AIBS were processed using the Allen informatics data pipeline (IDP), which manages the processing and organization of the images and quantified data for analysis and display in the web application as previously described4,61. STPT images at CSH were processed with custom open source OpenSTPT software.

Ethics oversight

Ethical oversight of experimental procedures was performed by the Institutional Animal Care and Use Committee (IACUC) of the CSHL, USC, Allen Institute, UCLA, UCSD, MIT, Penn State University and the Institutional Ethics Committee of Huazhong University of Science and Technology.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this paper.