ABSTRACT: We developed cell2location, a principled and versatile Bayesian model that is designed to resolve fine-grained cell types in spatial transcriptomic data and create comprehensive cellular maps of diverse tissues. To validate cell2location in real tissue, we applied the model to data from the mouse brain, which features diverse neural cell types organised in a well characterised spatial architecture across brain areas, thus presenting a canonical use case to test spatial genomics. We generated matched single nucleus (sn, this submission) and Visium spatial RNA-seq (10X Genomics) profiles of adjacent mouse brain sections that contain multiple regions from the telencephalon and diencephalon. To assess the biological and intra-organ technical variation in spatial mapping, we assayed two mouse brains and serial tissue sections from each brain (total of 3 and 2 matched sections from two animals, respectively, and an extra section for snRNA-seq), creating a rich multi-modal and replicated transcriptomic dataset. Tissue processing. Brains of wild-type adult C57BL/6 mice (postnatal day 56, 1 female and 1 male) were dissected, snap frozen, embedded in optimal cutting temperature compound (Tissue-Tek) and stored at -80oC. Brain hemispheres were cryosectioned at -20oC using a cryostat (Leica, CM3050S). To assess tissue quality, RNA was extracted from test tissue sections using the RNeasy Pico Kit (Qiagen) and yielded high RIN values (9.6 and 9.7) on an Agilent Bioanalyser, indicating high RNA quality. For matched single nuclei and Visium RNA-seq experiments, brain hemispheres were cryosectioned to adjacent thick (200 µm) and thin (10 µm) coronal sections, respectively, and processed the same day. In total, four consecutive sets of thick and thin tissue sections were collected from each brain. Five sets of tissue sections yielded both good quality single nuclei and Visium data (three adjacent sections from mouse 1 and two sections from mouse 2) while one additional section from mouse 2 yielded good single nuclei; these were considered for analysis in this study. Visium spatial transcriptomics. Thin (10 µm) mouse brain sections were cryosectioned and mounted directly onto separate capture areas on 10X Visium Spatial Gene Expression slides (beta product version). Processing was done per manufacturer’s protocols. Briefly, sections were methanol-fixed, hematoxylin and eosin (H&E)-stained, and imaged on a NanoZoomer 2.0 slide scanner (Hamamatsu). Sections were then permeabilized and further processed to obtain cDNA libraries that were quality controlled using the Agilent Bioanalyser. The cDNA libraries were sequenced on the Illumina HiSeq 4000 system, aiming at 300 million raw reads per section with read lengths 28cy R1, 8cy i7 index, 0cy i5 index, 91cy read 2. 10X Visium spatial sequencing data was aligned to mouse pre-mRNA genome reference version mm10 using 10X SpaceRanger and mRNA count matrices were generated by adding intronic and exonic reads for each gene in each location. The paired histology H&E images were processed using 10X SpaceRanger to select locations covered by tissue by aligning pre-recorded spot locations with fiducial border spots in the histology image. This allows evaluating the correspondence between cell maps produced using our method and the known brain anatomy. This also allows identifying the number of nuclei in each spot using nuclear segmentation as described in Suppl. Methods and reported in Fig S8A-D. The histology image was used to manually annotate cortical layers in the primary somatosensory cortex (SSp) region using the lasso tool in the 10X Loupe browser.