Transcription from megabase-scale heterochromatin generates neural barcodes

Animal models and tissue preparationAnimalsMice were treated in compliance with the rules and regulations of the Institutional Animal Care and Use Committee (IACUC) at the University of California, San Francisco under the IACUC protocol AN-170364-03F. For ORCA experiments involving RNA imaging, postnatal day 11 mice were used. For ORCA experiments involving conditional knockouts, mice older than postnatal day 35 were used to allow time for the knockout to take effect. Rad21 cKO mice were generated by crossing Rad21 conditional allele mice51 to Omp-ires-cre mice (Omptm1(cre)Jae) harbouring a Cre-inducible tdTomato allele (ROSA26-tdtomato, Gt(ROSA)26Sortm14(CAG-tdTomato)Hze/J). Setdb1 cKO mice were generated using the same strategy. Setdb1 conditional allele mice were purchased from Shanghai Model Organisms (C57BL/6Smoc-Setdb1tm1(flox)Smoc, NM-CKO-190052). For the nChIP–seq experiments, cells were sorted from Krt5–GFP (labelling HBCs), Ngn1–GFP (labelling INPs) and Omp-ires–GFP (labelling mOSNs) mice. Primers used for genotyping mice are listed in Supplementary Table 1.Tissue processingMice were perfused with 30 ml of ice-cold PBS followed by 30 ml of freshly prepared, ice-cold 4% paraformaldehyde (PFA). Tissue from the mouse OE was dissected and incubated in 4% PFA with gentle rocking at 4 °C for 6 h. Tissue was then transferred to 30% sucrose in 1 × PBS, incubated with gentle rocking at 4 °C until sunk, then embedded in OCT. For ORCA experiments, OE tissue was sectioned coronally at 6 μm onto glass coverslips (Biooptechs, 40-1313-03191) coated with chromium potassium gelatin. Slides were coated as described previously52. For immunohistochemistry experiments, OE tissue was sectioned coronally at 20 μm onto Superfrost Plus slides (Fisherbrand, 1255015). ORCA coverslips were stored at −80 °C until use; immunohistochemistry slides were stored at −20 °C until use.ORCA, RNA FISH and STORM experimental workflowsFor a breakdown of all ORCA-related experiments in the present study, see Supplementary Table 4. The genomic coordinates of the ORCA barcodes tiling the Pcdh locus are listed in Supplementary Table 5.ORCA primary probe hybridizationRNA and DNA probes were designed and hybridized as previously described52, with minor modifications as follows. Briefly, for combined RNA/DNA imaging experiments, RNA probes were hybridized and imaged first. Tissue sections mounted on coverslips were fixed in freshly prepared 4% PFA at room temperature for 10 min, followed by three washes in 1 × PBS. Sections were then permeabilized for 10 min at room temperature in 1% Triton X in 1 × PBS, followed by two washes with 1 × PBS. Next, sections were incubated for 5 min at room temperature in a protease solution consisting of 0.1 mg ml−1 pepsin (Sigma Aldrich, 501784863) in 10 mM HCl and washed twice in 0.1 M glycine in 1 × PBS to improve RNA hybridization efficiency. Sections were then cleared in 8% sodium dodecyl sulfate at room temperature for 10 min and washed three times in 2 × SSC, reducing background fluorescence. Following clearing, sections were incubated in Hybridization Buffer (2 × SSC, 50% formamide, 0.1% Tween) for 35 min at room temperature. Then, 2,500 ng of primary RNA probes diluted in Hybridization Solution (2 × SSC, 50% formamide, 10% dextran sulfate, 0.1% Tween) were added to the sections, covered with coverglass and incubated overnight (12–20 h) at 42 °C. The following morning, samples were washed twice for 10 min in 2 × SSC at 42 °C, washed once in 2 × SSC at room temperature, then imaged. After RNA imaging, samples were re-fixed in 4% PFA for 5 min at room temperature, washed three times in 2 × SSC, re-permeabilized for 10 min in 1% Triton X-100 at room temperature and washed three times in 2 × SSC. Sections were subsequently incubated for 5 min in 0.1 M HCl and washed three times in 2 × SSC. Pre-hybridization was performed for 35 min as for RNA, then 5,000 ng of DNA probes diluted in Hybridization Solution were added to sections and covered with coverglass. Sections were then incubated on a 90 °C hotplate for exactly 7 min and transferred to 42 °C overnight. The following morning, samples were washed twice in 2 × SSC for 10 min at 42 °C, once in 2 × SSC at room temperature, then incubated in a post-fix solution (2% glutaraldehyde, 8% PFA in 1 × PBS) for 30 min. Samples were then washed three times in 2 × SSC and imaged.For ORCA experiments not involving RNA imaging, samples were fixed, permeabilized, cleared, treated with HCl, pre-hybridized and hybridized as described above, but omitting the protease step. Inclusion of the protease step was found to substantially improve RNA staining and was therefore used only for experiments that included RNA imaging. For ORCA experiments involving fluorescent protein labelling (for example, tdTomato signal in Rad21 cKO and Setdb1 cKO), samples were first fixed and washed, imaged for the fluorescent protein and then processed for DNA ORCA as described above. Throughout all procedures, care was taken to prevent sections from drying at any point in the protocol to minimize tissue shrinkage between RNA or protein imaging rounds and subsequent DNA imaging rounds.ORCA imagingSamples hybridized with primary probes were imaged on a previously described custom microscopy and microfluidics setup29,52. RNA and DNA readout barcodes were labelled sequentially with a 750 dye complementary to the readout barcodes on primary probes. All RNA and DNA probes share a common sequence that was labelled with a Cy3 dye complementary to this sequence, referred to as the fiducial. Fiducial probes were added before the first imaging round and imaged alongside each barcode. Fiducial signal was subsequently used for drift correction and alignment across imaging rounds. For RNA imaging, the fiducial signal captures all stained RNAs, whereas for DNA imaging it appears as discrete puncta, with each punctum representing one Pcdh locus.H3K9me3 STORM imagingOE tissue was first stained for H3K9me3 as follows. Tissue on glass coverslips was fixed for 10 min in 4% PFA, washed twice in 1 × PBS, quenched for 5 min in PBS containing 0.1 M glycine and washed again in PBS. Tissue was permeabilized with three 5-min washes in PBS containing 0.1% Triton X-100, then blocked in PBS containing 1% BSA and 200 U ml−1 RNase inhibitor (New England Biolabs, M0314L). Primary antibody incubation was performed overnight at 4 °C using rabbit anti-H3K9me3 antibody diluted 1:1,000 in blocking buffer (Abcam, ab8898). The following morning, tissue was washed three times for 5 min each in PBS containing 0.1% Triton X-100, then incubated with donkey anti-rabbit Alexa Fluor 647 secondary antibody diluted 1:1,000 in blocking buffer (Invitrogen, A31573). Tissue was then washed three times for 5 min each in PBS containing 0.1% Triton X-100. Samples were stored at 4 °C in PBS protected from light until imaging. To image OE tissue with STORM, an imaging buffer was prepared immediately before use as follows. A dilution buffer was first prepared containing 50 mM NaCl and 200 mM Tris pH 8.0. A glucose oxidase/catalase oxygen-scavenging solution was prepared by combining 700 μl of dilution buffer, 49 mg of glucose oxidase and 175 μl of catalase, centrifuging at maximum speed for 1 min and collecting 800 μl of supernatant. STORM imaging buffer was prepared by adding 800 μl of glucose oxidase/catalase oxygen-scavenging solution, 8 ml of 50% glucose and 400 μl of β-mercaptoethanol to 32 ml of dilution buffer.For each field of view, fresh STORM imaging buffer was flowed onto the sample immediately before imaging. H3K9me3 STORM videos were acquired at five axial positions using the 635-nm laser at maximum power and an exposure time of 0.5 s per frame. The first and fourth videos contained 3,000 frames, whereas the remaining videos contained 2,500 frames. Fresh STORM imaging buffer was flowed onto the sample after the third video to maintain fluorophore blinking during prolonged imaging. Further frames were acquired after addition of fresh buffer because extra illumination time was required for photobleaching before robust fluorophore blinking could be observed.STORM videos were acquired across multiple axial planes rather than using astigmatism-based 3D STORM with a cylindrical lens53, because high tissue background made accurate fitting of astigmatic spot widths unreliable. The five axial planes were separated by 750 nm and sampled a 3.0-μm axial range centred on the plane with strongest H3K9me3 signal. Subsequent ORCA imaging of the same samples was acquired using Z-stacks containing matched axial planes to those imaged by STORM.Aligning across imaging roundsFluorescently tagged WGA, which labels cell membranes, was used to align fields of view across imaging sessions (for example, to align H3K9me3 STORM, RNA and Pcdh DNA images). First, 3 μl of 1 ng μl−1 WGA was diluted in 600 μl of 2 × SSC, added to samples for 15 min, then washed off with 2 × SSC immediately before imaging. For RNA and Pcdh DNA imaging, the fiducial channel was imaged alongside the WGA signal at the end of each imaging session. For H3K9me3 STORM, WGA images for each field of view were taken immediately following completion of STORM acquisition. For imaging of fluorescent proteins tagging mOSNs, WGA was imaged simultaneously in a different channel alongside the fluorescent protein. When aligning images across RNA and DNA imaging rounds, images from each field of view were first aligned to the fiducial signal acquired with WGA, and fields of view were subsequently registered across imaging modalities using the WGA signal. The WGA signal additionally enabled 3D cell segmentation (described below).Microscopy setupAll imaging was performed on a custom microscopy and microfluidics setup as previously described29,52. The details of the microscopy setup are also listed on the 4DN data portal and Mirco-Meta App54 under Stanford-Boettiger_lab_ORCA_Nikon_Eclipse_Ti2-U_Scope3.Image processing and single-cell/single-allele annotationsCell segmentation and classificationThree-dimensional cell segmentations were generated from the WGA signal acquired during RNA imaging. We trained a Cellpose55 algorithm to identify cell outlines in individual sections of WGA images. This algorithm was then run on every section of WGA Z-stack images for each field of view. To connect the resulting two-dimensional (2D) cell segmentations into 3D cell segmentations, we applied ultrack56, an algorithm initially designed to track cells over time in time-series data, to the 2D segmentations for each stack, effectively treating the Z dimension as time. Ultrack produced 3D cell segmentations that matched WGA staining (Extended Data Fig. 3a). We used ultrack, as we found Cellpose’s performance with 2D images to be superior to its performance with 3D images for OE sections stained with WGA.Segmented cells were classified into distinct cell types on the basis of RNA transcripts within each segmentation as follows. RNA puncta were first identified from 3D stacks using storm-analysis (https://doi.org/10.5281/zenodo.7679267), which identifies their X, Y position in each frame and is robust to overlapping spots. The Z position of each punctum was computed by fitting the axial fluorescence intensity profile to puncta with a common X, Y position (https://doi.org/10.5281/zenodo.7698979). RNA puncta were then mapped to cell segmentations and segmentations were classified by cell type as follows: for each cell, counts of Icam1, Ascl1, Tex15, Gap43 and Omp transcripts were log-transformed, Z-scored and combined into marker-specific scores corresponding to HBCs (Icam1), GBCs (Ascl1), INPs (Tex15), iOSNs (Gap43) and mOSNs (Omp high, Gap43 low). Cells were assigned to the cell type with the highest score, subject to further marker-based rules (Tex15+ cells were forced to INP and not allowed to be mOSN; HBC labels were forbidden in Gap43+ or Omp+ cells). A confidence score was defined as the difference between the top two scores, and cells with low confidence or ambiguous profiles were labelled ‘undetermined’. To map DNA loci to each segmentation, the X, Y, Z coordinates of DNA loci were transformed by the image alignments computed between WGA images. Each locus was then mapped to a classified cell from its respective field of view and assigned that cell’s label.For ORCA experiments involving protein rather than RNA staining, DNA loci were classified as belonging to a particular cell type (namely, mOSNs) on the basis of the fluorescent signal of tdTomato. Apart from Fig. 1 and Extended Data Fig. 2d,e, data in all figures come from cells classified as mOSNs.Nascent Pcdh puncta classificationAfter aligning images from RNA and DNA imaging rounds, the X, Y, Z positions of RNA puncta and DNA loci were registered into a common coordinate system. For each DNA locus, we computed the 3D Euclidean distance to every RNA punctum in the same field of view in voxel units, where X–Y coordinates are in pixels and Z is in imaging planes. A locus was classified as ‘transcribing’ for a given gene if at least one RNA punctum for that gene lay within a 3D distance of 8 voxel units, and as ‘non-transcribing’ otherwise. This threshold corresponds to 1.23–1.60 μm in physical space, depending on how the separation between DNA and RNA puncta is distributed across the X–Y and Z axes. The threshold of 8 voxel units was chosen on the basis of the distribution of nearest RNA distances across all DNA loci for each Pcdh RNA, which was consistently bimodal, with one population less than 8 voxel units and another greater than or equal to 8 voxel units.H3K9me3 STORM analysisSTORM videos were processed frame by frame using the 2dfixed multi-emitter-fitting algorithm from storm-analysis (https://github.com/ZhuangLab/storm-analysis). Initial frames dominated by saturated fluorescence before photobleaching were excluded. Single-molecule localizations in each frame were identified using a 10-sigma detection threshold and fit with a fixed-width 2D Gaussian model using an initial Gaussian sigma of 1.3 pixels. Drift correction was not applied during fitting. Localizations were fit independently for each axial imaging plane, and each localization was assigned the Z position of its corresponding imaging plane for downstream analysis.H3K9me3 STORM signal around Pcdh loci in mOSNs was quantified as the number of STORM localizations within a 324-nm radius, corresponding to 3 pixels, of the X–Y position of the fiducial signal of each locus. Similar results were obtained using different radius sizes. For each locus, localizations were counted from the STORM imaging plane or planes nearest to the locus in Z. If the locus was located in the same Z plane as a STORM video, only localizations from that plane were used. If the locus was located between two STORM imaging planes, localizations from both planes were included and linearly weighted according to their proximity to the locus Z position. For example, for a locus located at Z plane 26 between STORM videos acquired at planes 25 and 28, localizations from plane 25 were weighted by 2/3 and localizations from plane 28 were weighted by 1/3. For the analyses in Fig. 2f, the same quantification was performed using the X, Y and Z position of the ORCA barcode containing the Pcdh gene being analysed, rather than the fiducial position of the locus.For the simulations in Fig. 2c, randomized positions were used to compare H3K9me3 STORM signal at observed Pcdh loci with signal expected at other positions within the same nuclei. For each of 1,000 simulations, one random position was selected for each observed Pcdh locus from the same cell and Z plane, thereby controlling for non-uniform axial distribution of H3K9me3 STORM signal within individual cells. H3K9me3 STORM signal was quantified at each randomized position using the same 324-nm radius and Z-plane weighting scheme described above. The median STORM signal from each simulation was used to generate a null distribution, which was compared with the observed median STORM signal around Pcdh loci to calculate an empirical P value. The same randomization and quantification procedure was performed for putative Tex15 transcription sites in INPs for Extended Data Fig. 7d. Putative Tex15 transcription sites were identified from Tex15 RNA FISH z-stacks by detecting bright 3D regional maxima. For each field of view, the Tex15 stack was smoothed with a 3D Gaussian filter and thresholded to identify local maxima corresponding to candidate nascent RNA puncta. The intensity threshold was empirically chosen by visual inspection across fields of view to retain bright Tex15 transcription sites while excluding dimmer spots probably corresponding to mature transcripts.For visualization of H3K9me3 STORM localizations together with ORCA traces in three dimensions (Extended Data Fig. 7a), STORM localizations from each axial imaging plane were shown with a randomized Z position drawn from a truncated Gaussian distribution centred on the corresponding STORM imaging plane. The Gaussian had a standard deviation of 1.2 imaging-plane units and was truncated to ±3.5 imaging-plane units around the plane centre. This jittering was used only to create smooth 3D renderings of STORM signal across the sparsely sampled axial planes and was not used for quantitative analyses.Image processing and spot calling for ORCA dataImage processing (drift correction and localization of spots) was performed as described previously29,52 using ORCA analysis tools (https://github.com/BoettigerLab/ORCA-public).ORCA analysesORCA data processingBefore downstream analyses, ORCA traces were quality filtered on the basis of barcode detection. For each experiment, we computed the number of detected barcodes per trace. Median barcode detection per trace was calculated to be around 40–60 barcodes, and we restricted our analysis to traces with ≥25 detected barcodes. We further filtered out traces with unnaturally high barcode detection, keeping only traces with ≤86 barcodes detected. For each retained trace, the 3D positions of detected barcodes were ordered by genomic position. Next, barcodes with consistently poor detection or abnormal labelling (for example, failed strand displacement) were assigned estimated positions by linear interpolation in traces for which the immediately flanking barcodes were detected. This selective interpolation was applied to 2–5 barcodes per experiment. For contact frequency map analyses, such as those presented in Figs. 1e and 3e–g, we further interpolated missing barcodes using a maximum gap length of three consecutive missing barcodes. This interpolation preserved the major features of contact frequency maps while improving their smoothness. Different maximum gap lengths were tested. Gap lengths greater than three did not produce measurable further smoothing, whereas allowing larger interpolations produced abnormally short adjacent-barcode distances. For all other analyses, raw detected barcode positions were used, with only the selective interpolation of poorly labelled barcodes described above.For contact frequency analyses, we chose contact thresholds near the average distance between adjacent barcodes in a spatially contiguous region of the locus. These thresholds ranged from 170 to 220 nm across experiments. We also conducted a threshold parameter sweep to verify that observed contact patterns were robust to a range of thresholds around the selected value, and varying the contact threshold within a reasonable range did not qualitatively alter any within-experiment effects. Thresholds were used to call contacts between all barcode pairs in an experiment. The thresholds used for each experiment are listed in Supplementary Table 4.Enhancer–promoter contact frequency analysesEnhancer–promoter barcode pairs were assigned on the basis of previously reported regulatory relationships between Pcdh cluster enhancers and their target promoters13,15,25,57, together with the ORCA locus positions containing the corresponding genes and enhancers. All Pcdha genes were assigned the HS5-1 enhancer (barcode 27), whereas Pcdhb genes were assigned the HS18-22 enhancer (barcode 78) and Pcdhg genes were assigned the HS16-17 enhancer (barcode 76). Enhancer–promoter contact frequencies were extracted from contact frequency matrices generated from max-gap-3 interpolated polymer coordinates, as described above. For ORCA barcodes containing multiple Pcdh promoters, combined gene labels were used.Distance-to-centre analysesWe defined the geometric centre of an ORCA trace as the median X, Y, Z position of all detected barcodes in that trace. For the distance-to-centre profiles in Fig. 1i, we computed the Euclidean distance between each barcode and this centre on a per-trace basis, then plotted, for each position, the median distance across all traces. When distances to the centre of the heterochromatin domain were measured in Fig. 4c and Extended Data Figs. 9a–d and 10d, the heterochromatin centre was defined as the median X, Y, Z position of barcodes assigned to the heterochromatin domain (barcodes 2–14 and 29–67), and the distances of relevant locus positions to this centre were measured. When distances to the centre of a euchromatin region were measured in Extended Data Fig. 9a–d, the centre was defined as the median X, Y, Z position of barcodes assigned either to the euchromatin stretch between the Pcdha and Pcdhb clusters (barcodes 15–28) or to the euchromatin stretch downstream of the Pcdhg cluster (barcodes 68–90), depending on the specific locus position being analysed.Radius of gyration analysesRadius of gyration (\({R}_{{\rm{g}}}\)) was used as a single-number measure of the spatial spread of a set of barcodes around its geometric centre47. For a set of \(N\) barcodes with 3D coordinates {\({r}_{i}\)}, we first calculated the centre \(c\) as the coordinate-wise median position, then defined \({R}_{{\rm{g}}}\) as \({R}_{{\rm{g}}}=\sqrt{\frac{1}{N}{\sum }_{i=1}^{N}{||}{r}_{i}-c{{||}}^{2}}\). The \({R}_{{\rm{g}}}\) of the heterochromatin domain was primarily evaluated. In Fig. 5e, the heterochromatin domain \({R}_{{\rm{g}}}\) was calculated as a fraction of the trace-wide \({R}_{{\rm{g}}}\).Compartment distance analysesFor each isoform measured in Fig. 4a, the promoter barcode was assigned on the basis of the ORCA locus position containing the respective Pcdh gene. The heterochromatin compartment was defined as barcodes 2–14 and 29–67. The euchromatin compartment was defined on the basis of the cluster of the promoter being analysed: barcodes 15–28 for Pcdha promoters, and barcodes 68–90 for Pcdhb and Pcdhg promoters. The promoter barcode itself was excluded from the compartment to which it belonged. For each trace, a promoter-to-heterochromatin centre distance was calculated as the median Euclidean distance between the promoter barcode and all heterochromatin compartment barcodes. Promoter-to-euchromatin centre distances were calculated analogously as the median Euclidean distance between the promoter barcode and all barcodes in the corresponding euchromatin compartment.Entropy analysesIn Extended Data Fig. 10e, entropy was calculated for the distance distributions between pairs of locus positions as described previously58. For each barcode pair, we pooled 3D distances across all traces within each genotype separately, then normalized each genotype’s distances by that genotype’s own median distance for the pair to account for length-scale differences between experiments. We then pooled the normalized distances from both genotypes together and set common histogram bin edges (50 bins) using the 1st and 99th percentiles of this pooled, normalized distribution, so that entropy values were computed on the same scale for both genotypes. Using these shared bin edges, we separately estimated each genotype’s distribution, normalized bin counts to probabilities pk and computed Shannon entropy as \(S=-{\sum }_{k}{p}_{k}{\log }_{2}({p}_{k})\), such that higher S reflects broader, more variable distances and lower S indicates more narrowly peaked, reproducible distances. For each locus position, we calculated its entropy with respect to all other positions, averaged these pairwise entropies per position and compared the resulting mean entropies between Setdb1 cKO and WT.Separation score analysesTo quantify spatial segregation between heterochromatic and euchromatic regions of the Pcdh locus, we calculated a separation score as follows. For each polymer, we designated heterochromatin locus positions (barcodes 2–14 and 29–67) as region A and euchromatic locus positions (barcodes 15–28 and 68–90) as region B, computed all pairwise 3D distances and took the median distance between A and B (heterochromatin–euchromatin) and the median distance within A (heterochromatin–heterochromatin). The separation score was defined as the ratio of these two medians (medianA–B/medianA–A), such that higher values indicate that the heterochromatin domain is more spatially separated from neighbouring euchromatin. This score was computed per trace for WT, Rad21 cKO and Setdb1 cKO and compared across genotypes.Sequencing, validation and orthogonal assaysIn vitro validation of Pcdh RNA probesTo validate the specificity of RNA probes targeting Pcdha and Pcdhg isoforms, plasmids encoding Pcdha and Pcdhg variable exons fused to mCherry under control of a CMV promoter were generated through FastCloning59. Plasmid sequences were validated using Plasmidsaurus. Plasmids were transfected into Cath.a-differentiated cells grown in eight-well Ibidi glass-bottom plates (Ibidi, 80827). Cells were seeded at a density of 40,000 cells per well in 220 μl of media and transfected after 24 h of growth using lipofectamine (Invitrogen, L3000001). Each well was then stained with primary RNA probes according to the procedure described above. For 12 plasmids across each of the Pcdha and Pcdhg clusters, three wells were transfected, with each well stained by a different ORCA readout barcode. Only wells that were labelled with a readout barcode mapping to the Pcdh isoform they were transfected with produced signal.FACSFACS isolation of mouse OSNs was performed as previously described15. In brief, mice were euthanized with CO2 followed by cervical dislocation and OE tissue was immediately dissected. Cells were then dissociated into a single-cell suspension by incubating freshly dissected tissue with papain for 30–40 min at 37 °C according to the Worthington Papain Dissociation System. After dissociation and filtering through a 35-μm cell strainer, cells were resuspended in 1 × PBS with 2% fetal bovine serum (FBS), DNase (0.0025% final concentration) and DAPI. Fluorescent cells were sorted on a FACS Aria Fusion cell sorter (BD Biosciences) with BD FACSDiva 9.0.1 software. Cells were sorted into 1 × PBS + 2% FBS. FACS gating strategies used to isolate GFP+ and tdTomato+ mOSNs are shown in Supplementary Fig. 1.scRNA-seqscRNA-seq experiments were performed as previously described15. In brief, cells were dissociated from OE tissue from 4- to 5-week-old mice as described above. About 70,000 mOSNs were FACS-isolated. Complementary DNA and library preparation were performed using the 10x Genomics Single Cell 5′ Gene Expression workflow, and libraries were sequenced using a NovaSeq SP100 PE50 and a NextSeq 2000 P2 200 through the UCSF Gladstone Genomic Core and the UCSF Center for Advanced Technology. Sequencing data were processed using 10x Genomics Cell Ranger 6.0.1. Data analysis was performed using Seurat60,61 and custom scripts. Cells were filtered to retain cells with 1,000–10,000 detected genes and less than 5% mitochondrial reads. Counts were then normalized using Seurat’s NormalizeData with log normalization and a scale factor of 10,000. See Supplementary Tables 2 and 3 for further details on scRNA-seq analysis and statistics.For analyses in Fig. 5 and Extended Data Fig. 10, Pcdh isoform choice was analysed in mOSNs defined by detected Omp expression and no detected Gap43 expression using raw unique molecular identifier counts. A Pcdh isoform was considered detected in a given mOSN if one or more unique molecular identifier-corrected reads were assigned to that gene. For each condition, the percentage of mOSNs expressing each Pcdh isoform was calculated as the fraction of mOSNs with detected expression of that isoform. Changes in Pcdh choice across genotypes were calculated as percentage-point differences relative to WT. Data for single-cell experiments represent one biological replicate per condition.nChIP–seqnChIP–seq was performed as previously described62. Briefly, live cells were sorted from papain-dissociated mouse OE; in experiments for which spike-ins were included to enable quantification of ChIP signal across conditions, HEK293T cells at around 70% confluency were trypsinized, washed with PBS and added at a ratio of 0.75% to the sorted mouse cells. (HEK293T cells were grown in RPMI or DMEM media supplemented with 10% FBS and 1 × penicillin-streptomycin, incubated at 37 °C and 5% CO2, and tested for mycoplasma (ATCC Universal Mycoplasma Detection Kit) before use in experiments.) Live sorted cells were pelleted in a swinging bucket centrifuge (800g, 15 min, 4 °C) and then resuspended in Buffer 1 (0.3 M sucrose, 60 mM KCl, 15 mM NaCl, 5 mM MgCl2, 0.1 mM EGTA, 15 mM Tris-HCl pH 7.5, 0.1 mM PMSF, 0.5 mM DTT, 1 × Roche cOmplete EDTA-free protease inhibitors). Cells were lysed on ice for 10 min by adding an equal volume of Buffer 2 (0.4% Igepal CA-630, 0.3 M sucrose, 60 mM KCl, 15 mM NaCl, 5 mM MgCl2, 0.1 mM EGTA, 15 mM Tris-HCl pH 7.5, 0.1 mM PMSF, 0.5 mM DTT, 1 × Roche cOmplete EDTA-free protease inhibitors). Nuclei were pelleted (1,000g, 10 min, 4 °C) and resuspended in MNase buffer (0.32 M sucrose, 4 mM MgCl2, 1 mM CaCl2, 50 mM Tris-HCl pH 7.5, 0.1 mM PMSF, 1 × Roche cOmplete EDTA-free protease inhibitors). Resuspended nuclei were treated with MNase (Sigma) at 37 °C, and the reaction was quenched with the addition of EDTA to a final concentration of 20 mM. Two fractions of solubilized chromatin were collected; nuclei were pelleted (10,000g, 10 min, 4 °C) and fraction S1 was collected and stored at 4 °C overnight. Nuclei were resuspended in Dialysis Buffer (1 mM Tris-HCl pH 7.5, 0.2 mM EDTA, 0.1 mM PMSF, 1 × Roche cOmplete EDTA-free protease inhibitors) and rotated overnight at 4 °C. Insoluble material was pelleted (10,000g, 10 min, 4 °C) and fraction S2 was retained. MNase treatment was optimized to yield predominantly mono-nucleosomes in the S1 fraction and predominantly di-nucleosomes, tri-nucleosomes and some larger chromatin fragments in the S2 fraction. S1 and S2 DNA concentrations were measured by HS DNA Qubit after RNase A treatment. Equal volumes of S1 and S2 fractions were pooled, and total yields were estimated. In spike-in experiments, chromatin input was not always equalized across immunoprecipitations, as spike-in normalization accounts for differences in input.MNase-digested chromatin was diluted in Wash Buffer 1 (50 mM Tris-HCl pH 7.5, 10 mM EDTA, 125 mM NaCl, 0.1% Tween-20, 1 × Roche cOmplete EDTA-free protease inhibitors), and 5% inputs were reserved. Histone H3 lysine 9 tri-methyl antibody (H3K9me3, Abcam ab8898) was added, and the binding reaction was rotated overnight at 4 °C. For each immunoprecipitation, 20 μl of Dynabeads Protein G (Invitrogen) were blocked overnight with 2 mg ml−1 yeast transfer RNA and 2 mg ml−1 BSA in Wash Buffer 1. The next day, blocked beads were added to antibody-bound chromatin and rotated for 1–3 h at 4 °C. Chromatin-bound beads were washed at 4 °C a total of four times with Wash Buffer I, three times with Wash Buffer II (5 mM Tris pH 7.5, 17.5 mM NaCl, 0.01% NP-40, 1 mM EDTA, 1 × Roche cOmplete EDTA-free protease inhibitors), and one time with Tris-EDTA buffer (10 mM Tris-HCl pH 7.5, 1 mM EDTA). Two 15-min elutions were conducted at 37 °C in Elution Buffer (1% SDS, 250 mM NaCl, 2 mM DTT). ChIP DNA and input DNA were column purified using Zymo ChIP DNA columns (Zymo Research, D5205 or D5201).Libraries were prepared using the Ovation Ultralow V2 DNA-Seq Library Preparation Kit (Tecan Life Sciences). The quality of the libraries was assessed by Bioanalyzer and quantified using a combination of Bioanalyzer and Qubit. Libraries were pooled and sequenced on a NextSeq 2000 (Gladstone Institutes), NextSeq 500/550 (UCSF Center for Advanced Technology) or NovaSeq X (Chan Zuckerberg Initiative Biohub San Francisco).Bioinformatic processing of nChIP–seqData processing and analysis was conducted in accordance with previous literature63,64. For spike-in experiments, adapters were trimmed with cutadapt with –minimum-length 18 and checked for sequencing quality control with FastQC. Reads were aligned with Bowtie2 to a concatenated mouse and human genome (mm10 + hg38) in which the spike-in chromosomes were pre-labelled with a ‘_hg38’ suffix. Alignments were split by chromosome using bamUtil’s splitChromosome function, and samtools’ merge command was used to collect mouse and human alignments separately. Then, duplicates were marked and removed using Picard MarkDuplicates, and the spike-in chromosome suffix was stripped. Alignments with mapping quality As in the original ChIP-Rx method describing quantitative spike-in normalized ChIP followed by sequencing, our spike-in corrections normalized for the number of spike-in reads in the immunoprecipitation63. We sequenced every input as well, allowing us to adjust for the variability in spike-in read fraction in each input64,65. The spike-in adjusted coverage signal, \({z}_{i}\), was calculated from counts per million (CPM)-normalized coverage values, \({x}_{i}\), with the equation \({z}_{i}={x}_{i}\cdot \frac{{S}_{\mathrm{in}}}{{T}_{\mathrm{in}}}\frac{{T}_{\mathrm{ip}}}{{S}_{\mathrm{ip}}}\), where \({S}_{\mathrm{in}}\) and \({T}_{\mathrm{in}}\) are the number of spike-in (human) and target (mouse) reads in the inputs, respectively, and \({S}_{\mathrm{ip}}\) and \({T}_{\mathrm{ip}}\) are the number of spike-in (human) and target (mouse) reads in the immunoprecipitations, respectively. Bigwig files were generated from Deeptools bamCoverage using –scaleFactor of \(\frac{{S}_{\mathrm{in}}}{{T}_{\mathrm{in}}}\cdot \frac{{T}_{\mathrm{ip}}}{{S}_{\mathrm{ip}}}\), –binSize 10, –minMappingQuality 30 and –normalizeUsing CPM. In Fig. 5c, to compare spike-in-normalized nChIP–seq values from different experiments, we batch-corrected using the average of the scale factors from the WT samples within each experimental batch. Significance was assessed and confirmed using both a Welch’s unpaired t-test and a two-way ANOVA (main effects only).For experiments without spike-ins, adapters were trimmed and the first 4 nucleotides of each read removed with cutadapt (v1.9.1; -u 4, –minimum-length 18). Reads were aligned to mm10 with Bowtie2. BigWig files were generated with deepTools bamCoverage in 10-base-pair bins from unextended reads, normalized to 1 × genome coverage (reads per genomic content; effective genome size 2,407,883,318; chr. X, chr. Y and chr. M excluded from normalization).ImmunohistochemistryImmunohistochemistry for RAD21 was performed as described previously15. A similar staining protocol was performed for SETDB1, with minor modifications to the blocking buffer composition to improve signal. Sections were removed from −20 °C, washed in 1 × PBS for 5 min at room temperature, then washed three times in 0.1% PBS-Triton X for 5 min. Sections were incubated in blocking solution (3% BSA, 0.2% Tween in 4 × SSC) for 1 h at room temperature. Primary antibody incubation proceeded overnight (12–16 h) at 4 °C in a humidified chamber. The following morning, sections were washed three times in 0.1% PBS-Triton X for 5 min at room temperature, then incubated in secondary antibody at room temperature for 1 h. Samples were then washed three times in 0.1% PBS-Triton X for 5 min at room temperature and mounted under coverslips with antifade mounting medium with DAPI (Vector Laboratories, H-2000-2). For RAD21 staining, primary antibody was added at 1:100 in blocking buffer (Invitrogen, PA5-28344). For SETDB1 staining, primary antibody was added at 1:250 in blocking buffer (Thermofisher, MA5-47120). For both RAD21 and SETDB1, secondary antibody was added at 1:1,000 in blocking buffer (Invitrogen donkey anti-rabbit 647, A31573).Hi-C and bulk RNA-seqThe Hi-C data in Extended Data Fig. 2b and bulk RNA-seq data in Fig. 3b were previously published and re-analysed as described15.Reporting summaryFurther information on research design is available in the Nature Portfolio Reporting Summary linked to this article.