dataesr/scientific-paragraphs-categorization huggingface dataset:
Alignment, quantification and quality control of ATAC data We processed scATAC-seq libraries (read filtering, alignment, barcode counting and cell calling) with 10X Genomics Cell Ranger ATAC pipeline (v. 1. 2. 0) using the prebuilt 10X's GRCh38 genome (v. 3. 1. 0) as reference. We called the peaks using an in-house implementation of the approach described in Cusanovich et al. 63  (available at https:// github. com/cellgeni/cellatac, revision 21-099). In short, the genome was broken into 5 kb windows and then each cell barcode was scored for insertions in each window, generating a binary matrix of windows by cells. Matrices from all samples were concatenated into a unified matrix, which was filtered to retain only the top 200,000 most commonly used windows per sample. Using Signac (https://satijalab.
Downstream scATAC-seq analysis Quality filters, alignment of data across different batches and clustering. To obtain a set of high-quality peaks for downstream analysis, we filtered out peaks that (1) were included in the ENCODE blacklist, (2) had a width outside the 210-1,500 bp range and (3) were accessible in less than 4% of cells from a cellatac cluster. Low-quality cells were also removed by setting to 5. 5 the minimum threshold for log 1 p transformed total counts per cell. We adopted the cisTopic approach 65,66 v. 0. 3. 0 for the core of our downstream analysis. cisTopic uses latent Dirichlet allocation to estimate the probability of a region belonging to a regulatory topic (region-topic distribution) and the contribution of a topic within each cell (topic-cell distribution). The topic-cell matrix was used for constructing the neighbourhood graph, computing UMAP projections and clustering with the Leiden algorithm.
Donor effects were corrected using Harmony  67  (theta = 0). Cell doublets were identified and removed using scrublet  68. Gene activity scores. Next, we generated a denoised accessibility matrix (predictive distribution) by multiplying the topic-cell and region-topic distribution and used it to calculate gene activity scores. To integrate them with scRNA-seq data, gene activity scores were rounded and multiplied by a factor of 10 7 , as previously described  66. Cell type annotation. To annotate cell types in scATAC-seq data, we first performed label transfer from scRNA-seq data of matched individuals. We used canonical correlation analysis as a dimensionality reduction method and vst as a selection method, along with 3,000 variable features and 25 dimensions for finding anchors between the two datasets and transferring the annotations  6.
The predicted cell type annotations by label transfer were validated by importing annotations of the multiomic snRNA-seq/scATAC-seq profiling data. To visualize the correspondence between scATAC-seq final annotations and predictions from label transfer, we plotted the average label transfer score (value between 0 and 1) of each cell type in the annotated cell types in scATAC-seq data. Cell type-specific cis-regulatory networks. Coaccessible peaks in the genome and cis-coaccessibility networks (CCANs) were estimated using the R package Cicero 69 v. 1. 3. 4. 11 with default parameters. We then filtered the denoised accessibility matrix from cisTopic to keep only the peaks included in CCANs. The resulting matrix was further processed to average cells by cell type and peaks by CCAN. Finally, we z scored the matrix across CCANs and visualized the separation of CCANs by cell type by hierarchical clustering and plotting the heatmap.
Alignment, quantification and quality control of Visium data For each 10X Genomics Visium sequencing data, we used Space Ranger Software Suite (v. 1. 2. 1) to align to the GRCh38 human reference genome (official Cell Ranger reference, v. 2020-A) and quantify gene counts. Spots were automatically aligned to the paired H&E images by Space Ranger software. All spots under tissue detected by Space Ranger were included in downstream analysis.
CellPhoneDB and CellSign We updated the CellphoneDB database to include: (1) extra manually curated protein cell-cell interactions (n = 1,852 interactions) and (2) cell-cell interactions involving non-protein ligands such as steroid hormones and other small molecules (n = 194). For the latter, we used the last bona fide enzyme in the biosynthesis pathway (Supplementary Table  11a, b ). To retrieve interactions between supporting and other cell populations identified in our gonadal samples, we used an updated version of our CellPhoneDB  34, 71  (https://github. com/ventolab/CellphoneDB) approach described in ref. 72. In short, we retrieved the interacting pairs of ligands and receptors meeting the following requirements: (1) all the protein members were expressed in at least 10% of the cell type under consideration; and (2) at least one of the protein members in the ligand or the receptor was a differentially expressed gene, with an adjusted P value below 0.
01 and a log 2 fold change above 0. 2. To account for the distinct spatial location of cells, we further classified the cells according to their location in the developing ovaries (outer cortex, inner cortex, medulla) as observed by Visium and smFISH. We filtered cell-cell interactions to exclude cell pairs that do not share the same location. Furthermore, we added a new module to the database called CellSign that links receptors in CellphoneDB to their known downstream TF. To build CellSign, we have manually mined the literature to identify TFs with high specificity for an upstream receptor and recorded the relevant pubmed reference number (Supplementary Table  11c ). We used this database to link our CellPhoneDB results to the relevant downstream TFs, which were derived from our TF analysis.
TF motif activity analysis from scATAC-seq. TF motif activities were computed using chromVar 76 v. 1. 12. 2 with positional weight matrices from JASPAR2018 (ref. 77 ), HOCOMOCOv10 (ref. 78 ), SwissRegulon 79 , HOMER  80. chromVar returns a matrix with binding activity estimates of each TF in each cell, which we used to test for differential TF binding activity between cell types in a one-versus-all fashion with Wilcoxon Rank Sum test (FindAllMarkers function in Seurat). Extended Data Fig. 1  | Quality control of scRNA-seq data of the human developing ovaries and testes. a, Schematic representation of the computational workflow used to analyse scRNA-seq data. b, UMAP (uniform manifold approximation and projection) of the male and female human (left) and mouse (right) scRNA-seq datasets labelled by donor and sample.
Dots from the same donor or sample share a colour. For female mouse scRNA-seq data, an additional UMAP is coloured by the study of origin. c, Barplot showing the proportions of human (top) and mouse (bottom) cells profiled with scRNA-seq coloured by lineage and classified by sex and developmental stage (indicated in post-conceptional weeks (PCW) or embryonic (E) / postnatal (P) days). d, Dot plots showing the variance-scaled, log-transformed expression of genes (X-axis) characteristic of the main lineages (Y-axis) detected in male and female human (top) and mouse (bottom) scRNA-seq datasets. Top-layer groups marker genes by categories. Lineages unique to developing ovaries and testes are highlighted with "*". e, Predicted cell annotations from Li et al. 2017 scRNA-seq analysis of human gonads on our human scRNA-seq dataset.
7  | Gonadal supporting PAX8+ cells define gonadal boundaries. a, Spatial mapping of somatic cell types from the scRNA-seq human dataset to three consecutive spatial transcriptomics slides of a 14 PCW testis using cell2location. Estimated abundance for cell types (colour intensity) contributed by each cell population to each spot (colour) shown over the H&E image; n = 3. Scale bars = 1 mm. b, UMAP (uniform manifold approximation and projection) showing mesothelial, first wave supporting and epithelial cells in human first trimester (left) and mouse embryonic day (E) E10. 5-E12. 5 (right) scRNA-seq data labelled by cell type, location of the tissue, sex, donor or sample and post-conceptional weeks (PCW) or stage. c, Dot plot showing the variance-scaled, log-transformed expression of genes characteristic of the mesothelial, supporting and epithelial subpopulations in human first trimester (top) and mouse E10.
5-E12. 5 (bottom) scRNA-seq data. d, High-resolution large-area imaging of representative gonadal section (sagittal) of a human fetal testis (7PCW, Carnegie Stage CS17) with intensity proportional to smFISH signal for GATA4 (green, gonadal), PAX8 (red, sPAX8 population) and GATA2 (cyan, extragonadal); n = 5. This sample is also shown in Extended Data Fig. 3c. e, High-resolution large-area imaging of a representative section of a mouse fetal ovary (E13. 5) with intensity proportional to smFISH signal for Lgr5 (yellow, cortical pre-granulosa), Pax8 (red, sPAX8), Hmgcs2 (green, medullary pre-granulosa) and Gng13 (magenta, cortical pre-granulosa); n = 2. f, High-resolution large-area imaging of representative sections of three human fetal testes (sagittal late 8, transverse 11 and transverse 12 PCW; n = 3) with intensity proportional to smFISH signal for PAX8 (yellow, sPAX8 population), NR5A1 (cyan, interstitial Fetal Leydig), EPCAM (red, low in supporting cells, high in epithelial cells of the reproductive tubules) and KLK11 (green; coelomic epithelium).
b, Heatmap reporting label transfer scores from human scRNA-seq to scATACseq somatic cell data of matched individuals. c, UMAP (uniform manifold approximation and projection) of somatic cells in the human scATAC-seq dataset labelled by the cell state identified in snRNA-seq data from the cellcoupled snRNA-seq/snATAC-seq profiling. 4d ). Colour proportional to scaled log-transformed expression. Symbols highlight TF status, as in (Fig. 4b ). Specificity between receptors and the corresponding downstream TF are indicated with a symbol matching the upstream receptors in Fig. 4d. i, Dot plots showing scaled log-transformed expression of genes coding for interacting extra-cellular matrix (ECM) proteins in supporting (top) and germ (bottom) cells states. j, High-resolution imaging of representative gonadal section of a human fetal ovary (19PCW), with intensity proportional to smFISH signal for NTN1 (green, granulosa), FIGLA (yellow, oocytes), DCC (red, oocyte), FOXL2 (magenta, granulosa); n = 2.
White dashed rectangles highlight follicles and the enlarged gonadal region. Scale bars = 100 µm and 10 µm in the magnified region. k, Schematic illustration of main TFs, receptors, ligands and extracellular molecules regulating germ cell differentiation influenced by the granulosa lineage. New molecules identified in our study are highlighted in green. CoelEpi = coelomic epithelium; E = embryonic day; ESGC = early supporting gonadal cells; FGC = fetal germ cells; Gi = gonadal interstitial; Oi = ovarian interstitial; OSE = ovarian surface epithelium; P = postnatal day; PCW = post-conceptional week; PGC = primordial germ cells; preGC = pre-granulosa cells; TF = transcription factor; Ti = testicular interstitial; sPAX8 = supporting PAX8. Extended Data Fig. 9  | Tissue-resident macrophages in the developing testes.
a, Schematics illustrating the CD45+ enrichment strategy for gonadal and extragonadal samples. The 11 samples that were sorted with the panleukocyte marker CD45 are from the following developmental stages: 6, 11, 12 PCW males, and 7. 5, 8. 4, late 8, 9, 11, 11, 14, 17 PCW females. b, Gating strategy to sort immune cells in gonadal samples for a representative donor (F93). Cells were gated on live, singlets and CD45+. c, UMAP projections of immune cells labelled by sex, PCW and donor. d, Heatmap showing label transfer scores from the fetal liver hematopoiesis dataset (Popescu et al. , 2019) to our gonadal immune dataset using a Support Vector Machine (SVM) classifier. Low probabilities assigned to neutrophils, which were not defined in the liver dataset, and to macrophages e, Dot plot showing variance-scaled, logtransformed expression of marker genes expressed in the identified immune subsets.
Flyer points are those past the end of the whiskers. CoelEpi = coelomic epithelium; E = embryonic day; Endo = endothelial; Epi = epithelial; FGC = fetal germ cells; P = postnatal day; PCW = post-conceptional weeks; SMC = smooth muscle cells; Soma = somatic; PV = perivascular; Mese = mesenchymal. Extended Data Fig. 2 | Analysis of the chromatin accessibility landscape of the human developing ovaries and testes. a, Schematic representation of the computational workflow used to analyse human scATAC-seq data. b, UMAP (uniform manifold approximation and projection) of female (top) and male (bottom) human scATAC-seq datasets labelled by donor and post-conceptional weeks (PCW). Dots from the same donor share a colour. c, Heatmap reporting label transfer scores from human scRNA-seq to scATAC-seq female (left) and male (right) data of matched individuals.
Colour intensity corresponds to the average of the label transfer scores for all cells in each annotated cell type. d, UMAP projections of female (left) and male (right) human scATAC-seq datasets labelled by the cell lineage identified in snRNA-seq data from the cell-coupled snRNA-seq/snATAC-seq profiling. Only gonadal tissue was included in the combined snRNA-seq/scATAC-seq assay. CoelEpi = coelomic epithelium; ESGC = early supporting gonadal cells; GC = germ cells; Mesen = mesenchymal; OSE = ovarian surface epithelium; PCW = post-conceptional weeks; PGC = primordial germ cells; preGC = pregranulosa cells; PV = perivascular; SMC = smooth muscle cell; sPAX8 = supporting PAX8. Extended Data Fig. 3 | Gonadal and extragonadal location of mesenchymal and mesothelial cells. a, UMAP (uniform manifold approximation and projection) of human (left) and mouse (right) scRNA-seq datasets labelled by cell lineage and tissue location.
b, Spatial mapping of mesenchymal cell types from the human scRNA-seq dataset to a spatial transcriptomics slide of a late 8 post-conceptional weeks (PCW) testis, a 12 PCW testis and an 11 PCW ovary with cell2location. Estimated abundance for cell types (colour intensity) contributed by each mesenchymal subpopulation to each Visium spot (colour) shown over the H&E images. Scale bars = 1 mm; n = 2. c, High-resolution imaging of a representative gonadal section (sagittal) of a human XY fetal gonad (Carnegie stage, (CS)17). Intensity proportional to smFISH signal for UPK3B (red, coelomic epithelium), GATA4 (yellow, intra-gonadal) and GATA2 (cyan, extra-gonadal); n = 5. The white dashed rectangles (left) highlight the enlarged sample region (right). Scale bars = 100 µm (left) and 10 µm in magnified regions (right).
a, UMAP (uniform manifold approximation and projection) of germ cell in the human (top; n = 10,993), mouse (middle; n = 10,411) and external macaque (bottom: n = 2,685) scRNA-seq datasets labelled by germ cell states, sex, donor/sample identity and developmental stage indicated in post-conceptional weeks (PCW) or embryonic (E) / postnatal (P) days). Doublets and low QC cells removed. b, Downsampled UMAP for human germ cells to account for up to 50 cells per donor (colour) for confirmatory visualisation. c, Dot plots showing the variance-scaled, log-transformed expression of genes characteristic of fetal oogenesis in the human (top), mouse (middle) and macaque (bottom) germ cells scRNA-seq data. d, Relative proportion of human germ cell states (colour) profiled with scRNA-seq, classified by sex and developmental stage.
e, t-SNE (t-distributed stochastic neighbour embedding) projection of scRNA-seq data of human germ cells coloured by Palantir pseudo-time and probability of cells to progress from the PGC status. Germ cells are downsampled to account for 500 cells for each germ cell state. E = embryonic day; FGC = fetal germ cells; P = postnatal day; PCW = post-conceptional weeks; PGC = primordial germ cells. Extended Data Fig. 5 | Cross species TF comparison of germ cells. a, UMAP of germ cell states (colour) in the human scATAC-seq (n = 8,901) dataset. Doublets and low QC cells removed. b, Heatmap reporting label transfer scores from human scRNA-seq to scATAC-seq germ cell data of matched individuals. c, UMAP of germ cells in the human scATAC-seq dataset labelled by cell state identified in snRNA-seq data from the cell-coupled snRNA-seq/snATAC-seq profiling.
a, UMAP (uniform manifold approximation and projection) of gonadal somatic cells in the human (top) and mouse (bottom) scRNA-seq datasets coloured by sample of origin, sex and developmental stage (indicated in post-conceptional weeks (PCW) or embryonic (E) / postnatal (P) day). Dots from the same donor or sample share a colour. b, UMAP projections of the fate probabilities of each cell ending up in one of the terminal states (scRNA-seq). Coloured symbols indicate the initial and terminal cell states predicted by CellRank. Top UMAPs depict two human (7 post-conceptional weeks, PCW testis; 7. 5 PCW ovary) gonadal samples while bottom UMAPs depict two mouse (E11. 5 testis and E12. 5 ovary) gonadal samples, analysed independently. c, t-SNE (t-distributed stochastic neighbour embedding) projection of somatic cells coloured by Palantir pseudo-time and probability of cells to progress from the gonadal coelomic epithelium GATA4+ in humans between 6-8.
5 PCW (left) and mice at E10. 5-E11. 5 (right). Somatic cells are downsampled to account for 150 cells for each cell state in each sex in both species. d, (left) UMAP projections of the predicted probability of ESGC from our dataset onto Guo et al. , 2021 somatic cells manifold using a Support Vector Machine (SVM) classifier. (right) UMAP projections on the validation dataset of human fetal testis, re-analysed from Guo et al. , 2021, labelled by somatic cell state. e, Barplot showing the proportions of somatic cells in the Guo et al. , 2021 dataset coloured by cell state and classified by PCW. f, Dot plots showing the variance-scaled, log-transformed expression of genes characteristic of human ESGC in the Guo et al. , 2021 dataset of human fetal testis. g, Dot plot showing the variance-scaled, log-transformed expression of genes in the WNT4/RSPO1 pathway in ESGC (split in male and female), preGC-I and Sertoli cells in the human (top) and mouse (bottom) scRNA-seq dataset.
h, Dot plots showing the variance-scaled, log-transformed expression of human-specific markers of ESGC in the mouse scRNA-seq dataset. i, Highresolution, imaging of representative human gonadal sections with intensity proportional to smFISH signal for RNA markers. (top) Carnegie stage 19 (CS19) ovary stained for LGR5 (red, ESGC), TSPAN8 (yellow, ESGC), RIMS4 (magenta, 1st wave somatic cells), OSR1 (cyan, preGC-I). The white dashed line outlines the ovary; the white dashed rectangle highlights the enlarged gonadal region. ESGCs nuclei have been marked with dashed circles. (bottom) CS19 testis stained for LGR5 (red, ESGC), TSPAN8 (yellow, ESGC), SRY (magenta, ESGC), SOX9 (cyan, Sertoli). The white dashed line outlines the testis. The white dashed rectangle highlights the enlarged gonadal region.
d, Hierarchical clustering of z-scores for each cis-co-accessibility network (CCAN) identified in human ovarian supporting cells in the human scATAC-seq dataset. e, UMAP projections of somatic cells in the macaque scRNA-seq dataset re-analysed from Zhao et al. , 2020 labelled by cell type and stage. f, Dot plots showing the variance-scaled, log-transformed expression of genes (X-axis) characteristic of ovarian supporting cells (Y-axis) in mouse (left) and macaque (right) scRNA-seq data. Top-layer groups marker genes by categories. g, (top) Diagram showing the information added in the updated version of CellPhoneDB database (CellPhoneDB v4), which includes: (i) 534 novel (1,852 total) ligand-receptor interactions; (ii) 194 novel interactions mediated by small molecules; (iii) 186 novel curated links between ligand-receptor and transcription factors (CellSign module).
et al. , 2021 (left) and brain microglia cells from Bian et al. , 2020 (right) onto our gonadal immune manifold using a SVM classifier. j, UMAP (uniform manifold approximation and projection) of the multi-organ integrated fetal myeloid dataset labelled by tissue and donor. k, Dot plot showing variance-scaled, logtransformed expression of marker genes expressed in the identified cell populations from the multi-organ integrated fetal myeloid dataset. l, Dot plots showing variance-scaled, log-transformed expression of interacting ligands and receptors in the SIGLEC15+ and TREM2+ ftM and gonadal cell populations. Interacting partners (CellPhoneDB) are indicated with a matching symbol. m, Dot plot showing variance-scaled, log-transformed expression of immunoregulatory markers in human gonadal macrophages.
Acknowledgements This publication is part of the  Human Cell Atlas. We gratefully acknowledge the  Sanger Cellular Generation and Phenotyping Core Facility ,  Sanger Core Sequencing  pipeline and The  Flow Cytometry Core Facility from Newcastle University  for support with sample processing and sequencing library preparation;  F. Ahmed ,  J. Cool ,  S. Teichmann ,  T. Hagai ,  S. Williams ,  A. Greenfield ,  D. Alvarez-Errico  and the VenTo team for helpful discussions;  A. García , scientific illustrator from  Bio-Graphics  and  Z. Marečková  for graphical images;  A. Maartens  for proofreading;  S. Pritchard  and  K. Tudor  for smFISH experiments;  A. Oszlanczi ,  A. Knights  and  T. Porter  for help with library preparation;  M. Prete  for web portal support and  R. Tesloianu  for adding interactions in CellPhoneDB.
The human embryonic and fetal material was provided by the  Joint MRC/Wellcome Trust  (grant no. MR/ R006237/1 ) HDBR (http://www. hdbr. org). This paper was supported by  MRC-Human Cell Atlas  (grant no. MR/S036350/1 ); the  European Union 's  Horizon 2020 research and innovation programme HUGODECA  under grant agreement no. 874741 , and  Wellcome Sanger core funding  (grant no. WT206194 ). C. I. M. is financed by the  European Union 's  Horizon 2020 research and innovation programme  under grant agreement no. 874867. A. S. , W. H. G. and J. P. A. -L. are supported by  Wellcome ,  CRUK ,  MSCA  (grant no. 836291 ) and  BBSRC.
Data availability Datasets are available from ArrayExpress (www. ebi. ac. uk/arrayexpress), with accession numbers E-MTAB-10551 (human scRNA-seq), E-MTAB-10570 (human scATAC-seq), E-MTAB-11708 (human snRNA-seq/ scATAC-seq multiomics), E-MTAB-10589 (human Visium) and E-MTAB-11480 (Mouse scRNA-seq). Multiplexed smFISH images are available from BioStudies (www. ebi. ac. uk/biostudies), with accession number S-BIAD393. All data are public access. scRNA-seq datasets to reproduce UMAPs and dot plots can be accessed and downloaded through the web portals www. reproductivecellatlas. org. External datasets for macaque (GSE149629), mouse (GSE136220 and GSE136441) and human (GSE86146) gonads are available through their respective accessions from GEO. External raw sequencing data from human developing tissues are available from ArrayExpress (E-MTAB-7407, E-MTAB-8901, E-MTAB-8581, E-MTAB-0701, E-MTAB-9801) or GEO (GSE141862).
M e s oFig. 2 | 2 Fig. 2 | New gonadal somatic cells during sex determination in humans and mice. a, UMAP of somatic cell states (colour) in the human scRNA-seq (n = 191,230), human scATAC-seq (n = 74,592) and mouse scRNA-seq (n = 45,468) datasets. Doublets and low-quality control cells were removed. b, Dot plots show the variance-scaled, log-transformed expression of genes (x-axis) characteristic of the first wave of somatic cells (y-axis) in humans and mice. c, UMAP of somatic cells overlaid with RNA velocity maps in two humans (7 PCW testis; 7. 5 PCW ovary) and two mice (E11. 5 testis, E12. 5 ovary) gonadal.