scieee AI-readable full text Open interactive document viewer

Open-source, high-throughput targeted in situ transcriptomics for developmental and tissue biology

Lee, Hower; Langseth, Christoffer Mattsson; Marco Salas, Sergio; Metousis, Andreas; Rueda- Alaña, Eneritz; Garcia-Moreno, Fernando; Grillo, Marco; Nilsson, Mats

Abstract

Multiplexed spatial profiling of mRNAs has recently gained traction as a tool to explore the cellular diversity and the architecture of tissues. We propose a sensitive, open-source, simple and flexible method for the generation of in situ expression maps of hundreds of genes. We use direct ligation of padlock probes on mRNAs, coupled with rolling circle amplification and hybridization-based in situ combinatorial barcoding, to achieve high detection efficiency, high-throughput and large multiplexing. We validate the method across a number of species and show its use in combination with orthogonal methods such as antibody staining, highlighting its potential value for developmental and tissue biology studies. Finally, we provide an end-to-end computational workflow that covers the steps of probe design, image processing, data extraction, cell segmentation, clustering and annotation of cell types. By enabling easier access to high-throughput spatially resolved transcriptomics, we hope to encourage a diversity of applications and the exploration of a wide range of biological questions.

Full text

This is the Author Accepted Manuscript file of the article: Hower Lee, Christoffer Mattsson Langseth, Sergio Marco Salas, Andreas Metousis, Eneritz RuedaAlaña, Fernando Garcia-Moreno, Marco Grillo, Mats Nilsson. (2024) Open-source, highthroughput targeted in-situ transcriptomics for developmental biologists. Development 151(16):dev202448 DOI 10.1242/dev.202448 Open-source, high-throughput targeted in situ transcriptomics for developmental and tissue biology Hower Lee 1, Christoffer Mattsson Langseth 1,‡, Sergio Marco Salas 1,‡, Sanem Sariyar 2,‡, Andreas Metousis 1,*, Eneritz Rueda-Alaña 3,4, Christina Bekiari 1, Emma Lundberg 2,6,7, Fernando García-Moreno 3,4,5, Marco Grillo 1,§, Mats Nilsson 1,§ ABSTRACT Multiplexed spatial profiling of mRNAs has recently gained traction as a tool to explore the cellular diversity and the architecture of tissues. We propose a sensitive, opensource, simple and flexible method for the generation of in situ expression maps of hundreds of genes. We use direct ligation of padlock probes on mRNAs, coupled with rolling circle amplification and hybridization-based in situ combinatorial barcoding, to achieve high detection efficiency, high-throughput and large multiplexing. We validate the method across a number of species and show its use in combination with orthogonal methods such as antibody staining, highlighting its potential value for developmental and tissue biology studies. Finally, we provide an end-to-end computational workflow that covers the steps of probe design, image processing, data extraction, cell segmentation, clustering and annotation of cell types. By enabling easier access to highthroughput spatially resolved transcriptomics, we hope to encourage a diversity of applications and the exploration of a wide range of biological questions. Keywords: Spatial transcriptomics, In situ hybridization, Multiplex imaging, Multiomics, Open source, Padlock probes Summary: We describe an improved open-source, flexible and customizable method and complete computational workflow for high-throughput multiplexed in situ transcriptomics, readily applicable to a wide range of tissue types and model organisms. INTRODUCTION Methods for spatial profiling of mRNAs have emerged as tools to explore and visualize cellular diversity in its spatial context (Borm et al., 2023; Chen et al., 2015; Codeluppi et al., 2018; Femino et al., 1998; Gyllborg et al., 2020; Lee et al., 2022). Some of these methods are untargeted and based on next-generation sequencing; hence, they can be easily adapted to new model organisms. Other methods are imaging based and generally targeted, requiring a pre-selection of probes to capture the expression of specific transcripts. Methods of both categories often require specialized or proprietary equipment, and their commercial implementations are usually bundled within expensive machines and kits, limiting the range of potential uses and applications, and wider adoption by a more diversified research community. Targeted in situ sequencing (ISS) is a method for multiplexed mRNA detection (Gyllborg et al., 2020; Ke et al., 2013; Lee et al., 2022) that relies on the ligation of barcoded padlock probes on in situ-synthesized cDNAs, followed by rolling circle amplification, to generate gene-specific amplicons in situ. These amplicons are large (approximately 1 μm) and contain concatemers of hundreds of copies of the original probe (Lizardi et al., 1998), producing bright signals that can be imaged at low magnification when interrogated by iterative cycles of hybridization and stripping of fluorescent probes. Using a combinatorial detection scheme, the number of detectable genes scales by the rule xN, where x is the number of available fluorophores and N is the number of imaging cycles. Compared with other in situ methods, ISS has relatively low detection efficiency. On the one hand, this is a desirable property: because only a small subset of the total mRNA molecules is captured and amplified, they can be easily visualized using widefield fluorescence microscopes at low magnification without overcrowding the image with signals, enabling fast imaging of large tissue sections (high throughput). As an example, a square tissue area of side 7.5 mm can be imaged (20×) in five channels in about 25 min per cycle. On the other hand, ISS detection of low-expressed transcripts can sometimes be challenging. Finally, most imaging-based spatial omics methods produce large (terabyte-sized) and complex image datasets that are often cumbersome to analyze. To address these limitations, we first introduced a new detection chemistry with increased capture efficiency and validated it on a number of use cases. Second, we compiled a complete analysis pipeline, covering the steps of probe design, image analysis, data mining, decoding, cell segmentation and clustering. We also produced a complete manual to guide new users through an entire ISS experiment, and we detail how to adapt our core analysis to different microscopes or input data format. We hope that this work will encourage a larger and diverse research community to experiment with spatially resolved omics techniques for addressing a wider range of scientific questions. RESULTS AND DISCUSSION RNA-ISS recapitulates known mRNA expression patterns with high sensitivity We introduced a detection chemistry based on the direct ligation of padlock probes on their target RNA, avoiding the cDNA synthesis step (Fig. 1A,B). This chemistry uses chimeric padlock probes in combination with T4 RNA ligase2, as previously suggested for in vitroapplications (Krzywkowski et al., 2019), to achieve higher detection efficiency and a simplified workflow. We profiled a panel of nine genes on consecutive mouse coronal brain sections with cDNA-ISS and RNA-ISS, using the same number of probes per transcript across protocols. These genes are expressed in different cell types such as oligodendrocytes (Plp1), excitatory neurons (Rorb and Lamp5), inhibitory neurons (Kcnip2) and epithelial cells (Foxj1) and have known unique spatial expression patterns, and also include a set of housekeeping genes (Actb, Gapdh, Pgk1 and Polr2a), as described in Gyllborg et al. (2020) (Fig. 2A; Fig. S1). Fig. 1. Open in a new tab Open-source, high-throughput targeted in situ transcriptomics. (A) The opensource RNA in situsequencing (ISS) assay is species agnostic and is compatible with immunohistochemistry and other fluorescence labeling, after transcript detection. The workflow includes probe design and image processing pipelines. (B) Overview of RNA-ISS. First, gene-specific chimeric padlock probes hybridize to their complementary mRNA target sequence, before they are ligated and amplified by rolling circle amplification. Next, the in situ-generated rolling circle products (RCPs) are combinatorially labeled, imaged across multiple cycles and computationally decoded to identify the corresponding genes. (C) Overview of the pre-processing pipeline. Raw images are transformed into a format suitable for decoding. First, the images are maximum-intensity projected, then simultaneously stitched and registered across imaging cycles. Lastly, the aligned stitched images are sliced again into smaller tiles for computational efficiency. (D) Overview of processing functionalities and features built into the pipeline: Packages for padlock probe design and downstream data analysis, such as nuclei segmentation, clustering, quality metrics and probabilistic cell typing functionalities, are included to empower researchers with an end-to-end ISS solution from assay design to computational analyses. Created with BioRender.com. Fig. 2. Open in a new tab RNA-ISS recapitulates known mRNA expression patterns with improved efficiency. (A,B) Expression distribution of Plp1 (cyan), Kcnip2 (magenta), Rorb (yellow), Lamp5 (green) and Foxj1(gray) across sequential half coronal mouse brain sections. The output is shown as a scatterplot of detected transcripts from cDNA-ISS (A) and RNA-ISS (B). Scale bars: 100 µm. (C) Individual gene expression of the 5-plex gene panel from cDNA-ISS and RNA-ISS as shown in A,B, with the output shown as a scatterplot. The 4-plex mouse reference genes (Actb, Gapdh, Pgk1 and Polr2a are shown in Fig. S1E). Scale bars: 100 µm. (D) Normalized RCPs/gene counts across regions of interests (ROIs) (hippocampus, lateral ventricle and cortex; boxed regions in A,B; Fig. S1A-D) for RNA-ISS against cDNAISS. On average, a 2.38-fold increase in detection was achieved with RNA-ISS. n=3, standard deviation=1.18. (E,-F) Representative raw image of spatial distribution of 5plex genes across one of the three ROIs (Fig. S1A-D) between cDNA-ISS (E) and RNA-ISS (F). Images are adjusted to the same contrast levels for both chemistries. Scale bars: 100 µm or 50 µm (insets). RNA-ISS recapitulates the spatial expression of all genes (Fig. 2B,E,F), with an average sensitivity increase of 2.38-fold over cDNA-ISS (Fig. 2C,D, standard deviation=1.18), implying a set of potential advantages. First, more fine-grained information can be extracted from the same tissue, allowing the resolution of a higher number of transcripts per cell. Second, genes with lower expression levels can be more efficiently detected. Third, informative signal density might be extracted with a reduced set of probes. A careful analysis of the detected signal spots across methods revealed that RNA-ISS captured a higher number of spots outside the tissue compared with cDNA-ISS (Fig. 2C; Fig. S1E), prompting the need to rule out technical artifacts. The higher sensitivity of RNA-ISS does not appear to be explained by this increased detection outside the tissue (Pearson correlation=−0.39, P=0.29), but does instead correlate with the RNA/cDNA ratios inside the tissue (Pearson correlation=0.99, P=5×10−15). This suggests that reads outside of the tissue have a minor impact on the fold-change increase. Furthermore, RNA-ISS counts outside the tissue were correlated with the expression levels inside the tissue (as detected by cDNA-ISS) (Pearson correlation=0.88, P=0.001), suggesting that these spots could be mRNA molecules smeared over the glass during sample handling and are not artifacts generated by a spurious activity of the ligase. When correcting the fold change for the presence of spots outside the tissue, RNA-ISS was still twice as efficient as cDNA-ISS (average=1.96, standard deviation=1.04). From this comparison, we estimated the capture efficiency of RNA-ISS to be about 2-10%, against 1-5% for cDNA-ISS (Magoulopoulou et al., 2023). To place these values in a common reference frame, single-molecule fluorescence in situ hybridization (smFISH) has a capture efficiency of over 90%, whereas droplet-based single-cell RNAsequencing (scRNAseq) efficiency is around 30%, according to the 10× Chromium manual, which is roughly comparable with the efficiency of 10× Xenium (Salas et al., 2023 preprint). We validated the robustness of the RNA-ISS by applying it to several animal model species: Drosophila melanogaster, Mus musculus and Gallus gallus, with essentially no modifications to the protocol. On fly ovaries, we probed for a set of germline and somatic mRNAs. As expected, vasa (also known as vas) and nanos mRNAs were detected exclusively in the nurse cells and in the oocyte (germline), traffic jam (tj) expression was exclusive to the follicular epithelium (somatic), whereas slow border cells (slbo) expression was exclusive to a subgroup of somatic cells called border cells (Fig. S2A-G). The perinuclear distribution of gurkenmRNAs was also correctly resolved, indicating that our method accurately preserves the subcellular localization of mRNAs (Fig. S2D). We then further probed genes expressed in mouse (15 genes) and chicken (64 genes) brains and computationally decoded their expression. For both species, the decoded expression patterns were localized, specific and consistent with previous available knowledge (see Fig. S2H-K for chicken gene expression patterns, and data at https://lee2024supp.serve.scilifelab.se/ for both chicken and mouse gene expression patterns). RNA-based ISS is compatible with standard labeling techniques Combining routine assays with ISS might be of crucial interest to a wider scientific community. To test whether ISS could be combined with immunostaining, after the last cycle of ISS on mouse brains, we stripped all the detection probes and proceeded to stain against the GFAP protein, successfully recapitulating the expected specific pattern (Fig. 3L-O). This is of potential value for different reasons: (1) it allows researchers to correlate ISS data with known landmarks on the tissues, marked by the specific expression of a given protein; (2) in samples for which multiplexed antibody panels are available (e.g. human), high-plex multi-modal interrogation of a tissue might be possible; (3) simultaneous analysis of mRNA and proteins encoded by the same set of genes potentially allows the study of mRNA translation dynamics; and, finally, (4) staining for membrane proteins might improve transcript segmentation. We demonstrate an example of the second point by performing multiplexed antibody stainings post RNA-ISS using co-detection by indexing (CODEX). We ran RNA-ISS on a mouse coronal section with a previously described probe panel (Gyllborg et al., 2020; Ke et al., 2013; Lee et al., 2022) and posteriorly labeled the tissue with 11 barcoded antibodies [labeling the proteins ACTB, CD31 (encoded by Pecam1), CNP, GFAP, KI67 (encoded by Mki67), LMNB1, MOG, MRC1, NEFL, S100B and synaptophysin (encoded by Syp)], generally recapitulating both the expected gene expression patterns and protein distribution. For some of the antibodies we could detect, together with the specific labeling, non-specific staining in the corpus callosum, as illustrated in Fig. S3. This background staining appears to arise as a consequence of the DNA conjugation to some antibodies, and it is not specifically produced by the combined CODEX+ISS workflow (see Materials and Methods, ‘Antibody conjugation’ section). This suggests a broad compatibility of RNA-ISS with downstream multiplexed antibody stainings, potentially enabling multi-omics approaches (https://lee2024supp.serve.scilifelab.se/mouse_ISS_CODEX.tmap). Fig. 3. Open in a new tab RNA-ISS enables cheap comparative analysis in related species and is compatible with antibody labeling. (A-C) Probes targeting conserved regions detect the mRNA of engrailed (en) across multiple related species, i.e. Drosophila melanogaster (A), Drosophila pseudobscura (B) and Drosophila virilis (C), with comparable efficiency. The species cover an evolutionary divergence time of approximately 40 million years. Scale bar: 10 µm. (D-K) Probes targeting conserved regions allow detection in mouse and rat. The same genes (Gad1, Cck, Adarb2 and Maf) were probed on mouse (D-G) and rat (H-K) brains using the probes designed against mouse genes, showing similar expression patterns. Gad1 (D,H), a GABAergic neuron marker, is expressed by inhibitory neurons in the cortex, hippocampus, thalamus and superior colliculus, as well as in the midbrain tegmentum. Cck (E,I) and Adarb2 (F-J), both interneuronal markers, label interneurons in the cortex and hippocampus. Adarb2 also shows enriched expression in the telencephalic choroid plexus, and scattered expression in the midbrain. Maf (G-K), an inhibitory neuronal marker, is expressed in the cortex, hippocampus, superior colliculus and thalamus, and highly enriched expression appears in the periaqueductal grey matter, Scale bars: 1 mm. (L-O) RNA-ISS can be combined with posterior (or simultaneous) immunohistochemistry. After performing ISS, the detection probes were stripped and the tissue stained using an antibody against the GFAP protein (M). The expression of the Plp1 mRNA was also re-labeled with a fluorescence detection oligonucleotide (N), to provide a contrast reference. DAPI counterstaining is shown (L,O). Scale bars: 1 mm. Images are representative of two animals for mouse and rat experiments, and ten embryos for each Drosophila species. We then finally tested the possibility of combining ISS with 5-ethynyl-2′-deoxyuridine (EdU)-labeling for simultaneous gene expression and birth dating analysis: the results from these experiments, shown in the companion paper by Rueda-Alaña et al. (2024), indicate that ISSand EdU-based birth dating can be easily combined on the same tissue sample, allowing the interrogation of both gene expression and timing of origin of selected cell types within a tissue. These two examples of how ISS can be integrated with existing techniques showcase only a relatively small range of potential applications. Other ideas that come to mind include the combined use of ISS with genetically encoded photoconvertible sensors (e.g. CaMPARI; Fosque et al., 2015) or with clonal tracing tools such as Cre-Lox (Sauer and Henderson, 1988) or FLP-FRT (Golic and Lindquist, 1989). Intuitively, in order to avoid interference between reporter fluorescence and the ISS readout, this type of experiment requires adjustments to the experimental and imaging protocols. We discuss some of our thoughts and experiences in the ‘Technical notes and considerations for successful ISS experiments’ section of the supplementary Materials and Methods. Cross-reactive design of probes allows low-cost comparative analysis of gene expression A peculiar feature of the RNA-based ISS chemistry is its mismatch-tolerance. Although the direct probing of RNA produces an overall increase in detection efficiency, it also generates a small specificity cost, because the enzyme of choice is, to some extent, mismatch tolerant (Krzywkowski et al., 2019). Our pipeline includes a stringent specificity check to prevent the design of probes with predicted off targets based on sequence similarity (see Materials and Methods). As a result of this check, it is sometimes impossible to design padlock probes to discriminate among closely related transcripts (e.g. recent gene duplications), because their sequence has not diverged sufficiently to fall above the ligase specificity threshold. We sought to turn this limitation into an advantage, rationally designing cross-reactive probes to recognize the mRNA of the same gene across multiple related species, thus enabling comparative analysis of gene expression with a reduced cost (Tables S7, S8, S10). We tested this by designing a set of padlock probes against the engrailed (en) gene of D. melanogaster, explicitly selecting targets with a high sequence conservation. Besides D. melanogaster, this probe set shows specific and sensitive activity on Drosophila pseudobscuraand Drosophila virilis embryos, showing that this design can be used to experimentally cover potentially large evolutionary periods – the last common ancestor of D. melanogaster and D. virilis is estimated to be 40 million years ago (Nurminsky et al., 1996), a time interval corresponding roughly to the split between For each conjugation, 50 μg of antibody was used and transferred on blocked filters. Following the transfer, the filters were centrifuged at 12,000 g for 8 min. Then, the reduction solution (Akoya Biosciences, 7000009) was added on the filters and incubated for 30 min at RT. The reduction solution was removed by centrifugation at 12,000 g. After the removal of the reduction solution, conjugation solution was added (Akoya Biosciences, 7000009). The barcodes were hydrated with 10 μl nuclease-free water (Lifer Technologies, AM9937) and 210 μl of conjugation solution. The hydrated barcodes were added on the reduced antibodies and incubated for 2 h at RT. The conjugation solution was removed via centrifugation at 12,000 g and purification solution (Akoya Biosciences, 7000009) was added to the columns. Then, 100 μl of antibody storage buffer (Akoya Biosciences, 7000009) was added to the columns and they were centrifuged at 3000 g for 2 min. The specificity of the conjugated antibodies was checked by manual incubation of CODEX reporters. The tissue samples were incubated with a screening buffer containing 10× CODEX buffer (Akoya Biosciences, 7000001), nuclease-free water and DMSO (Sigma-Aldrich, 472301). After incubation, a reporter stock solution was prepared with screening buffer, assay reagent (Akoya Biosciences, 7000002) and nuclear stain (Akoya Biosciences, 7000003). Then, 2.5 μl from each reporter was added to the reporter stock solution and 100 μl from the prepared reporter solution was incubated with the tissue samples for 5 min in the dark at RT. The screening buffer was used for the removal of excess reporters after the incubation and the tissue samples were mounted with the Fluoroshield mounting medium (Invitrogen, 00495802). In a few cases, we could detect some background autofluorescence in the white matter (specifically in the corpus callosum), arising after DNA conjugation to the antibodies. In these cases, we chose to use the antibodies whenever they retained highly specific labeling in other regions of the brain. Examples for these are CD31, LMNB1 and KI67. Immunostaining for CODEX imaging post RNA-ISS Post library preparation of RNA-ISS, the tissue was incubated in hydration buffer (Akoya Biosciences, 7000008) for 2 min. For tissue equilibration, the tissue was incubated in the staining buffer (Akoya Biosciences, 7000008) for 30 min. After equilibration, tissue blocking was performed using the primary antibodies (dilutions given in Table S9), which were diluted in the blocking buffer (Akoya Biosciences, 7000008), and the tissue was incubated for 3 h inside a dark humidity chamber at RT. The tissue was washed with a staining buffer for 2 min and fixed with 1.6% PFA diluted in a storage buffer (Akoya Biosciences, 7000008) for 10 min. The tissue was washed with PBS, incubated in ice-cold (4°C) methanol (Sigma-Aldrich, 322415) for 5 min and washed again with PBS. As the last fixation step, the tissue was fixed with fixative reagent (Akoya Biosciences, 7000008) and washed with PBS, before storage at 4°C. Image acquisition via the CODEX system Reporter probes were diluted in reporter stock solution in nuclease-free water (Life Technologies, AM9937), 10× CODEX buffer, assay reagent and nuclear stain reagent. Diluted reporters were placed into the corresponding wells in 96-well plates according to the experimental plan. Automated imaging was performed using a CODEX system integrated with a Leica DMI8 microscope (Leica Microsystems, 11090148013000). The microscope had a SOLA light engine light source (Lumencor, 16740), equipped with a Leica HC PL APO CS2 20× objective, a Hamamatsu camera (2048×2048, 16-bit, C13440-20C-CL301201) and an automated stage (ITK Hydra XY). For signal detection, we used the following Chroma filters: QUAD-S filter set: DFTC (DC:425; 505; 575) and Y7 filter (DC:760). Imaging was performed via the LASX software (Leica Microsystems), following the instructions of the CODEX software. For the selected ROI, manual focus points were located by selecting 9 as the z-step number. The background subtraction, deconvolution, extended depth of field and shading correction were performed on the output images using the CODEX Processor 1.7.0.6. Post image acquisition via the CODEX system, the sample was labeled with L-probes and detection oligonucleotides and imaged as described in the RNA-ISS protocol above. Alignment of images from RNA-ISS and the CODEX system The images acquired from the CODEX system for antibody staining and RNA-ISS images imaged on the Leica DMI6000 microscope (as documented above) were first roughly aligned with the affinder plugin on Napari (https://www.naparihub.org/plugins/affinder), yielding a first transformation matrix that allowed for a first alignment. Next, for a close to pixel-perfect alignment, the images were aligned for a second time with scipy.optimize from Elegant SciPy (https://github.com/elegantscipy/notebooks/blob/c7f4cc84deaceb132cf697ae359e75ff4881590b/notebooks/ch7.ipy nb). Data processing The raw images and the associated metadata from the microscopes were fed into the preprocessing module of our analysis pipeline (https://github.com/Moldia/Lee_2023/tree/main/ISS_preprocessing). The module transforms the images into a format suitable for decoding, executing the following steps. First, the images are maximum z-projected. The resulting 2D projected images (‘tiles’) are simultaneously stitched and registered across imaging cycles, using the ASHLAR software (Muhlich et al., 2022). ASHLAR captures the metadata and places the tiles correctly in the xyspace before starting the alignment step. During the process, the 10% overlap is also removed to produce stitched images. Finally, the aligned stitched images are sliced again into smaller tiles, to allow a faster and computationally efficient decoding. The resliced aligned images are then taken over by the decoding module (https://github.com/Moldia/Lee_2023/tree/main/ISS_decoding), which converts them into the SpaceTX format (Axelrod et al., 2021) and pipes them into the Starfish Python library for decoding of image-based spatial transcriptomics datasets (https://github.com/spacetx/starfish). Within the decoding modules, the images are normalized across channels and imaging cycles, a spot detection step is performed, and for each detected spot, its intensity across all channels is extracted. For each spot, the prominent channel for each cycle is extracted and a spot identity is annotated in color space. Each spot is now represented by a sequence of colors across cycles. The color sequence of each spot is matched to a decoding table that associates a color sequence with a specific gene. The output of this decoding is a CSV table, in which each row represents a detection spot with different properties (x and y positions, gene identity and quality metrics). The quality metrics for each spot are computed as follows. For each spot, the normalized fluorescence intensities across all channels are extracted. The prominent channel is considered the ‘true signal’, and all the others are considered ‘background’. The score is described by the formula ‘true signal’/(‘true signal’+‘background’), and it has a theoretical maximum value of 1 (perfect decoding) and a theoretical minimum value of 0.25 when decoding in four colors, which corresponds to a random assignment (i.e. all the channels have the same fluorescence intensity for that spot). The quality score for each spot is computed per cycle, allowing to calculate two parameters: (1) the average quality across all cycles and (2) the minimum quality across cycles. We found that filtering according to a minimum quality produces more reliable data, and we normally used a filter value of 0.5. For the chicken optic tectum sections, we additionally performed image deconvolution using flowdec (Czech et al., 2019) on the raw images before proceeding to the preprocessing steps. We found this step to drastically increase the number of detected spots in dense datasets. Other modules in the repository allow users to perform additional operations on the images, and are documented in the supplementary Materials and Methods. Code availability All the code used in this paper is available at https://github.com/Moldia/Lee_2023. Acknowledgements We would like to thank the members of the Nilsson laboratory, the in situ sequencing platform at Scilifelab, and the imaging facility at European Molecular Biology Laboratory (EMBL) Monterotondo (particularly Alvaro Crevenna and Alejandro Linares) for useful discussion and extensive testing of the chemistry, as well as for their constructive feedback on the software. Footnotes Author contributions Conceptualization: H.L., M.G., M.N.; Methodology: H.L., C.M.L., S.M.S., S.S., A.M., E.R.-A., M.G.; Software: C.M.L., S.M.S., A.M., M.G.; Validation: S.S., E.R.-A., F.G.-M., M.G.; Formal analysis: H.L., C.M.L., S.M.S., S.S., A.M., E.R.-A., M.G.; Investigation: H.L., M.G.; Resources: C.B.; Data curation: S.S., F.G.-M., M.G.; Writing - original draft: H.L., M.G.; Writing - review & editing: H.L., M.G.; Visualization: M.G.; Supervision: E.L., F.G.-M., M.G., M.N.; Project administration: C.B.; Funding acquisition: E.L., F.G.-M., M.N. Funding The work in M.N.'s group is supported by funds from by Chan Zuckerberg Initiative; an advised fund of the Silicon Valley Community Foundation; the Erling-Persson Family Foundation (Erling-Perssons Stiftelse; the Human Developmental Cell Atlas); the Knut and Alice Wallenberg Foundation (Knut och Alice Wallenbergs Stiftelse; KAW 2018.0172); the Swedish Research Council (Vetenskapsrådet; 2019-01238); and the Swedish Cancer Society (Cancerfonden; CAN 2021/1726). E.R.-A.'s work was funded via a predoctoral fellowship from the Basque Government (Eusko Jaurlaritza). During this research, F.G.-M. holds and held an Ikerbasque Research Fellowship (funded by Ikerbasque, Basque Foundation for Science), grants from the Spanish Ministry (Ministerio de Ciencia e Innovación; MICNN PGC2018-096173-A-I00 and PID2021125156NB-I00) and the Basque Government (Eusko Jaurlaritza; PIBA 2020\_1\_0057 and PIBA\_2022\_1\_0027), and a European Advanced infraStructure for Innovative Genomics (EASI-Genomics) Transnational Access (TNA) call PID14596 grant. Open Access funding provided by Stockholms Universitet. Deposited in PMC for immediate release. Competing interestsM.N. was scientific advisor for the company 10× Genomics at the time of the initial manuscript submission. H.L., C.M.L., S.M.S. and M.G. are cofounders of spatialist, a data analysis company focused on spatial omics. References Adkins, R. M., Gelke, E. L., Rowe, D. and Honeycutt, R. L. (2001). Molecular phylogeny and divergence time estimates for major rodent groups: evidence from multiple genes. Mol. Biol. Evol. 18, 777-791. https://doi.org/10.1093/oxfordjournals.molbev.a003860 Axelrod, S., Cai, M., Carr, A., Freeman, J., Ganguli, D., Kiggins, J., Long, B., Tung, T. and Yamauchi, K. (2021). . starfish: scalable pipelines for image-based transcriptomics. J. Open Source. Softw. 6, 2440. https://doi.org/10.21105/joss.02440 Borm, L. E., Mossi Albiach, A., Mannens, C. C. A., Janusauskas, J., Özgün, C., Fernández-García, D., Hodge, R., Castillo, F., Hedin, C. R. H., Villablanca, E. J.et al. (2023). Scalable in situ single-cell profiling by electrophoretic capture of mRNA using EEL FISH. Nat. Biotechnol. 41, 222-231. https://doi.org/10.1038/s41587-022-01455-3 Chen, K. H., Boettiger, A. N., Moffitt, J. R., Wang, S. and Zhuang, X. (2015). RNA imaging. Spatially resolved, highly multiplexed RNA profiling in single cells. Science 348, aaa6090. https://doi.org/10.1126/science.aaa6090 Codeluppi, S., Borm, L. E., Zeisel, A., La Manno, G., van Lunteren, J. A., Svensson, C. I. and Linnarsson, S. (2018). Spatial organization of the somatosensory cortex revealed by osmFISH. Nat. Methods 15, 932-935. https://doi.org/10.1038/s41592-018-0175-z Czech, E., Aksoy, B. A., Aksoy, P. and Hammerbacher, J. (2019). Cytokit: a single-cell analysis toolkit for high dimensional fluorescent microscopy imaging. BMC Bioinformatics 20, 448. https://doi.org/10.1186/s12859-019-3055-3 Femino, A. M., Fay, F. S., Fogarty, K. and Singer, R. H. (1998). Visualization of single RNA transcripts in situ. Science 280, 585-590. https://doi.org/10.1126/science.280.5363.585 Fosque, B. F., Sun, Y., Dana, H., Yang, C.-T., Ohyama, T., Tadross, M. R., Patel, R., Zlatic, M., Kim, D. S., Ahrens, M. B.et al. (2015). Neural circuits. Labeling of active neural circuits in vivo with designed calcium integrators. Science 347, 755-760. https://doi.org/10.1126/science.1260922 Golic, K. G. and Lindquist, S. (1989). The FLP recombinase of yeast catalyzes sitespecific recombination in the Drosophila genome. Cell 59, 499-509. https://doi.org/10.1016/0092-8674(89)90033-0 Gyllborg, D., Langseth, C. M., Qian, X., Choi, E., Salas, S. M., Hilscher, M. M., Lein, E. S. and Nilsson, M. (2020). Hybridization-based in situ sequencing (HybISS) for spatially resolved transcriptomics in human and mouse brain tissue. Nucleic Acids Res. 48, e112. https://doi.org/10.1093/nar/gkaa792 Ke, R., Mignardi, M., Pacureanu, A., Svedlund, J., Botling, J., Wählby, C. and Nilsson, M. (2013). In situ sequencing for RNA analysis in preserved tissue and cells. Nat. Methods 10, 857-860. https://doi.org/10.1038/nmeth.2563 Krzywkowski, T., Kühnemund, M. and Nilsson, M. (2019). Chimeric padlock and iLock probes for increased efficiency of targeted RNA detection. RNA 25, 82-89. https://doi.org/10.1261/rna.066753.118 Larkin, M. A., Blackshields, G., Brown, N. P., Chenna, R., McGettigan, P. A., McWilliam, H., Valentin, F., Wallace, I. M., Wilm, A., Lopez, R.et al. (2007). Clustal W and Clustal X version 2.0. Bioinformatics 23, 2947-2948. https://doi.org/10.1093/bioinformatics/btm404 Lee, H., Marco Salas, S., Gyllborg, D. and Nilsson, M. (2022). Direct RNA targeted in situ sequencing for transcriptomic profiling in tissue. Sci. Rep. 12, 7976. https://doi.org/10.1038/s41598-022-11534-9 Lizardi, P. M., Huang, X., Zhu, Z., Bray-Ward, P., Thomas, D. C. and Ward, D. C. (1998). Mutation detection and single-molecule counting using isothermal rolling-circle amplification. Nat. Genet. 19, 225-232. https://doi.org/10.1038/898 Magoulopoulou, A., Salas, S. M., Tiklová, K., Samuelsson, E. R., Hilscher, M. M. and Nilsson, M. (2023). Padlock probe–based targeted in situ sequencing: overview of methods and applications. Annu. Rev. Genomics Hum. Genet 24, 133-150. https://doi.org/10.1146/annurev-genom-102722-092013 Martin, M. (2011). Cutadapt removes adapter sequences from high-throughput sequencing reads. EMBnet.journal 17, 10-12. https://doi.org/10.14806/ej.17.1.200 Muhlich, J. L., Chen, Y.-A., Yapp, C., Russell, D., Santagata, S. and Sorger, P. K. (2022). Stitching and registering highly multiplexed whole-slide images of tissues and tumors using ASHLAR. Bioinformatics 38, 4613-4621. https://doi.org/10.1093/bioinformatics/btac544 Nurminsky, D. I., Moriyama, E. N., Lozovskaya, E. R. and Hartl, D. L. (1996). Molecular phylogeny and genome evolution in the Drosophila virilis species group: duplications of the alcohol dehydrogenase gene. Mol. Biol. Evol. 13, 132-149. https://doi.org/10.1093/oxfordjournals.molbev.a025551 Rueda-Alaña, E., Grillo, M., Vazquez, E., Salas, S. M., Senovilla-Ganzo, R., Escobar, L., Aransay, A. M., Dopazo, A., Encinas, J. M., Nilsson, M.et al. (2024). BirthSeq, a new method to isolate and analyze dated cells from any tissue in vertebrates. Development 151, dev202429. https://doi.org/10.1242/dev.202429 Salas, S. M., Czarnewski, P., Kuemmerle, L. B., Helgadottir, S., Matsson-Langseth, C., Tismeyer, S., Avenel, C., Rehman, H., Tiklova, K., Andersson, A.et al. (2023). Optimizing Xenium In Situ data utility by quality assessment and best practice analysis workflows. bioRxiv, 2023.02.13.528102. Sauer, B. and Henderson, N. (1988). Site-specific DNA recombination in mammalian cells by the Cre recombinase of bacteriophage P1. Proc. Natl. Acad. Sci. USA 85, 51665170. https://doi.org/10.1073/pnas.85.14.5166 Schmidt, U., Weigert, M., Broaddus, C. and Myers, G. (2018). Cell detection with starconvex polygons. In Medical Image Computing and Computer Assisted Intervention – MICCAI 2018, pp. 265-273. Springer International Publishing. https://doi.org/10.1007/978-3-030-00934-2_30 Schrago, C. G. and Russo, C. A. M. (2003). Timing the origin of New World monkeys. Mol. Biol. Evol. 20, 1620-1625. https://doi.org/10.1093/molbev/msg172 Stringer, C., Wang, T., Michaelos, M. and Pachitariu, M. (2021). Cellpose: a generalist algorithm for cellular segmentation. Nat. Methods 18, 100-106. https://doi.org/10.1038/s41592-020-01018-x Virshup, I., Bredikhin, D., Heumos, L., Palla, G., Sturm, G., Gayoso, A., Kats, I., Koutrouli, M., Scverse Community, B. and et al., B. (2023). The scverse project provides a computational ecosystem for single-cell omics data analysis. Nat. Biotechnol. 41, 604-606. https://doi.org/10.1038/s41587-023-01733-8