Mouse breeding and husbandry
All procedures were carried out in accordance with Institutional Animal Care and Use Committee protocols at the Allen Institute for Brain Science. Mice were provided food and water ad libitum and were maintained on a regular 14/10 h day/night cycle at no more than five adult animals of the same sex per cage. Ambient temperature of the vivarium was maintained between 21.1 and 22.78 °C (70–73 °F) and humidity was maintained between 40 and 45%. Mice were maintained on the C57BL/6J background. We excluded any mice with dermatitis, anophthalmia, microphthalmia, seizures or abdominal masses.
We used 44 aged mice (20 female, 24 male) and 64 young adult mice (31 female, 33 male) to collect cells for 10xv3 scRNA-seq. All young adult mice were also included in the ABC-WMB atlas3. Aged animals were euthanized at P540–553 (roughly 18 months) and young adult animals were euthanized at P53–69 (roughly 2 months). No statistical methods were used to predetermine sample size. All donor animals used in this study are listed in Supplementary Table 1. The Zeitgeber time of the light/dark cycle was similar (within a 3 h window) for all the tissue collections. We did not keep track of the oestrous cycle for female mice.
We isolated a total of 287 libraries from 108 animals: each animal contributed 1–6 libraries. All libraries are listed in Supplementary Table 1. Transgenic driver lines were used for fluorescence-positive cell isolation by FACS to enrich for neurons. Roughly half the libraries (n = 145) were sorted for neurons from the pan-neuronal Snap25-IRES2-Cre line (JAX strain no. 023525) crossed to the Ai14-tdTomato reporter (JAX strain no. 007914)85,86 (Supplementary Table 1). For unbiased sampling (libraries that were not enriched for neurons), we used Snap25-IRES2-Cre/wt;Ai14/wt mice, Ai14/wt mice or in very few cases wild-type C57BL/6J mice. Unbiased sampling methods include libraries stained and sorted for Hoechst+, Calcein+/Hoechst+ or unstained libraries that were not sorted at all (no FACS). No FACS cells make up roughly 25% of the final high-quality dataset. The transgenic Snap25-IRES2-Cre line was backcrossed to C57BL/6J for at least ten generations before crossing and can be considered congenic. The transgenic Ai14 line was backcrossed to C57BL/6J for at least five generations before crossing and can be considered incipient congenic. Example images of gating strategies used for FACS are shown in Extended Data Fig. 2.
10x scRNA-seq
Single-cell isolation
We used the CCFv3 (RRID: SCR_002978) ontology22 (http://atlas.brain-map.org/) to define brain regions for profiling and boundaries for dissection. We covered all selected regions of the brain by sampling at top-ontology level with judicious joining of neighbouring regions. These choices were guided by the fact that microdissections of small regions are difficult. Therefore, joint dissection of neighbouring regions was sometimes necessary to obtain sufficient numbers of cells for profiling.
Single cells were isolated by adapting previously described procedures20,87. The brain was dissected, submerged in artificial cerebrospinal fluid (ACSF), embedded in 2% agarose and sliced into 350-μm coronal sections on a compresstome (Precisionary Instruments). Block-face images were captured during slicing. ROI were then microdissected from the slices and dissociated into single cells. Fluorescent images of each slice before and after ROI dissection were taken at the dissection microscope. These images were used to document the precise location of the ROI using annotated coronal plates of CCFv3 as reference.
Dissected tissue pieces were digested with 30 U ml−1 papain (Worthington, catalogue no. PAP2) in ACSF for 30 min at 30 °C. Owing to the short incubation period in a dry oven, we set the oven temperature to 35 °C to compensate for the indirect heat exchange, with a target solution temperature of 30 °C. Enzymatic digestion was quenched by exchanging the papain solution three times with quenching buffer (ACSF with 1% fetal bovine serum and 0.2% bovine serum albumin (BSA)). Samples were incubated on ice for 5 min before trituration. The tissue pieces in the quenching buffer were triturated through a fire-polished pipette with a 600 µm diameter opening roughly 20 times. The tissue pieces were allowed to settle and the supernatant, which now contained suspended single cells, was transferred to a new tube. Fresh quenching buffer was added to the settled tissue pieces, and trituration and supernatant transfer were repeated using 300 and 150 µm fire-polished pipettes. The single-cell suspension was passed through a 70 µm filter into a 15 ml conical tube with 500 µl of high BSA buffer (ACSF with 1% fetal bovine serum and 1% BSA) at the bottom to help cushion the cells during centrifugation at 100g in a swinging bucket centrifuge for 10 min. The supernatant was discarded, and the cell pellet was resuspended in the quenching buffer. We collected 1,508,284 cells without performing FACS. The concentration of the resuspended cells was quantified, and cells were immediately loaded onto the 10X Genomics Chromium controller.
To enrich for neurons or live cells, cells were collected by FACS (BD FACSAria II or FACSAria Fusion, with FACSDiva v.8 software) using a 130 μm nozzle. Cells were prepared for sorting by passing the suspension through a 70 µm filter and adding Hoechst or 4,6-diamidino-2-phenylindole (DAPI) (to a final concentration of 2 ng ml−1). The sorting strategy was as previously described3,20, with most cells collected using the tdTomato-positive label. Then, 30,000 cells were sorted within 10 min into a tube containing 500 µl of quenching buffer. We found that sorting more cells into one tube diluted the ACSF in the collection buffer, causing cell death. We also observed decreased cell viability for longer sorts. Each aliquot of sorted 30,000 cells was gently layered on top of 200 µl of high BSA buffer and immediately centrifuged at 230g for 10 min in a centrifuge with a swinging bucket rotor (the high BSA buffer at the bottom of the tube slows down the cells as they reach the bottom, minimizing cell death). No pellet could be seen with this small number of cells, so we removed the supernatant and left behind 35 µl of buffer in which we resuspended the cells. Immediate centrifugation and resuspension allowed the cells to be temporarily stored in a high BSA buffer with minimal ACSF dilution. The resuspended cells were stored at 4 °C until all samples were collected, usually within 30 min. Samples from the same ROI were pooled, cell concentration quantified and immediately loaded onto the 10x Genomics Chromium controller.
Complementary DNA amplification and library construction
For 10xv3 processing, we used the Chromium Single Cell 3′ Reagent Kit v.3 (1000075, 10x Genomics). We followed the manufacturer’s instructions for cell capture, barcoding, reverse transcription, complementary DNA amplification and library construction. We targeted a sequencing depth of 120,000 reads per cell; the actual average achieved was 77,743 ± 36,025 (mean ± s.d.) reads per cell across 287 libraries (Supplementary Table 1).
Sequencing data preprocessing
All libraries were 10xv3 samples and processed as previously described3,20. All libraries were sequenced on Illumina NovaSeq6000 and sequencing reads were aligned to the mouse reference (mm10/gencode.vM23)88 using the 10x Genomics CellRanger pipeline (v.6.0.0) with the –include introns argument to include intronically mapped reads. This resulted in an scRNA-seq dataset containing 2,777,165 cells.
To remove low-quality cells, we used a stringent QC process. Cells were first filtered by a broad set of quality cut-offs based on gene detection, QC score and doublet score. As we previously described3, the QC score was calculated by summing the log-transformed expression of a set of genes, whose expression level is decreased significantly in poor-quality cells. Briefly, these are housekeeping genes that are strongly expressed in nearly all cells with a very tight coexpression pattern that is anticorrelated with the nucleus-enriched transcript Malat1. We use this QC score to quantify the integrity of cytoplasmic messenger RNA (mRNA) content. Doublets were identified using a modified version of the DoubletFinder algorithm89. For this preliminary round of filtering, we included cells with gene detection greater than 1,000, a QC score greater than 50 and a doublet score less than 0.3. Using these thresholds, 1,999,976 cells remained in the dataset (Extended Data Fig. 3a). Mixing of cell types by library and other metadata categories is visualized in Extended Data Fig. 6f.
Clustering scRNA-seq data
Following the initial round of filtering described above, adult and aged single-cell transcriptomes were coclustered over two rounds of clustering. The goal for the first round of clustering was to assign a cell class identity to every unlabelled (aged) cell and filter out low-quality (noise) clusters. The goal of the second round of clustering was to assign a subclass identity to every unlabelled (aged) cell and filter out extra low-quality clusters. All adult cells in the dataset already had labels because they are also part of the ABC-WMB cell-type taxonomy3. For both rounds, clustering was performed independently with the in-house developed R package scrattch.bigcat (v.0.0.1) as was previously described3 (available through https://github.com/AllenInstitute/scrattch.bigcat), which is a version of R package scrattch.hicat20 that can cluster large datasets. Detailed functionality of scrattch.bigcat was discussed in our previous paper3. We used the automatic iterative clustering method, iter_clust_big, to perform clustering in a top-down manner into cell types of increasingly finer resolution. This method performs clustering without human intervention, while ensuring that all pairs of clusters, even at the finest level, were separable by differential gene expression criteria (q1.th = 0.4, q.diff.th = 0.7, de.score.th = 300, min.cells = 50, min.genes = 5) for both rounds of clustering. Following each round of clustering using iter_clust_big, we used the function merge_cl to merge clusters based on total number and significance of shared differentially expressed genes. For round 1, the criteria used for merge_cl were identical to those previously described for clustering. For round 2, the criteria used for merge_cl were almost identical with the exception of increasing min.cells = 100.
Finer resolution analysis was performed on microglia, BAMs, tanycytes and ependymal cells and as such, further clustering was performed on only these cell types as follows:
Microglia and BAMsMicroglia and BAMs were separately clustered using the same parameters as used in round 2 of clustering for the larger dataset except with min.cell = 50 and min.genes = 3. Clusters were mapped to the Hammond et al. dataset.
Tanycytes and ependymal cellsBecause tanycytes were one of the cell types with the greatest sensitivity to age, they are a relatively rare population of cells compared to other types and in our original dataset there were far fewer adult tanycytes sampled by 10xv3 than aged, we included extra tanycytes from the ABC-WMB atlas dataset to even out the cell numbers. These extra adult tanycytes mostly came from libraries that were prepped under the reversed light/dark cycle conditions compared to all other libraries in this study (Extended Data Fig. 11c). Tanycytes and ependymal cells were then clustered separately using the same conditions as described above for round 2 of clustering for the larger dataset.
Label transfer by means of mapping
Because the adult cells have been previously published and annotated, only the cells from the aged libraries did not have annotations. We mapped all aged cells to the ABC-WMB reference taxonomy as previously described3. Briefly, we assigned their cell-type identities by mapping them to the nearest cluster centroid in the reference taxonomy using the corresponding Annoy index using the same method as implemented at present in the R package scrattch.mapping. We also used this approach for assigning cell-type identities for cells segmented from Resolve spatial data to the ABC-WMB cell-type taxonomy or external datasets as reference, using different gene lists based on the contexts. For mapping to the microglia dataset from Hammond et al.4, we used a list of 72 genes that was assembled on the basis of prominent marker genes from each reference cluster. When a mapping confidence score was needed, we sampled 80% genes from the marker list randomly and performed mapping 100 times. We define the fraction of times a cell is assigned to a given cell type as the mapping probability to that type.
Assigning labels to aged cells and removing low-quality clusters
We observed 2,467 clusters after the first round of clustering. At this point, all cells were assigned a cell category (Glut, GABA, Dopa, Sero, IMN or NN), which matched labels from an older version of the ABC-WMB reference taxonomy. As the adult cells have been previously published and annotated, cell annotations for aged cells were assigned on the basis of cluster membership with annotated adult cells. Specifically, clusters that contained more than 5% of annotated adult cells were assigned that cell category. Median gene detection (GCmed) and median QC score (QCmed) were calculated for each cluster. Clusters that belonged to non-neuronal and IMN categories with GCmed < 2,000 and QCmed < 100 were removed from the dataset. Clusters that belonged to neuronal categories with GCmed < 3,000 and QCmed < 250 were removed from the dataset. Clusters with more than 80% contribution from a single library were also filtered out to minimize donor bias in the final dataset. Clusters with less than 5% adult cells were retained in the dataset and carried over into the next round of clustering. Because adult cells that were previously deemed to be low quality were also included in clustering, clusters with the most low-quality cells were also filtered out. In total, 1,197 clusters were removed based on these criteria after the first round of clustering (n = 796,126 cells removed). This resulted in the dataset of 1,203,850 cells, which were carried over into the second round of clustering (Extended Data Fig. 3a).
After the second round of clustering, we observed 928 clusters. All clusters were then assigned supertype identities using majority membership from the final version of annotations from the ABC-WMB atlas. Annotated clusters were then filtered out using class-level quality metrics as following: clusters that belong to Immune, Vascular and Astro-Epen classes with GCmed < 2,000 or QCmed < 150; clusters that belong to OPC-Oligo, OB-CR Glut, DG-IMN Glut and OB-IMN GABA class with GCmed < 3,000 or QCmed < 150; clusters that belong to remaining neuron classes with GCmed < 5,500 or QCmed < 300 (Extended Data Fig. 2a). After this second round of cluster-level filtering, 85 clusters were removed (n = 41,776 cells removed) and 1,162,074 cells remained in the dataset. After including immune cell clusters and ependymal and/or tanycyte clusters that underwent separate rounds of clustering as described above, the final number of clusters in the dataset was 847. These remaining cells and resultant annotations were used for all downstream analysis (Extended Data Fig. 3a).
Off-target cell types were also collected because of dissection variability, and if included in the analysis, may result in bias of age analysis if certain libraries contained more off-target cells than others. To identify and remove these cell types from downstream analysis, we performed the following. First, using all the scRNA-seq data from the ABC-WMB atlas, we calculated the number and proportion of cells in that supertype that originated from the 16 regions included in this ageing study (Fig. 1a) versus other regions. Second, supertypes with less than 30% of cells originating from the 16 regions and have fewer than 500 cells from the 16 regions (based on the ABC-WMB atlas dataset) were not included in downstream analysis. A list of these supertypes found in the ABC-WMB atlas that were excluded due to off-target concerns are listed in Supplementary Table 2. Briefly, they consist of supertypes that are mostly found in the thalamus, medulla and olfactory regions, which were regions not intentionally targeted in this study.
Identifying age-associated differentially expressed genes
Age-associated differentially expressed genes were calculated using the R package MAST23 (v.1.20.0), a widely used statistical framework designed for modelling biological effects from scRNA-seq data.
Differentially expressed genes were calculated at the subclass, supertype and cluster levels (Supplementary Table 3). For all tests, only genes that were expressed at a frequency of more than 10% were tested (that is, only genes expressed in at least 10% of query cells were included). Only subclasses with at least 50 aged and 50 adult cells were evaluated for differentially expressed genes. To decrease running time, for large subclasses, we subsampled them to a maximum of 2,000 cells per age.
At the subclass level, we used the following statistical model to model the effect of age on gene y including various covariates:
$${\rm{Model}}:y \sim {\rm{age}}+{\rm{sex}}+z(\log ({\rm{gc}}))+z(\log ({\rm{qc}}))+{\rm{intercept}}$$
where age and sex are all categorical variable each with two levels, and gene detection (gc) and QC score (qc) are log transformed and then z-score normalized, and the tilde (~) means distributed as. We included both gene detection and QC score in each model to account for potential effects that various FACS population plans had on library quality (Extended Data Fig. 6e,f). A likelihood ratio test was computed between each model with and without the age term to generate P values. These P values were corrected for multiple hypothesis testing with the Bonferroni correction. The effect size estimate for the age term for each model can be interpreted as the log2(fold change) (log2FC) of each gene with covariate adjustment that we refer to as ‘age effect size’ throughout the main body of the text.
Augur cell-type ranking analysis
Cell types at the subclass (for neuronal) and supertype (for non-neuronal) levels were ranked by R package Augur25 (v.1.0.3), an analysis framework that prioritizes cell types most responsive to biological perturbations or conditions in single-cell genomics data. Briefly, the method selects the most variable genes from a set of single-cell data, withholds a set of cells for testing, trains classifiers with remaining cells for each cell type, and predicts withheld labels using the trained model. This is repeated over several iterations and an AUC is reported for each iteration and cell type. An AUC of 1 represents a perfectly predictive model, and an AUC of 0.5 represents a model that predicts no better than random guessing. Mean AUC values generally correlated well with the number of age-DE genes per group and are reported in Figs. 1g, 2d and 5a and Supplementary Table 2.
For AUC analysis on both neurons and non-neuronal cells, we used the following Augur parameters: feature_perc = 0.8, var_quantile = 0.9, subsample_size = 100 for non-neuronals and subsample_size = 200 for neurons. We also modified Augur’s select_variance() function (which selects the highest variance genes to include in the model) to calculate dispersion (variance/mean) per gene rather than the calculation that was implemented by Augur’s original function (mean/s.d.).
Pseudo-bulk analysis
We also performed differentially expressed gene analysis at the pseudo-bulk level with R package EdgeR24 (v.3.32.1). Mean gene expression was calculated for each cell type and library combination. We fit a simple model modelling gene expression as a function of age using EdgeR’s likelihood ratio test implemented using default parameters using function glmFit() and glmLRT(). Examples of logFCs calculated from EdgeR are shown in Extended Data Fig. 6a,b and correlations with age effect sizes estimated from MAST are summarized in Extended Data Fig. 6c.
Cluster odds ratio analysis
To assess whether clusters were made up of more aged or adult cells than expected by chance, we calculated OR using the numbers of aged and adult cells per cluster (Supplementary Table 2):
$${\rm{OR}}=(a/c)/(b/d)$$
where a is the number of aged cells in the cluster, b is the number of adult cells in the cluster, c is the number of aged cells in the class minus a and d is the number of adult cells in the class minus b. For tanycytes, b and d were calculated at the subclass level rather than the class level due to inclusion of extra cells from the ABC-WMB atlas that were not included for other cell types.
The log2OR values for non-neuronal clusters are summarized in Fig. 2b. Positive log2OR indicate clusters that are more biased towards aged cells than expected by chance (that is, age-enriched), whereas negative log2OR indicated clusters that are more biased towards young adult cells than expected by chance (that is, age-depleted). We highlight clusters with abs(log2OR) > 2.5.
UMAP projection
We used principal components calculated from principal component analysis (PCA) to calculate UMAPs for different groups of cells90. For UMAPs with more than 100,000 cells, we performed PCA based on the imputed gene expression matrix of genes based on top marker genes from each cluster within each grouping of cells. For UMAPs with fewer than 100,000 cells, no imputation was used. Three parameters that can be adjusted when generating UMAPs include (1) the number of principal components that are used to calculated projections; (2) nn.neighbours, the size of the local neighbourhood of cells the UMAP will look at when trying to learn the structure of the data and (3) md, the minimum distance apart that cells are allowed in low-dimensional resolution. For all UMAPs, the top 150 principal components were then selected, and principal components with more than 0.7 correlation with the technical bias vector (defined as log2(gene count) for each cell) were removed. Each PCA was run with a unique gene list and each UMAP was run with a different set of nn.neighbours and md parameters. The parameters used for each PCA/UMAP were as follows: 6,446 genes, nn.neighbours = 20, md = 0.5 for the global UMAP (Fig. 1); 984 genes, nn.neighbours = 20, md = 0.5 for the OPC-Oligo UMAP (Fig. 3); 1,884 genes, nn.neighbours = 5, md = 0.5 for the Immune UMAP (Extended Data Fig. 10); 1,806 genes, nn.neighbours = 20, md = 0.5 for the Astro-Epen UMAP (Fig. 4); 401 genes, nn.neighbours = 5, md = 0.5 for the tanycyte and ependymal cell UMAP (Fig. 4); 1,169 genes, nn.neighbours = 5 and md = 0.5 for the HY (hypothalamus) neuron UMAP (Fig. 5).
Constellation plots
The global relatedness between cell types was visualized with constellation plots, which we had implemented previously3,20. To generate the constellation plot, each transcriptomic cluster was represented by a node (circle), whose surface area reflected the number of cells within the subclass in log10 scale. The position of each node was based on the centroid position of the corresponding cluster in UMAP coordinates. The relationships between nodes were indicated by edges that were calculated as follows. For each cell, 15 nearest neighbours in reduced dimension space were determined and summarized by cluster. For each cluster, we then calculated the fraction of nearest neighbours that were assigned to other clusters. The edges connected two nodes in which at least one of the nodes had more than 5% of nearest neighbours in the connecting node. The width of the edge at the node reflected the fraction of nearest neighbours that were assigned to the connecting node and was scaled to node size. For all nodes in the plot, we then determined the maximum fraction of ‘outside’ neighbours and set this as edge width that was 100% of node width. The function for creating these plots, plot_constellation included in the R package scrattch.bigcat.
GO enrichment analysis
GO term enrichment was performed using the R package gprofiler2 (ref. 91) (v.0.2.2). The function gost was implemented using parameter ‘ordered = T’ to perform enrichment analysis using a hypergeometric test followed by correction for multiple testing on positive and negative age-DE genes separately. We queried all databases included in gprofiler’s default implementation (GO:molecular function, GO:biological process, GO:cellular component, KEGG, Reactome, TRANSFAC, miRTarBase, Human Protein Atlas, Human Phenotype Ontology). Only GO terms were shown in main figures here, but all significant terms from all databases are included in Supplementary Table 4. An adjusted P value cutoff of 0.01 was used to determine significant terms. Multiple testing correction was performed using gprofiler2’s default algorithm g:SCS (set counts and sizes), which accounts for the dependency of multiple tests in the context of enrichment analysis by taking into account the overlap of functional terms. It is more conservative than false discovery rate, but less strict than the Bonferroni correction91. All enrichment analysis P values reported in the figures have been adjusted using this method. GO significance scores shown in Fig. 6 represent the −log10(P value) for each term. Positive scores were enriched in genes observed to be increasing with age and negative scores were enriched in genes observed to be decreasing with age.
Resolve spatial transcriptomics
Resolve Molecular Cartography overview
All in situ spatial RNA data shown here were generated by Resolve Biosciences with their commercially available Molecular Cartography platform. Four total Molecular Cartography experiments were performed (RSTE1–4), each with a different panel of 100 genes and targeting different region(s) of the brain (Extended Data Fig. 5). For RSTE1, four different regions of the brain (cortex, striatum, midbrain and hindbrain) were imaged in both sexes and both ages (2 and 18 months), with two replicate brains per condition and two technical replicates per brain. The technical replicates were plotted and analysed as independent replicates in all figures. For RSTE2, the RSP and hippocampus were imaged in both sexes and ages, with four replicate brains per condition. For RSTE3 and RSTE4, the hypothalamus was imaged in both sexes and both ages, with four replicate brains per condition. Brain dissection and cryosectioning for Molecular Cartography experiments were performed at the Allen Institute for Brain Science in Seattle, WA, samples were stored at −80 °C for 1–3 days, and then shipped overnight to Resolve Biosciences in San Jose, CA, USA where the Molecular Cartography protocol was performed. Spot data were then made available 1–2 weeks after receipt of tissue. Data analysis was performed at the Allen Institute using methods detailed below. Briefly, transcript data were segmented into cells, cells were filtered based on quality metrics generated from segmentation and mapping, and downstream analysis and visualization was performed.
Brain dissection and freezing
Mice used for spatial experiments were housed and kept in same conditions as those used for scRNA-seq described above. Mice were transferred from the vivarium to the procedure room with efforts to minimize stress during transfer. Mice were anaesthetized with 5% isoflurane. A grid-lined freezing chamber was designed to allow for standardized placement of the brain within the block to minimize variation in sectioning plane. Chilled optimal cutting temperature compound (OCT) was placed in the chamber, and a thin layer of OCT was frozen along the bottom by brief placement of the chamber in a dry ice and ethanol bath. The brain was rapidly dissected and placed into the prechilled OCT for roughly 2 min to acclimate to the cold before freezing. The orientation of the brain was adjusted under a dissecting scope, and the freezing chamber containing OCT and brains was placed into a dry ice and ethanol bath for freezing. After freezing, the brains were vacuum sealed and stored at −80 °C.
Cryosectioning
The fresh-frozen adult and aged brains were sectioned at 10 µm on Leica 3050 S cryostats. The OCT block containing a fresh-frozen brain was trimmed in the cryostat until reaching the desired region of interest. Sections were placed onto coverslips provided by Resolve Biosciences. Two replicate sections were collected sequentially: one as the primary sample and the other as a backup.
Gene panel design
The Molecular Cartography platform allows 100 genes per experiment for spatial RNA profiling. Each of the four Molecular Cartography experiments we ran was designed to target different regions and cell types in the adult and aged brains. Therefore, for each experiment we used different gene panels, which were compiled through a combination of automated and manual processes. Glutamatergic and GABAergic neuronal class markers Slc17a7, Slc17a6, Gad1 and Gad2 and major non-neuronal subclass markers Aqp4, Apod, Sox10, Pdgfra, Enpp6, Opalin, Dcn, Pecam1, Ctss, Mrc1, Kcnj8, Pdgfrb and Acta2 were included for all four Resolve experiments. The remaining genes in each panel were then customized for each of the four experiments. RSTE1 targeted non-neuronal types in different major brain structures. RSTE2 primarily targeted neurons in the isocortex and hippocampus, as well as certain non-neuronal types. RSTE3 primarily targeted tanycytes and ependymal cells around the V3 of the hypothalamus. RSTE4 primarily targeted the neurons around the V3. The function select_N_markers included in the R package scrattch.hicat was used to select markers for all relevant subclasses and clusters in each experiment. The top age-DE genes were also included for relevant subclasses within each panel, as well as more genes of interest selected from previous literature.
Cell segmentation
Cells were segmented using a combination of open-source software Cellpose92 (v.2.1.0) and Baysor93 (v.0.6.2). Cellpose uses a generalist algorithm for segmenting cells from images of cellular stains as input. Baysor uses a transcript-driven algorithm to draw cell boundaries based on transcript data alone while also having the option of integrating previous knowledge from stained images into the process. First, images of DAPI stains from each of the tissue samples were used as input for Cellpose using the following parameters: –pretrained_model = nuclei, –diameter = 0. The output of Cellpose was saved as a TIF file and used as a prior for the Baysor segmentation algorithm. Baysor was run with the following input parameters: -m 30, -s 50.
In situ data preprocessing
All segmented cells were mapped to the ABC-WMB cell-type taxonomy with the same method used for scRNA-seq data as described above. The four RSTE datasets were filtered for high-quality cells using a combination of thresholds for mapping confidence score, segmentation confidence score (from Baysor), number of transcripts and gene detection. Owing to the variable gene panels and brain regions across the four RSTE datasets, we used a different set of filter criteria for each experiment. For RSTE1, neurons with between more than 50 and fewer than 3,000 transcripts, more than 0.9 average segmentation confidence and three or more unique genes were retained; non-neuronal cells and IMNs between more than 10 and fewer than 1,000 transcripts, more than 0.9 average segmentation confidence and three or more unique genes were retained. For RSTE2, neurons with between more than 50 and fewer than 3,000 transcripts, more than 0.9 average segmentation confidence, three or more unique genes and more than 0.4 mapping correlation score were retained; non-neuronal cells between more than 10 and fewer than 1,000 transcripts, more than 0.9 average segmentation confidence, three or more unique genes and more than 0.4 mapping correlation score were retained; IMNs between more than 100 and less than 1,000 transcripts, more than 0.9 average segmentation confidence, three or more unique genes and more than 0.4 mapping correlation score were retained. For RSTE3, neurons with more than 100 transcripts, more than 0.95 average segmentation confidence and three or more unique genes were retained; tanycytes with more than 300 transcripts, more than 0.95 average segmentation confidence and ten or more unique genes were retained; astrocytes with more than 50 transcripts, more than 0.95 average segmentation confidence and ten or more unique genes were retained; remaining non-neuronal cells with more than 30 transcripts, more than 0.95 average segmentation confidence and three or more unique genes were retained. For RSTE4, neurons with more than 50 transcripts, more than 0.95 average segmentation confidence and three or more unique genes were retained; non-neuronal cells with more than 20 transcripts, more than 0.95 average segmentation confidence and three or more unique genes were retained. Cell counts for each experiment before and after quality filtering are shown in Extended Data Fig. 5. Quantification of select cell-type densities (Extended Data Fig. 8) was performed across Resolve image tiles. A single imaging tile is equivalent to 296 × 296 µm. The ranges of number of tiles imaged per region per RSTE dataset are listed in Extended Data Fig. 5.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.