dataesr/scientific-paragraphs-categorization huggingface dataset:
Cell labels making up less than 0. 02% of all cells are not shown. AT1, 2: alveolar type 1, 2. EC: endothelial cell. NK: natural killer cell. c, Cell type composition per sample, based on level 2 labels. Samples are ordered by anatomical region CCF score, and split into nose, airway and parenchyma groups. d, Summary of dataset integration benchmarking results. Benchmarking was performed on a subset of 12 datasets from the HLCA. Methods are ordered by overall score. Overall score is a weighted mean of batch-correction and biology-conservation performance. For each method, the results are shown only for the best-performing preprocessing of the data for that method. Preprocessing of data is specified under HVG and scaling. HVG: whether or not genes were subsetted to the 2000 most highly variable genes ("HVG") or to 6000 genes ("FULL") before integration.
Scaling: whether or not genes were scaled to mean 0 and standard deviation 1 before integration. Output: format of the method's integrated output. turbinate) and 1 representing the most distal location (alveolar sac) (fig. 2a , Supplementary Data Table  2 , Supplementary Data Table  3 ). Single-cell studies in lung tissue have described several novel lung cell types and states  1, 17, 23. However, consensus definitions of cell types based on single-cell transcriptomic data, particularly of transitional cell states, are lacking. To enable supervised data integration and downstream integrated analysis, we harmonized celltype nomenclature between the different datasets using a 5-level hierarchical cell identity reference framework (Supplementary Data Table  4 , fig. 2b ). We collected cell identity labels for every dataset as provided by the data generator, and mapped these to the hierarchical reference framework.
At the coarsest level (level 1) cells were labeled as epithelial (48%), immune (38%), endothelial (9%), and stromal (4%). Most datasets did not provide the finest level of annotation for all cells, likely due to limitations in cell numbers, such that overall 94%, 66% and 7% of cells were annotated at level 3, 4, and 5, respectively (fig. 2b ). As expected, cell type composition varied between samples, and especially between locations along the CCF (fig. 2c ). To perform integration and remove dataset-specific batch effects, we evaluated 12 different batch integration methods on 12 datasets (fig. 2d , Extended Data Fig. 1 ), using our previously established benchmarking pipeline  [24] [25] [26] [27] [28] [29] [30] [31] [32] [33]. This benchmarking pipeline includes 12 metrics that evaluate the quality of an integration, quantifying both the removal of batch effects and the conservation of biological variation after integration.
High cell type label entropy can identify both annotation disagreements between studies, and clusters of doublets. Indeed, six small clusters with high label entropy even at the coarsest level of annotation highlighted doublet populations (identified via marker gene expression), not labeled as such in the original datasets. These clusters were removed from the HLCA core, bringing the total number of clusters to 93. Of these 93, 61 clusters showed low label entropy (<0. 56), suggesting overall agreement of cell-type labels assigned in the original datasets (fig. 3a, b ). The remaining 32 clusters exhibited high label entropy, highlighting cellular phenotypes that were differently labeled across datasets (fig. 3a, b ). For example, one cluster of myeloid cells (cluster 1. 2. 1) contained cells originally labeled as monocytes, macrophages, and dendritic cells at annotation level 3 (fig.
3c ). Sub-clustering and marker gene expression suggested that this cluster included a homogeneous subcluster of type 2 dendritic cells (DC2s), and the cells in this subcluster were partly mis-labeled as monocytes and macrophages in the foundational datasets (fig. 3c , Extended Data Fig. 3 ). Similarly, we find several such cases among stromal and epithelial cell populations, as well as in continuous cell phenotypes (e. g. , goblet and Figure  3. The HLCA core conserves detailed biology and enables consensus-driven annotation. a, A Uniform Manifold Approximation and Projection (UMAP) of the integrated HLCA, colored by level-1 annotation. b, Cluster label entropy of leiden 3 clusters of the HLCA. HLCA was split into three compartments (immune, epithelial, and endothelial and stromal) for ease of visualization.
3e ). Mis-labeled cells often differed from the final annotation at the finest level, but matched at a lower level of granularity (e. g. adventitial instead of alveolar fibroblast, Extended Data Fig. 4 ). Out of 58 final cell types, 15 included mostly mis-labeled cells. A potential reason for this mis-labeling is that marker genes used for the original labeling were based on individual publications, and might not generalize well. Therefore, we established a 'universal' set of marker genes that generalizes across lung studies, by calculating cell type marker genes over our 14 datasets for every annotation (Extended Data Fig. 5 , Supplementary Data Table  5 ). The fully re-annotated HLCA core thus combines data from a diverse set of studies to provide a carefully curated reference for cell type annotations and marker genes in healthy lung tissue.
The HLCA recovers rare cell types across datasets Rare cell types such as ionocytes, tuft cells, neuroendocrine cells, or specific immune cell subsets are often hard to identify in individual datasets. To determine whether the higher number of cells in the HLCA core provides better power for identifying rare cell types, we explored the quality of rare cell clustering and their labels. Ionocytes, tuft and neuroendocrine cells make up only 0. 08%, 0. 01% and 0. 02% of the cells in the HLCA core according to the original labels, and were originally identified in only 7, 2 and 4 datasets out of 14, respectively. Despite their low abundance, these cells formed three separate clusters of the HLCA core, with 78%, 76% and 96% of the cells carrying the original label in each cluster (fig. 3f ). Marker expression shows that the HLCA core correctly excludes cells mis-labeled as rare epithelial cells from these clusters, but also successfully recovers rare cells that were not recognized as such in the original studies (fig.
3f , Extended Data Fig. 6 a ). Thus, our re-analysis increases the number of datasets in which these rare cells are detected up to three-fold (to 10, 7 and 9 datasets, for ionocytes, tuft and neuroendocrine cells). The correct clustering of rare cell types has been shown to depend on the conservation of subtle biological variation when integrating studies  16. Importantly, other integration methods tested during our benchmarking, such as Harmony 32 and Seurat's RPCA  28  , indeed failed to separate rare cells into distinct clusters, showing the importance of integration method selection when building an atlas (Extended Data Fig. 6 b ). Due to the increased power in the HLCA core, we were also able to detect rare cell identities that were not labeled in any of the constituent datasets. Through iterative clustering we identified two small clusters (312 cells, 0.
The HLCA transfers detailed cell-type annotations to new data and identifies unknown cell types The HLCA core contains an unprecedented diversity of subjects, sampling protocols, and cell identities, and has the potential to serve as a transcriptomic reference for future lung research. Mapping new datasets to this reference can substantially speed up data analysis by generating an informative representation of the data and transferring cell identity annotations. To determine how well annotations can be transferred from the HLCA core to new datasets, we mapped a recently released dataset to the HLCA core using scArches, our recently published transfer learning tool  42  (Extended Data Fig. 9, a-c ). This dataset includes several novel cellular identities that were detected by jointly analyzing single-cell, single-nucleus, and spatial data from 10X Visium  43  to the HLCA core.
We transferred cell-type annotations from the HLCA core to the new dataset on the basis of transcriptomic similarity in the batch-corrected joint embedding (Methods, Extended Data Fig. 9, a-c ). Importantly, the uncertainty of each transferred label (indicating how confidently the label is assigned) is quantified, and cells with high uncertainty scores are labeled as "unknown". Most cells in the new dataset were annotated with high confidence, indicating a high similarity with the cell types already present in the HLCA core (fig. 5a , Extended Data Fig. 9 d ). High levels of uncertainty were observed specifically in regions representing continuous transitions from one cell type to another, and among cellular identities not currently present in the HLCA core. For example, cells in the continuum between monocytes and dendritic cells displayed high label transfer uncertainty (fig.
5a ). Several cell identities that were not present in the HLCA core were correctly labeled as "unknown", even when only few cells of that identity were present in the projected dataset (erythrocytes (n=328), chondrocytes (n=42), Schwann myelinating (n=7), Schwann non-myelinating (n=29); fig. 5b, Extended  Data Fig. 9 e ). Incorrect annotations (i. e. transferred annotations with high certainty, but not matching the original label) highlighted two different cases: cell types that are part of a continuum, with cutoffs between cell types chosen differently in the reference than in the projected data (e. g. secretory, club and goblet cells); and cell types lacking from the HLCA core that have high transcriptional similarity to other cell types that are present in the HLCA, which was observed for several finely annotated immune cell identities.
For example, gamma-delta T Boxes show median and interquartile range, data points outside more than 1. 5 times the interquartile range outside the low and high quartile are considered outliers and not shown. Whiskers extend to the furthest non-outlier point. Bottom: as middle panel, but showing expression of ACKR1. d, Association of cell types with four different lung phenotypes. Association is based on phenotype-related genomic variants from GWA studies, and cell-type specific differentially expressed genes calculated from the HLCA core. Horizontal dashed lines indicate significance threshold alpha=0. 05. p-values are multipletesting-corrected with the Benjamini-Hochberg procedure. fvc: forced vital capacity. COPD: chronic obstructive pulmonary disease. e, UMAP of fibroblast-dominated clusters from the jointly embedded HLCA core and the mapped healthy lung dataset.
UMAP is colored by spatial clusters, with cells outside of the indicated clusters colored in gray. AT1, 2: alveolar type 1, 2 cells. DC: dendritic cells. EC: endothelial cells. ILCs: innate lymphoid cells. Mφ: macrophages. NK cells: natural killer cells. NKT cells: natural killer T cells. SMG: submucosal gland. cells, innate lymphoid cells (ILCs), megakaryocytes, NKT cells, and regulatory T cells were not annotated in the HLCA core, as these cell types could not be distinguished with confidence in the integrated object, and were often lacking in the constituent datasets. Indeed, cell types from the T cell/ILC/NK lineages are known to be particularly difficult to annotate in detail using transcriptomic data only  14. Therefore, cells annotated with these labels in the projected dataset were largely incorrectly annotated as CD4+ T cells, CD8+ T cells, and NK cells through label transfer (fig.
5b , Extended Data Fig. 9 e ). Overall, the transferred labels were correct in the majority of cases, with 69% of the cells correctly labeled, 12% of labels incorrect, and 18% set to "unknown", highlighting the presence of cell types in the projected dataset absent from the HLCA core (fig. 5b ). Label transfer from the HLCA core thus performs competitively with manual cell type labeling as performed in the original studies (fig. 3e, 5b ), is highly time-efficient, and provides a higher level of annotation detail. Taken together, the HLCA core can be used as a reference for label transfer to achieve highly detailed annotation of new datasets, and allows identification of new and unknown cell types in those datasets based on label transfer uncertainty. This greatly speeds up the analysis of new lung datasets.
The HLCA provides crucial context for understanding disease Single-cell studies of disease rely on adequate, matching control samples to allow correct identification of disease-specific changes. Even when such matching controls are available, it can be challenging to distinguish where disease effects differ from natural variation using a single dataset. The HLCA core can provide this context needed for the study of disease. To demonstrate the ability of the HLCA core to contextualize disease data and facilitate their interpretation, we mapped scRNA-seq data from lung cancer samples  44  to the HLCA core with scArches (Extended Data Fig. 10 a-c ). Using HLCA core-based label transfer, we correctly identified cell states missing from the HLCA core as "unknown" (cancer cells and erythroblasts).
The remaining cells were annotated correctly in 77%, incorrectly in 1%, and as unknown in 22% of cases (Extended Data Fig. 10 d-g ). A result of the original study was the separation of endothelial cells into "tumor-associated" and "normal"  44. Clustering the projected dataset with our reference showed that cells expressing the suggested tumor-associated marker ACKR1 were also abundant in healthy tissue from the HLCA core, specifically in venous ECs (fig. 5c , Extended Data Fig. 11 a, b ). Indeed, "tumor marker" expression in tumor cells is not higher than that of healthy cells in these clusters (fig. 5c ). This suggests that ACKR1 is a general marker of venous ECs rather than a tumorspecific EC marker, (fig. 5c , Extended Data Fig. 11 c ). Similarly, the reported 'normal EC' marker EDNRB characterizes aerocyte capillary ECs, both in tumor and in healthy tissue (fig.
Projecting new data onto the HLCA refines HLCA annotations As knowledge of cell types in the lung expands, and the size of newly generated datasets increases, annotations in the HLCA core will need to be further refined. The HLCA and its annotations can be updated by learning from new data projected onto the reference. We simulated such an HLCA update using the previously projected healthy lung dataset, specifically focussing on the novel cell identities that were distinguished based on their tissue location in matched spatial transcriptomic data ("spatially annotated cell types"). These cell identities (i. e. immune-recruiting fibroblasts, perichondrial fibroblasts, non-myelinating and myelinating Schwann cells, epineurial and endoneurial nerve-associated fibroblasts, and chondrocytes) were predominantly from the mesenchymal lineage, and were present at very low frequencies (median: 0.
004% of all cells, Extended Data Fig. 12 a ). In the updated atlas, that combines the HLCA core and the projected data, 3 out of 7 spatially annotated cell types (perichondrial fibroblasts, non-myelinating Schwann cells, and endoneurial nerveassociated fibroblasts, 16, 29 and 35 cells, respectively) could not be recovered in distinct clusters, possibly due to low cell numbers in the projected dataset and clustering parameterization (Methods). In contrast, all spatially annotated mesenchymal cell types with more than 40 cells (immune-recruiting fibroblasts and chondrocytes), and two rare cell types (myelinating Schwann cells and epineurial nerve-associated fibroblasts), were recovered in distinct clusters ("spatially annotated clusters") (fig. 5e , Extended Data Fig. 12 a, b ). Thus, the combined embedding of the HLCA core and the projected dataset retains subtle biological variation present in the newly projected data, which can be used to update the atlas.
Moreover, three out of four spatially annotated clusters also contained cells from the HLCA core, thereby enabling a refinement of existing HLCA core annotations using the spatial context from the projected dataset. For example, HLCA core annotations could be extended for a small subset of fibroblasts to immune-recruiting fibroblasts, which we confirmed using marker gene expression (Extended Data Fig. 12 c ). The fourth spatial cluster (chondrocytes) exclusively contained cells from the projected data, suggesting this cell type was absent in the HLCA but could nonetheless be detected as a separate cluster in the combined embedding. Thus, the HLCA core and its annotations can be refined by mapping new datasets to the atlas and incorporating annotations from these new datasets into the reference.
The HLCA allows large-scale mapping of new data and identification of new cell types and states in healthy and diseased lungs To extend the atlas and include samples from lung disease, we mapped 1,647,652 cells from 338 healthy and diseased individuals from 34 datasets (6 unpublished 43 , 28 published  3, 15, 17, 21, 44, [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]  ) to the HLCA core using scArches  42  , bringing the HLCA to a total of 2. 2 million cells from 444 individuals (fig. 6a ). To test the HLCA as a reference for lung tissue in both health and disease across single-cell technologies, we included healthy samples and samples from numerous lung diseases containing single-cell as well as single-nucleus RNA-seq data, and generated by technologies such as Drop-Seq and SeqWell (Supplementary Data Table  1 ).
Label transfer from the HLCA core to the newly mapped datasets enabled detailed cell type annotation across datasets even for rare cells. In comparison, rare cell type identification with conventional annotation approaches 67 is challenging, especially in smaller datasets, and is linked to several instances of mislabelling (fig. 3e , Extended Data Fig. 4 ). For example, 1,996 migratory DCs could be identified across 25 datasets via label transfer (which constitute 0. 1% of all cells in these datasets), whereas this cell type was originally labeled in only 2 of the datasets of the 7 for which cell type labels were available (Extended Data Fig. 14 ). As label transfer uncertainty highlights cell identities not captured in the HLCA, we investigated whether the uncertainty metric can also be used to identify disease-associated states of healthy cell types captured in the HLCA core.
High label transfer uncertainty can indicate (1) insufficient batch removal when mapping new datasets, (2) outlier samples in the mapped data, and (3) cell identities not captured in the HLCA core. Based on correspondence between transferred annotations and original labels of 7 datasets (Methods), we found that a mean label transfer uncertainty above 0. 2 at the dataset level suggests that residual batch effects (biological or technical) are still present. Out of 34 new datasets, 24 had a mean uncertainty score below this threshold, indicating that mapping of new data to the HLCA core is of high quality in the majority of cases. These 24 datasets include disease samples, as well as single-nucleus and Drop-Seq single-cell data (fig. 6b ), demonstrating the potential of the HLCA core as a universal reference.
Datasets with a mean uncertainty above 0. 2 were often from COVID-19 studies and associated with specific technical covariates (bronchoalveolar lavage fluid (BALF), autopsy, and 10X 5'-sequencing) (fig. 6b ). As control samples from BALF and 10X 5` datasets showed uncertainty levels below 0. 2, high label transfer uncertainty for the remaining datasets was likely due to disease-related cell identities in the data (not present in the healthy reference), rather than residual technical batch effects. Indeed, high uncertainty values in these datasets were driven by macrophages and monocytes (Extended Data Fig. 15 ), which are activated and recruited in SARS-CoV-2 pneumonia  65, 66  Pulmonary diseases are characterized by the emergence of unique disease-associated transcriptional phenotypes  2, 17, 19, 21, 68  We observed higher levels of label transfer uncertainty in datasets from diseased lungs (fig 6b, condition), possibly flagging cell types changed in response to disease.
For example, labels of various fibroblast and macrophage cell types known to be affected by idiopathic pulmonary fibrosis (IPF) are transferred with higher uncertainty in IPF samples than in samples from healthy controls from the same dataset  62  (fig. 6c , Extended Data Fig. 16 a, b ). Label uncertainty thus detects cell identities that are specifically altered in the context of disease, an essential step in the analysis of diseased tissue data. In addition to detecting transferred annotations altered in disease, we investigated whether uncertainty scores, which are quantified per cell, also directly highlight the cells from these annotations that are most affected by the disease condition, thereby immediately focusing on the relevant populations. To identify these cellular subsets, and learn matching disease-specific gene signatures, we compared gene expression between high-uncertainty and low-uncertainty cells in samples from patients with IPF (Supplementary Data Table  8 , Supplementary Data Table  9 ).
DISCUSSION We built the Human Lung Cell Atlas, an integrated reference atlas of the human respiratory system that contains over 2. 2 million cells from 46 datasets, covering all major lung single-cell RNA-seq studies published to date. The core of this atlas consists of a fully integrated healthy reference of 14 datasets with a consensus reannotation of, and robust marker genes for 58 cell identities, representing a first data-derived consensus annotation of the cellular landscape of the human lung. We leveraged the unprecedented complexity of the HLCA in the number of cells and samples to optimize recovery of rare cell types which could not be annotated in individual datasets, and to identify cell-type specific gene modules associated with relevant covariates such as lung anatomical location, and age, sex, BMI and smoking status of the tissue donor.
To provide the HLCA reference as a tool for the community, we built an scArches reference model of the HLCA that enables efficient projection of new data onto the atlas. By projecting data onto the HLCA, we showed that the HLCA enables a fast, detailed annotation of new datasets, including detection of rare cell identities. When applied to disease data, HLCA reference mapping facilitates direct identification of unique, disease-associated cell states and corresponding gene signatures. Taken together, the HLCA is a universal reference for single-cell lung research that promises to accelerate future studies into pulmonary health and disease. The constituent datasets of the HLCA widely vary in their experimental design (sampling method, subject selection, single cell platform etc. ) and therefore exhibit dataset-specific batch effects.
Reduction of such batch effects, while retaining biological information, is crucial for integrated analysis of the data. We showed that the high quality of the HLCA hinged on the choice of integration method, with methods like Seurat's RPCA  28  and Harmony 32 being unable to correctly group rare cell identities into separate clusters. Importantly, integration of datasets inherently entails a trade-off between removal of batch-effect and conservation of biological variation  16. While conserving biological variation in the HLCA enabled capturing subtle biological heterogeneity, such as rare cell types or altered cell states, it also resulted in some clusters being dominated by cells from single individuals. These clusters may represent residual batch effects or rare biological variation. As we showed that substantial transcriptomic variance is associated with demographic covariates, which vary between individuals, residual differences observed between individuals may be related to biological variation.