six small clusters with high label entropy even at the coarsest level of annotation highlighted doublet populations ( identified via simultaneous expression of lineage - specific marker genes; for example, expression of both epithelial ( at2 ) and stromal ( smooth muscle ) marker genes ) not labeled as such in the original datasets. these clusters were removed from the hlca core, bringing the total number of clusters to 94. to set a threshold for low donor entropy, we calculated the label entropy for a hypothetical cluster with 95 % of cells from one donor and the remaining 5 % of cells distributed over all other donors, as clusters with > 95 % of the cells from the same cluster could be considered single - donor clusters, possibly caused by remaining batch effects or by donor - specific biology that is difficult to interpret. clusters with a donor entropy below that level ( 0. 43 ) were considered clusters with low donor entropy. to determine how well rare cell types ( ionocyte s, neuroendocrine cells and tuft cells ) were clustered together and separate from other cell types after integration, we calculated recall ( the percentage of all cells annotate d as a specific rare cell type that were grouped into the cluster ) and precision ( the percentage of cells from the cluster that were annotate d as a specific rare cell type ) for all level 3 clusters. nested clustering on harmony and seurat ’ s rpca output was done based on pca of the corrected gene counts, recalculating the principal components for every parent cluster when performing clustering into smaller children clusters, with clustering performed as described above under ‘ umap embedding and clustering ’. the level 3 clusters with the highest sensitivity for each cell type are included in supplementary fig. 3b. re - annotation of cells in the hlca core was done by six investigators with expertise in lung biology ( e. m., m. c. n., a. v. m., l. - e. z., n. e. b. and j. a. k. ) based on original annotations and differentially expressed genes of the hlca core clusters. annotation was done per cluster, using finer clusters where these represented specific known cell types or states rather than donor - specific variation. annotations of cell identities were hierarchical ( as was the harmonized cell type reference ) and each cluster was annotate d at the finest known level, whereafter coarser levels could automatically be inferred ( for example, a cell annotate d as a cd8 t cell was then automatically annotate d as of t cell lineage at level 3, lymphoid cell lineage at level 2 and immune cell lineage at level 1 ). the number of cells per cell type is shown for all levels in supplementary table 5. mislabeling of original cells was identified by comparing final annotations with original harmonized labels and checking whether these were contradictory ( and not only done at different levels of detail ). out of 61 final cell types, 18 included mostly mislabeled cells, 12 of which were previously known cell types. despite consisting of mostly mislabeled cells from the original datasets, individual experts agreed on the annotation of these cell types: for all previously known cell types with a high proportion of mislabeled cells, the majority of experts agreed on the final annotation for the atlas, or only differed in the granularity of annotation. marker genes were calculated based on per - sample, per - cell - type pseudo - bulks, calculating the mean ( normalized and log - transformed ) expression per pseudo - bulk for every gene. pseudo - bulks were only calculated for a sample if it had at least ten cells of the cell type under consideration. an exception was made for cell types with fewer than 100 cells in total, for which the minimum number of cells per sample was set to 3. pseudo - bulks rather than cell - level counts were used to ensure equal weighing of every sample in the differential expression test, thus statistically testing cell type - specific changes in expression that were significant across samples rather than cells. as pseudo - bulks represent the mean of a repeated draw from a single distribution, based on the central limit theorem, we expect pseudo - bulk gene counts to be normally distributed, and a t - test was therefore used to test differential gene expression, comparing a single cell type with all other cell types in the atlas ( marker iteration 1 ). to further filter out differentially expressed genes that were not consistently expressed across samples, we applied a filtering step to remove genes expressed in < 80 % of the pseudo - bulks, or genes expressed in < 50 % of cells per pseudo - bulk ( with the filtering based on the mean across pseudo - bulks ). similarly, to ensure specificity of gene expression, additional filtering was done to remove genes expressed in > 20 % of other pseudo - bulks. for many cell types, marker genes unique to a single cell type across the entire atlas could not be found. to nonetheless collect a robust and unique set of marker genes for every cell type, a hierarchical approach was taken, subsetting the atlas to four compartments ( epithelial, endothelial, immune and stromal, for each of which a marker set was calculated ) before calculating cell type - specific marker genes and filtering on uniqueness only within the compartment ( marker iteration 2 ). when necessary, a second subsetting step was done, now subsetting to the next coarsest cell type set within the compartment ( for example, lymphatic endothelial cells ) and repeating the same procedure ( marker iteration 3 ). finally, filtering criteria were loosened for the remaining cell types for which no unique markers could be found in any of the iterations ( marker iterations 4 and 5 ). exact filtering parameters per iteration can be found in supplementary table 16. for lymphatic endothelial cell subtypes, one subtype contained sufficient cells for only a single sample, hampering a pseudo - bulk - based approach. therefore, lymphatic endothelial cell subset markers ( mature, differentiating and proliferating ) were chosen based on known literature, after checking consistency with expression patterns observed in the hlca lymphatic endothelial cells. to quantify the extent to which different technical and biological covariates correlated with interindividual variation in the atlas, we calculated the variance explained by each covariate for each cell type. we first split the data in the hlca core by cell type annotation, merging substates of a single cell type into one ( supplementary table 5; includes the number of cells per cell type ). for every cell type, we excluded samples that had fewer than ten cells of the sample. we then summarized covariate values per sample for every cell type depending on the variable, taking the mean across cells from a sample for scanvi latent components ( integration results ), umi counts per cell and fractions of mitochondrial umis, while for all other covariates ( for example, bmi and tissue sampling method ) each sample had only one value; therefore, these values were used. next, we performed principal component regression on every covariate, as described previously ( see the section ‘ splitting of studies into datasets ’ ), but now using scanvi latent component scores instead of principal component scores for the regression, yielding a fraction of latent component variance explained per covariate. samples that did not have a value for a given covariate ( for example, where the bmi was not recorded for the donor ) were excluded from the regression. categorical covariates were converted to dummy variables. cell type – covariate pairs for which only one value was observed for the covariate were excluded from the analysis. quantification of the correlation or dependence between variables within a cell type and identification of the minimum number of samples needed to control for spurious correlation are described below.