Identifying genomic regions with hypervariable ChIP-seq or ATAC-seq signals across given samples is essential for large-scale epigenetic studies. In particular, the hypervariable regions across tumors from different patients indicate their heterogeneity and can contribute to revealing potential cancer subtypes and the associated epigenetic markers. We present HyperChIP as the first complete statistical tool for the task. HyperChIP uses scaled variances that account for the mean-variance dependence to rank genomic regions, and it increases the statistical power by diminishing the influence of true hypervariable regions on model fitting. A pan-cancer case study illustrates the practical utility of HyperChIP.The online version contains supplementary material available at 10.1186/s13059-022-02627-9. Chromatin immunoprecipitation followed by high-throughput sequencing (ChIP-seq) is the premier technology for profiling genome-wide localization of chromatin-binding proteins, including transcription factors and histones with various modifications , 2. BesiIn the early years, the practical applicability of hypervariable analysis was seriously limited by the number of ChIP-seq samples available in a study, and researchers were more inclined to apply differential analysis with a proper experimental design. As a result, a large body of mature computational tools has been developed for differential ChIP-seq analysis , 8. A coIn recent years, with the decrease of sequencing costs, there are more and more large-scale studies in which tens or even hundreds of ChIP/ATAC-seq profiles for different human individuals are generated, and hypervariable analysis is becoming increasingly prevalent in the analysis of ChIP/ATAC-seq data , 17, 18.In many studies, researchers designed their own computational pipelines for calling hypervariable ChIP/ATAC-seq signals , 19–22, p-value calculation can increase the adaptivity to various data sets and avoid an arbitrary selection of HVRs. On the other hand, using an ordinary model fitting framework will almost certainly lead to conserved p-values and low statistical power for identifying HVRs, since it is difficult to strictly avoid the influence of true HVRs on the fitting process. A previous study of ours has suggested that p-values derived from an ordinary parameter estimation framework can hardly bear the strength of multiple testing adjustment [A more fundamental problem is that, instead of coming up with a probabilistic model to assess the statistical significances of observed ChIP/ATAC-seq signal variability, all these studies ranked genomic regions and selected a certain number or proportion of top-ranked ones as hypervariable regions (HVRs), with the specific number or proportion being determined based on practical experience. In these studies, the numbers and proportions ranged from 1000 to 10,000 and from 1 to 25%, respectively. On the one hand, designing a complete statistical model with justment .p-value, which controls the false discovery rate [In this study, we present HyperChIP, a statistical method for hypervariable ChIP/ATAC-seq analysis that is aimed at addressing the above concerns. In this method, a variability statistic that has been corrected for the mean signal intensity is used as the key statistic, and specific efforts have been made to increase the statistical power for identifying HVRs. For the latter, HyperChIP selects a subset of genomic regions with relatively low signal intensities for parameter estimation and further employs the winsorization technique  to rendeery rate . Furtherery rate –29. We tTP63, a confirmed oncogene in several SC types [To demonstrate the practical utility of HyperChIP, we additionally applied it to a pan-cancer ATAC-seq data set, which was generated by The Cancer Genome Atlas (TCGA) program and consisted of ATAC-seq profiles of tumors from hundreds of patients across 23 cancer types . Based oSC types , 31, wasTo evaluate the performance of HyperChIP, we collected three data sets from large-scale cancer studies Table . The fir2 read counts as input. The rows and columns of the matrix correspond to a pre-defined list of genomic regions and a set of ChIP-seq samples, respectively. In this study, we separately compiled a list of regions for each data set. Given a data set, we first called peaks for each sample and merged all the resulting peaks. Broad merged peaks were then divided up into consecutive bins, and narrow ones were left as they were. As for normalization, we constructed a pseudo-reference profile by averaging all the samples and invoked the MA normalization procedure implemented in MAnorm2 [To facilitate the understanding of how HyperChIP works, we briefly describe the required input data of it. HyperChIP takes a matrix of normalized log MAnorm2  to normaGiven a matrix of normalized signal intensities, HyperChIP accounts for the associated mean-variability relationship by applying a gamma family regression method to observed mean-variance pairs. Specifically, it employs a local regression procedure to allow for general mean-variance relationships . It can 2 transformation with a moderately large offset. The results are then subject to quantile normalization. For this method, we have separately tried 5 and 10 as the offset value  variance , 21, 22,To assess the rankings of genomic regions provided by each method, we calculated true discovery proportions (TDPs) among top-ranked regions. More specifically, we defined, among proximal regions, true HVRs as those regions that were linked with HVGs, which were identified based on the corresponding RNA-seq data see the “: Fig. S4A common downstream analysis based on identified HVRs is to use them as features for the classification of samples, with the hope of revealing the substructure of the samples. In the ATAC-seq data set, the 34 NSCLC patients consisted of 26 LUAD and 8 LUSC (lung squamous cell carcinoma) cases, corresponding to two primary subtypes of NSCLC . These s2 read counts at each genomic region follow a normal distribution, with the precision parameter associated with a prior gamma distribution whose expectation value is determined by the MVC. Formally, let Xij denote the normalized log2 read count at region i in sample j. We assume:A complete statistical model specifying the null distribution of the scaled variances is required for assessing their statistical significances. We previously developed MAnorm2 for differential ChIP-seq analysis . In Hypeμi and i and the associated signal variability, respectively; f(∙) denotes the MVC; d0, referred to as the number of prior degrees of freedom, effectively assesses how dispersedly the observed variances are distributed around the MVC ; γ is referred to as the variance ratio factor and is designed for scaling the MVC to better fit the observed mean-variance pairs under this model formulation.Here, i, respectively . Based on the model, it follows:Next, suppose m is the total number of samples. The scaled variances for ranking genomic regions are exactly obtained by replacing μi on the left-hand side of . Additional file where  side of  with \do side of  as the nentclass1pt{minimad0 and γ are estimated by matching the first two sample moments of log-scaled variances with the corresponding theoretical moments of d0. In fact, when applying this method to the three data sets, we can barely identify any significant HVRs at common cutoffs of the BH-adjusted p-value , namely the regions having the smallest scaled variances  under the null model. Inspired by the independent filtering strategy designed by DESeq2 for reducing the strength of multiple testing adjustment , HyperChces Fig. b. For boces Fig. : Fig. S6d0 estimates. With the subset selection and the use of winsorization, a stepwise increase in the estimated d0 was consistently observed across the data sets . Then, we performed Gene Ontology (GO) enrichment analysis for the genes linked with these HVRs/LVRs . For comparison, we also randomly selected a set of other proximal peak regions that matched the number of the HVRs. Compared to the genes linked with these randomly selected regions, from which no significant GO terms were enriched when relatively stringent p-value cutoffs were applied, the genes linked with the HVRs/LVRs enriched more terms . Based on the ATAC-seq signals in these HVRs, we performed a t-distributed stochastic neighbor embedding (t-SNE) analysis [To illustrate the practical utility of HyperChIP, we applied it to a pan-cancer ATAC-seq data set from TCGA , which canalysis  to disseanalysis , were vet-tests  and explored the common properties of each class from the perspective of transcriptional regulators. Technically, we obtained 521 binding motifs of 432 different human TFs from the JASPAR database  and quanHNF4A is an important TF linked with the regulation of liver-specific gene expression as well as multiple biological processes in the epithelia of the gastrointestinal tract and kidneys [HNF4A was expressed almost exclusively in these cancer types  [TP63 was the top 1 TF for the SC class  , LUSC [5a (HNSC) , and ESSa (HNSC) . In our RFX4 is a TF specifically expressed in the brain [RFX4 ranked first for the brain cancer class . We then performed principal component analysis (PCA) of the CTCF ChIP-seq samples with all peak regions or only the HVRs as features. Interestingly, it was found that only in the latter case were the LCLs well clustered by their populations of origin . PCA with these HVRs as features revealed that a large proportion (71.6%) of the ATAC-seq signal variability at these regions was accounted for by the first principal component, which showed a strong association with the development timeline , and the expression of Obox6 is concentrated between the 2-cell embryos and the morulae. For the late stage, both Sox2 and Klf4 (known regulators of ICMs and mESCs) were identified as top-ranked TFs  separately estimated from proximal and distal regions, while controlling for the MVC and the d0 parameter (refer to the HyperChIP model formulated by Eqs. (d0 to positive infinity and apply the winsorization framework (see the “γ (note that no selection of low-intensity regions is made). In this way, the γ estimate derived from proximal/distal regions represents the scaling factor of the MVC to reach the variance values observed at proximal/distal regions, and we can effectively compare the global signal variability between proximal and distal regions by comparing the corresponding γ estimates. Applying this pipeline, we found that the γ estimate derived from proximal regions was smaller than that from distal regions for each of the data sets in Table Regarding the global variability magnitude, the ChIP/ATAC-seq signal variability in distal regions is typically higher than that in proximal regions. Here, to provide a clear demonstration of this difference, we design a pipeline for comparing the global signal variability (across a given set of ChIP/ATAC-seq samples) between proximal and distal regions. Technically, we achieve it by comparing the variance ratio factors (denoted by  by Eqs.  and 2)))γ) separsee the “” sectionHyperChIP has been presented as a complete statistical tool for identifying HVRs on ChIP/ATAC-seq samples. It uses local regression to adaptively capture the mean-variance relationship, which leads to better statistics for ranking HVRs compared to other existing ones. Specific efforts have been made to alleviate the influence of HVRs and LVRs on model fitting, which effectively increases the statistical power of HyperChIP. Case studies indicate that the HVRs identified by HyperChIP not only provide a solid basis to uncover the similarity structure among the involved samples, but can also contribute to the identification of regulators pertaining to the similarity structure when coupled with a motif-scanning procedure.https://gdc.cancer.gov/about-data/publications/ATACseq-AWG.Processing of the mouse ATAC-seq samples, the RNA-seq samples associated with the data sets in Table For the pan-cancer and mouse ATAC-seq data sets, the associated gene expression values, which were respectively CPM and FPKM values derived from RNA-seq data, were directly obtained from the corresponding studies. Accompanying input samples measuring background signals were available for all the ChIP-seq samples and were processed in the same way as were the ChIP-seq samples.For paired-end ChIP-seq and input samples, we converted each read pair into a single read whose 5′ end lay upstream of the associated DNA fragment center by 100 bp, with the fragment center inferred as the midpoint between the two 5′ ends of the read pair. For ATAC-seq read alignments, we shifted upstream each individual read by 100 bp. The whole process was for making the 5′ ends of all the resulting reads lie upstream of the presumed protein binding sites by a fixed distance.Peak calling for each ChIP-seq sample was then performed against the corresponding input sample by using MACS v1.4.2), with the parameters “--nomodel --shiftsize=100 --keep-dup=all” . For the, with thA count matrix and an occupancy matrix have been constructed for each data set. Rows and columns of both matrices corresponded to a list of genomic regions and the related ChIP/ATAC-seq samples, respectively. The count matrix recorded raw read counts. The occupancy matrix used binary variables to indicate whether each region was a peak region in each sample.For all the data sets but the pan-cancer ATAC-seq one, the count and occupancy matrices were generated by invoking MAnorm2_utils (v1.0.0)  with theFor the two matrices associated with each data set, we then removed the genomic regions on sex chromosomes to avoid the influence of different biological sexes. We also classified the remaining regions into proximal and distal ones and accordingly split each matrix. Technically, each region with a distance less than 5 kb to any (UCSC annotated) transcription start site was considered proximal, and it was considered distal otherwise . Define Yij = log2(Kij + 0.5).We detail here the method used in the study for deriving normalized logTo normalize the samples, we first construct a pseudo-reference profile as normalization baseline, which is defined by:Pi with which the associated ∑jOij are 0 will never be used in the subsequent normalization procedures.The above definition is for notational convenience. In fact, the j is accomplished by applying a linear transformation to all the corresponding Yij. Formally, let Xij = αj + βjYij be normalized log2 read counts, where αj and βj are coefficients to be determined. For notational simplicity, we further define M and A values as Mij = Xij − Pi and Aij = (Pi + Xij)/2, respectively, and define nj = ∑iOij to be the total number of regions that are occupied by sample j. The two coefficients are determined by imposing the following two constraints:We next repeatedly normalize each sample against the baseline. Technically, the normalization of sample M-A trend at common peak regions of sample j and the pseudo-reference profile. Solutions for αj and βj are given by:Intrinsically, the above two constraints are for simultaneously removing the global signal difference and d0 and γ.The whole model formulation of HyperChIP as well as the associated hypothesis testing procedure is given by the Eqs. , 2), an, an2), ai. Set pl and pu to two small values representing the maximum proportions of outliers allowed in the lower and upper tails of all zi, respectively . Let ql and qu be the corresponding lower and upper sample quantiles of zi, respectively. Then, winsorized zi are defined by:We first explain the application of the winsorization technique. The idea is similar to robust limma , and we Based on the model, it approximately follows:zi, the winsorization of Note that, in contrast with the winsorization of We next apply a moment estimation approach. It follows from Eq. :11\documd0 and then solve Eq. d0 and thzi of the 10% of regions with the smallest Besides using winsorization, HyperChIP also makes a selection of low-intensity regions for parameter estimation. By default, the above winsorization process is only applied to the 2 read counts as used by HyperChIP. For the min-rank method, it was applied to the same normalized data as well. For the method that uses a moderately large offset when applying a log2 transformation, we followed the computational pipeline presented in the original study [2-CPM values by using the cpm function of the edgeR package [2-CPM values and calculated the observed variance associated with each region. Finally, these variances were used to rank HVRs.For the methods that do not consider the mean-variability dependence, the associated variability statistics, including observed variance, MAD, and IQR, were calculated from the same normalized logal study . More sp package , with se2-CPM values by using the calcNormFactors and cpm functions of the edgeR package, with log=TRUE for the latter. Then, the standard limma pipeline [2-CPM values, with trend=TRUE for the eBayes function (note that the design matrix contained only an intercept variable). The ratios of sample variances to prior variances were then used as key statistics for identifying HVGs, and we applied a one-sided p-value cutoff of 0.05.We identified HVGs separately for each data set in Table pipeline  was appl2 read counts associated with each feature. For the large-offset method, the normalized data bound with it were directly used for the subsequent clustering analysis [Each classification of the samples was performed by using a set of top-ranked proximal/distal HVRs derived by some method as features. For all the methods but the large-offset one, we first separately scaled the normalized loganalysis . Then, wanalysis , with meanalysis .For the GO enrichment analysis, GO terms for biological processes were obtained from the Molecular Signatures Database (MSigDB) . EnrichmFor the histopathological labels of the LUAD patients, we first made a classification based on the most prevalent histologic pattern of each patient, which was lepidic, papillary, acinar, or solid . Accordip-value associated with each model to evaluate the prognostic association of the corresponding region. For the hierarchical clustering of the patients, we followed the same pipeline as used for classifying the NSCLC ATAC-seq samples, except that the proximal and distal HVRs were used together as features. Testing the survival difference between the resulting two subgroups was achieved by using the survdiff function of the survival package [We also separately performed a regression of the survival time of the patients on the H3K27ac ChIP-seq signals in each region, by fitting a Cox proportional hazards model . Technic package .The phastCons scores for assessing the sequence conservation of different regions were obtained from the phastCons100way.UCSC.hg19 package . Each bat-test between the ATAC-seq signals  associated with the two genotypes. Finally, the SNPs with a BH-adjusted p-value less than 0.1 were considered as significant QTLs.For the NSCLC ATAC-seq data set, among the germline SNPs located within the peak regions, we have identified QTLs whose different genotypes were associated with significantly differential ATAC-seq signals in the enclosing peak region. For this analysis, we first noticed that all the SNPs were associated with exactly two different genotypes across the individuals, referred to as reference and alternative genotypes. To increase the statistical power, we filtered out the SNPs whose reference or alternative genotype was associated with less than 5 individuals. Then, for each remaining SNP, we performed a two-sample Xij is the normalized log2 read count at HVR i in sample j. Let Xi∙ =  be the vector of normalized log2 read counts at HVR i in all the samples. We define:For the t-SNE analysis, we first separately scaled the ATAC-seq signals at each significant HVR. Formally, suppose Zj∙ =  be the scaled ATAC-seq signals at all the HVRs in sample j. We then performed a PCA by using Zj∙ as the features of sample j. Finally, the t-SNE routine implemented in the Rtsne package [where mean and sd refer to the sample mean and sample standard deviation, respectively. Let  package  was applImi indicate whether HVR i contains an instance of motif m. Each Imi takes a value of 0 or 1. Then, we defined the activity score of each motif m in each sample j as:For the identification of class-specific regulators, we first performed a motif-scanning analysis by using the matchMotifs function of the motifmatchr package  with deft-test for each motif to compare its activity scores between the samples belonging to the class and the other samples.where the sum operators are applied to all the HVRs and the subtraction is for adjusting for sample-specific biases. Finally, for each of the four classes of cancer types, we performed a two-sample For the CTCF ChIP-seq data set of human LCLs as well as the ATAC-seq data set of mouse preimplantation embryos and mESCs, PCA was performed based on the same procedure as used for the pan-cancer ATAC-seq data set. For the mouse ATAC-seq data set, the identification of early/late stage-specific regulators was achieved by following the same pipeline as applied to the pan-cancer ATAC-seq data set, except that binding motifs of mouse TFs instead of human ones were used.Additional file 1: Figure S1. Scatter plots showing various mean-variance trends associated with different data sets. Variance is shown at the log10 scale. Red lines depict the corresponding MVCs. Red points mark the 1000 regions with the largest scaled variances. Figure S2. Scatter plots of log10 scaled variances against observed mean signal intensities for different data sets. Red points mark the 1000 regions with the largest scaled variances. Figure S3. Applying other methods for ranking genomic regions and selecting HVRs. (a-c) Scatter plots showing the mean-variance trend  associated with the H3K27ac ChIP-seq data set as well as the regions that are ranked in the top 1000 HVRs by each method (marked by red points). MAD, median absolute deviation; IQR, interquartile range. Figure S4. Identifying HVGs. We have separately identified HVGs for each data set in Table Figure S5. Selecting a subset of genomic regions and using Winsorization for parameter estimation. (a) For the ATAC-seq and Pol II ChIP-seq data sets, bar plots showing the distributions of top-ranked proximal/distal HVRs along the range of mean intensities. For each data set, proximal and distal regions have been separately divided into 10 equally-sized groups based on the observed mean signal intensities. (b) Bar plots showing the distributions of top-ranked proximal/distal LVRs along the range of mean intensities. (c) d0 estimates resulting from different parameter estimation methods. Inf refers to positive infinity. Figure S6. The distributions of top-ranked proximal HVRs and LVRs associated with the Pol II ChIP-seq data set. The top-ranked LVRs form two clusters that are somewhat separated from one another in the mean-variance scatter plot, owing to a gap (indicated by the area circled in green) largely corresponding to the 70th to 90th percentile of mean intensities. As a result, the proportion of the LVRs dips at the corresponding two groups of regions, leading to a bimodal distribution profile as well as a rise in the HVR proportion that is more dramatic compared to the other two data sets. Figure S7. Evaluating the prognostic associations of different genomic regions.  Proximal/distal HVRs are more significantly associated with the survival time of patients than proximal/distal LVRs and randomly selected proximal/distal peak regions. Results shown here are based on the H3K27ac ChIP-seq data set. The p-values are derived by separately performing a Cox regression on the H3K27ac level in each region. (c) Dendrogram showing the hierarchical clustering of the patients based on the proximal and distal HVRs. The patients are classified into two sub-groups, labeled C1 and C2. (d) There is a significant survival difference between C1 and C2. Figure S8. HVRs have a significant association with somatic copy number variation (CNV).  Proximal/distal HVRs are more likely to be associated with somatic CNV than randomly selected proximal/distal peak regions. Results shown here are based on the ATAC-seq data set. For this data set, the genomic segments with somatic CNV in at least one patient together occupied almost the whole genome (>95%). We therefore considered a region as associated with somatic CNV only if it overlapped CNV segments in more than 5 patients. 1,000 random simulations were performed separately for proximal and distal peak regions. In each time, we randomly selected the same number of proximal/distal peak regions as that of the proximal/distal HVRs. Figure S9. HVRs contain significantly more germline SNPs than by chance. (a) Proximal HVRs identified for the ATAC-seq data set are enriched with germline SNPs. We have performed 1,000 times of random simulation. In each time, a set of proximal peak regions matching the number of the HVRs has been randomly selected. (b) Distal HVRs are enriched with germline SNPs as well. Figure S10. Association between QTLs and HVRs.  Identifying QTLs among the germline SNPs located within ATAC-seq peak regions. Each (BH-adjusted) p-value assesses the statistical significance of the association between the genotype of a SNP and the ATAC-seq signal in the peak region containing it. (c) Box plots showing the ATAC-seq signals associated with different genotypes of the most significant QTL, which is located within a proximal HVR. Ref and Alt refer to the reference genotype and the alternative one, respectively. (d) Box plots showing the RNA-seq signals of the downstream gene of the proximal HVR. (e) Box plots showing the ATAC-seq signals associated with different genotypes of the most significant distal QTL, which is also located within an HVR. (f) Box plots showing the RNA-seq signals of the gene nearest to the distal HVR. Figure S11. For the TCGA pan-cancer ATAC-seq data set, two-dimensional t-SNE plots showing the distribution of BRCA patients. These patients are comprised of 14 basal and 61 non-basal cases. Figure S12.HNF1A is identified as a top-ranked TF for the kidney carcinoma class. (a) Plotting the t-statistics of all motifs against their rankings in the identification of TFs specific to the kidney carcinoma class. (b) Mapping the TF activity scores associated with the HNF1A.1 motif to the t-SNE plot. (c) Mapping the expression levels of the HNF1A gene to the t-SNE plot. (d) Box plots showing the expression of HNF1A in a larger TCGA cohort of patients. TPM, transcripts per million. Figure S13.TP73 is identified as a top-ranked TF for the SC class. (a) Mapping the TF activity scores associated with the TP73 motif to the t-SNE plot. (b) Mapping the expression levels of the TP73 gene to the t-SNE plot. (c) Box plots showing the expression of TP73 in the larger TCGA cohort. Figure S14.RFX4 ranks first among the brain cancer class-specific TFs. (a) Plotting the t-statistics of all motifs against their rankings in the identification of TFs specific to the brain cancer class. (b) Mapping the TF activity scores associated with the RFX4 motif to the t-SNE plot. (c) Mapping the expression levels of the RFX4 gene to the t-SNE plot. (d) Box plots showing the expression of RFX4 in the larger TCGA cohort as well as in 3,006 RNA-seq samples of normal individuals provided by the GTEx (Genotype-Tissue Expression) project . We involved the GTEx data because RNA-seq samples for matched normal tissues of GBM and LGG were missing in the TCGA program. Figure S15. Examples of stage-specific regulators identified from the mouse ATAC-seq data set.  Bar plots showing the TF activity scores and expression levels of (a) Nr5a2 and (b) Gbx2, which are top-ranked TFs associated with the early and late stages, respectively. TF activity scores have been averaged across biological replicates for each individual cell stage. Figure S16. Evaluating the correlations of HVRs identified by different methods with tumor progression stage.  Results shown here are based on the LUAD H3K27ac ChIP-seq data set. For each method, the same number of top-ranked proximal/distal HVRs as identified by HyperChIP are selected. The red dotted line in each plot indicates the median correlation of the HVRs identified by HyperChIP. Figure S17. Applying different methods to the pan-cancer ATAC-seq data set. (ag) Two-dimensional t-SNE plots generated by different methods. For each method, the same number of top-ranked proximal/distal HVRs as identified by HyperChIP were used for the downstream PCA and t-SNE analysis (see Methods in the main text). (h) Bar plot showing the ARI values achieved by different methods in classifying all samples. For each method, we performed a hierarchical clustering of all samples based on the same principal components as used in the t-SNE analysis. The samples were then classified into 23 sub-groups based on the resulting hierarchical tree, and the corresponding ARI assessed the agreement of this classification with the cancer type labels. The red dotted line indicates the ARI value achieved by HyperChIP. Figure S18. Evaluating the ability of different methods to distinguish between the KIRC and KIRP cancer types. (a-g) Zooming in on the t-SNE plots to more clearly present the distributions of KIRC and KIRP samples. (h) Bar plot showing the ARI values achieved by different methods in classifying KIRC and KIRP samples. For each method, we performed a hierarchical clustering of KIRC and KIRP samples and classified them into two sub-groups based on the resulting hierarchical tree. Figure S19. Evaluating the ability of different methods to distinguish between the GBM and LGG cancer types. (a-g) Zooming in on the t-SNE plots to more clearly present the distributions of GBM and LGG samples. (h) Bar plot showing the ARI values achieved by different methods in classifying GBM and LGG samples. For each method, we performed a hierarchical clustering of GBM and LGG samples and classified them into two sub-groups based on the resulting hierarchical tree. Figure S20. Evaluating the ability of different methods to distinguish between the COAD and STAD cancer types. (a-g) Zooming in on the t-SNE plots to more clearly present the distributions of COAD and STAD samples. (h) Bar plot showing the ARI values achieved by different methods in classifying COAD and STAD samples. For each method, we performed a hierarchical clustering of COAD and STAD samples and classified them into two sub-groups based on the resulting hierarchical tree.Additional file 2: Note S1. Statistical simulation. Note S2. Applying HyperChIP without separating proximal and distal regions. S2.1. Evaluating separately the rankings of proximal and distal regions. S2.2. Evaluating the overall rankings of all peak regions. Note S3. Quality control. Note S4. Defining proximal and distal regions.Additional file 3: Table S1. Top 20 GO terms enriched from the genes linked with the significant proximal LVRs identified for the H3K27ac ChIP-seq data set. Table S2. Top 20 GO terms enriched from the genes linked with the significant proximal HVRs identified for the H3K27ac ChIP-seq data set. Table S3. Cancer types involved in the TCGA ATAC-seq data set. Note that in TCGA studies the abbreviation CESC refers to both cervical squamous cell carcinoma and endocervical adenocarcinoma, but all the 4 CESC patients in this data set belong in the former. Note also that the 18 ESCA patients in this data set consist of 12 ESSC  and 6 ESAD  cases, which belong in the SC and DIAD classes, respectively. SC, squamous cell carcinoma; DIAD, digestive adenocarcinoma.Additional file 4: Table S4. Class-specific regulators identified from the TCGA pan-cancer ATAC-seq data set.Additional file 5: Table S5. Stage-specific regulators identified from the mouse ATAC-seq data set.Additional file 6: Table S6. Significant HVRs and LVRs  identified by HyperChIP for each of the data sets in Table Additional file 7. Review history.


A growing number of single-cell sequencing platforms enable joint profiling of multiple omics from the same cells. We present Cobolt, a novel method that not only allows for analyzing the data from joint-modality platforms, but provides a coherent framework for the integration of multiple datasets measured on different modalities. We demonstrate its performance on multi-modality data of gene expression and chromatin accessibility and illustrate the integration abilities of Cobolt by jointly analyzing this multi-modality data with single-cell RNA-seq and ATAC-seq datasets.The online version contains supplementary material available at (10.1186/s13059-021-02556-z). Most single-cell technologies require different cells as input to the platform, and therefore, there remains the challenge of linking together the biological signal from the different modalities, with several computational methods proposed to estimate the linkage between the different modalities, such as LIGER K describing the proportion of each category that makes up cell c. Each category k has a probability vector σ(βk) that provides the distribution of its feature counts. Here, σ indicates the softmax function that transforms βk to a probability vector that sums to 1. The observed vector of counts xc is a multinomial draw with probabilities πc, where πc=σ(B)θc, and B= is a matrix of the individual βk vectors. To extend this model to multiple modalities, we assume a shared latent variable zc that is common across modalities, but each modality has a different Bi)θc differently for data from different batches within the same modality i. We would note that the model can also take batch-corrected counts as input, such as are available for mRNA expression data  between different datasets on the same modality, for example due to differences between platforms or laboratory preparations. To counter this, our model also adjusts the sampling probabilities a e.g., –46), but, butσ, where σ is the softmax transformation. We use this approximation to the Dirichlet distribution to provide a multi-modality method appropriate for sparse sequence count data.The parameter  ProdLDA , which aWe downloaded the processed counts of the adult mouse cerebral cortex data  . We applFor the integration of SNARE-seq with the MOp data using Cobolt, we map the SNARE-seq counts to the peak set called on the MOp scATAC-seq data. Since peaks are typically called in a dataset-specific manner, the ideal integration strategy would be to redo the peak-calling with all datasets combined. However, in Additional file We downloaded the single-nucleus 10x v3 transcriptome dataset  and the open chromatin dataset  [PBMC datasets were downloaded from the 10X website . For chromatin accessibility, we mapped the scATAC-seq reads and the Multiome unsorted reads to the peaks called on the Multiome Chromium X data. No quality filtering was applied to any of the four 10X datasets. Clusters with high mitochondrial expression are identified and annotated as low quality clusters, and clusters with the majority of cells identified by DoubletFinder  are annoGene activity matrix for chromatin accessibility is generated by counting the number of reads overlapping genes and their promoters using BEDOPS , where ai, the encoder takes as input the log-plus-one transformed counts. We use one fully connected layer of size 128, followed by fully connected layers for mean K. The actual parameters used for the Gaussian prior are calculated using the Laplace approximation , resulting in our corrected estimates K was set to 10 in the SNARE-seq analysis and the method comparison analysis so as to be consistent with the default of several other methods for comparison purposes. We used K=30 for the mouse cortex integration and K=10 for the 10X PBMC integration. Estimations of the data’s marginal likelihood were used to assist the selection of K.The number of latent variables For the mouse cortex data integration, we focused on genes and peaks that have top 30% average expression and removed the ones in the top 1%. For the SNARE-seq analysis and the 10X PBMC integration, all features were included in training. The choice of top features is less important here, which we found to have a small effect on the results.Clusters were generated on the corrected latent variables using Louvain algorithm . We used−4, number of latent dimensions equals 10, number of hidden dimension for gene expression equals 100, and number of hidden dimensions for chromatin accessibility equals 500. The parameters were chosen following the scMM paper. BABEL was run with the number of latent dimensions set to 10 and the batch size set to 256. Other parameters were chosen to follow the built-in SNARE-seq defaults.Following the vignette of MOFA2, we used the top 2500 variable genes and cisTopic embeddings of the chromatin accessibility modality as input. Variable genes are selected using the FindVariableFeatures function from Seurat using selection method “vst”. The number of factors was set to 10. Two factors were identified as technical factors after inspecting their correlation with the total number of reads counts per cell. The UMAP representation was then generated using the rest of the factors with the number of neighbors set to 30. scMM was run with batch size equals 32, number of epochs equals 50, learning rate equals 10p-values lower than 0.05 were called significant.DE analysis on gene expression and DA analysis on gene activities were performed using the Wilcoxon rank sum test followed by Bonferroni correction, implemented by the FindMarkers function in Seurat. Gene expression and gene activities were visualized by heatmaps using DoHeatmap in Seurat. DA analysis on the peaks for the SNARE-seq analysis was performed using Fisher’s exact test followed by the Benjamini–Hochberg procedure (following ). Peak-bLIGER and Signac (Seurat) take as input gene-level count summaries from different modalities, such as gene expression or gene body methylation/chromatin accessibility measures. The input is different from Cobolt, which uses the peak summaries directly without needing to summarize at the gene level. Therefore, we applied these two methods on the gene expression and gene activity matrices, where the latter is defined as the summarized chromatin accessibility counts over gene and promoter regions.We ran LIGER (version 0.5.0) using default parameters on the filtered data. Parameter K for factorization is set to 30 after inspecting the plot generated by function suggestK. Louvain clustering was performed by setting the resolution such that 17 clusters were obtained. We ran Signac (version 1.1.0) on the same filtered data. We first performed clustering analysis on the gene expression modality and then transferred the cluster labels to the open chromatin modality. Both the gene expression matrix and gene activity matrix were normalized by running NormalizeData followed by ScaleData. For the gene activity matrix, the scale.factor parameter was set to the median of UMI distribution as suggested by the vignette. Other parameters were kept as default. We then ran FindTransferAnchors with the default number of dimensions equals 30, which is the same as used for LIGER. Finally, we ran TransferData with weight reduction set to “cca” or the Latent Semantic Indexing (LSI) from analyzing the peak matrix. Results using LSI are presented in the paper as it performed better than the “cca” option.For scMM and BABEL, which do not allow the single-modality data to be used in the training of the model, we assign 20% of the cells as paired modality data that is used for the training set; the trained model was then used to generate the embedding on the rest of the cells without providing the pairing information. This provided separate estimates for the unpaired mRNA and ATAC modalities, respectively, with which we evaluated whether the paired cells were close together. For Cobolt, which allows the use of single-modality data for the training of the model, we assign 20% of the cells as paired modality data and the other 80% were given as single-modality data, and then we trained the model on all of the cells. For LIGER and Signac, which are not designed for multiple-modality data, we hide the pairing information on all cells and treat all of the cells as if they were collected on different cells. To be comparable with the other methods, we only evaluated their performance on the 80% of cells treated by the other methods as single-modality data.Additional file 1Supplementary Figures. PDF file containing Supplementary Figures referenced in the main text.Additional file 2Supplementary Methods. PDF file containing additional details regarding the Cobolt algorithm.Additional file 3Table S1. CSV file containing the cell clustering of the mouse cortex data integration.Additional file 4Table S2. CSV file containing the cell clustering of the 10X PBMC integration.Additional file 5 Review history.


Tissues are constituted of heterogeneous cell types. Although single-cell RNA sequencing has paved the way to a deeper understanding of organismal cellular composition, the high cost and technical noise have prevented its wide application. As an alternative, computational deconvolution of bulk tissues can be a cost-effective solution. In this study, we propose DecOT, a deconvolution method that uses the Wasserstein distance as a loss and applies scRNA-seq data as references to characterize the cell type composition from bulk tissue RNA-seq data. The Wasserstein loss in DecOT is able to utilize additional information from gene space. DecOT also applies an ensemble framework to integrate deconvolution results from multiple individuals’ references to mitigate the individual/batch effect. By benchmarking DecOT with four recently proposed square loss-based methods on pseudo-bulk data from four different single-cell data sets and real pancreatic islet bulk samples, we show that DecOT outperforms other methods and the ensemble framework is robust to the choice of references. Quantification of gene expression changes in different tissues or under different conditions gives information on how genes are regulated in organisms. The analysis of gene expression by using RNA sequencing (RNA-seq) has contributed substantially, since its development more than a decade ago, to our understanding of biological processes such as organism development, human disease progression, and patients’ response to treatments. The classic RNA-seq applied to bulk tissue samples has accumulated a rich reservoir of data sets, for example, GTEx, TCGA, and so forth . HoweverWith the rapid development of single-cell technologies, one way to obtain a cell-specific transcriptome is to apply single-cell RNA-seq . HoweverIn recent years, a number of computational deconvolution methods have been developed with the goal of estimating cell-type composition within the bulk sample and/or cell-type-specific states ; Jin an. AccordiBesides square loss, divergence functions for characterizing differences between two distributions, for example, Kullback-Leibler divergence, are also commonly applied as loss functions in solving deconvolution problems . These lRecently, the Wasserstein distance, which originated from the optimal transport (OT) problem ; Kantor, has shoCell types are characterized in gene space. The expression of genes is not mutually independent. The co-expression of genes naturally induces a similarity or distance metric among genes . To the https://github.com/lg-ustb/DecOT).Here, we present DecOT, a bulk gene expression deconvolution method that uses the optimal transport distance as a loss and applies an ensemble framework to integrate reference information from scRNA-seq data of multiple individuals. We apply different ground cost metrics for characterizing gene relations in DecOT. We optimize DecOT under an entropic regularized form. We test the performance of DecOT on pseudo-bulk mixtures generated from different data sets and evaluate its robustness when different reference data are supplied. Finally, we applied DecOT on a real pancreatic islet bulk data set. DecOT is available on GitHub  Euclidean distance: (ii) Cosine similarity: (iii) Pearson correlation: (iv) Topological overlap-based dissimilarity measure (dissTOM)  underweiIn Wasserstein distance, a key factor is the ground cost matrix kage POT  to compukage POT ..., a R To evaluate DecOT and compare it to other deconvolution methods using sets see . We partsets see  to the osets see .After quality control, for each individual in each data set, we split their cells evenly into the reference set and testing set with similar distribution of cell types. Then, we generate 200 pseudo-bulk mixtures by randomly sampling 60% of the cells each time in testing data sets and aggregate the expression counts of each gene to generate the pseudo-bulk sample. The true cell-type proportions are recorded, which allows us to benchmark the performance of different deconvolution methods. The flow chart for constructing pseudo-bulk mixtures is shown in (i) Pearson correlation: (ii) Root-mean-squared error: RMSE = To evaluate the performance of deconvolution methods, we need to measure the deviation of the estimated proportion Cell Type Deconvolution with Wasserstein LossSince Wasserstein distance has been successfully applied to blind source decomposition  and dictWhen references from multi-individuals are available, to minimize the possible bias induced by individual and/or platform variations across different individual references, we apply an ensemble framework similar to SCDC , which aGround Cost Selection, which we refer to as DecOT_dissTOM, DecOT_euclidean, DecOT_cosine, and DecOT_correlation. For these four settings, we apply the aggregated reference, which is, pooling cells from multiple individuals to generate a single reference. In addition, we also evaluate DecOT with dissTOM under the ensemble framework (referred to as DecOT_disTOM_ensamble). The various settings of DecOT are then compared to four other square loss-based methods (including Nonnegative least squares (NNLS), MuSiC, SCDC, and Bisque) on artificial pseudo-bulk mixtures generated from four scRNA-seq data sets (a) There are annotated single-cell reference data from the same individual, from which the bulk sample is collected. We term such a situation as “paired”.b) Reference data are all collected from other individuals. We refer to such a scenario as “unpaired”.We evaluate DecOT with different ground costs as listed in ata sets , Methodsata sets , we consWe mimic the “paired” situations in the benchmark by including cells (in the reference set) from the same individual for generating a pseudo-bulk sample (in the testing set) .In order to show the overall quality of the various methods in pseudo-bulk mixtures generated from different samples in GSE81547, we compared the mean RMSEs and mean Cors, which result from performing different methods on the pseudo-bulk generated based on different individuals . For eacSimilar conclusions are also obtained from benchmarks based on the other three data sets. The results are shown in The choice of reference in solving the supervised deconvolution problem is crucial. We first compare the performance of DecOT by using references from different individuals. In detail, we evaluate DecOT on the pseudo-bulk generated from the testing set of 54_male in GSE81547 by respectively applying reference data from each individual as well as under the ensemble framework (paired and unpaired). Deconvolution with paired single-cell data as a reference will greatly improve the performance. However, in a more realistic scenario, single cells collected from the same individual may have missing cell types as compared to the paired bulk sample, especially when the cell type is rare. Therefore, we conducted an experiment by gradually and cumulatively removing cell types in ascending order of cell count in the reference set of 54_male  and usedAnother possible way for reducing the impact caused by missing cell types in paired single-cell references is to apply DecOT under the ensemble framework. Since our ensemble framework integrates deconvolution results respectively performed under each individual reference, we can still apply imputation on missing cell types in the paired reference. p-values , indicating a more significant correlation between BP and HbA1c levels. In fact, the estimated BP by DecOT is robust over all three groups of references, which can be seen from the variation between the slops of the fitted regression line in Previous studies have shown that in human pancreatic islet samples, hemoglobin A1c (HbA1c) is an important biomarker of type 2 diabetes, and its expression level should be negatively correlated with beta cell functions , Hou et, Frogne. We perfIn this study, we proposed DecOT, which applies single-cell data as references and uses Wasserstein distance as a loss function for decomposing bulk cell types. Compared with the commonly used square loss methods, the optimization of Wasserstein loss in DecOT is able to utilize additional information from gene space, for example, ground cost induced by gene-gene relations. By benchmarking DecOT with four recently proposed square loss-based methods on pseudo-bulk data from four different single-cell data sets and real pancreatic islet bulk samples, DecOT shows superior performance.Wasserstein loss accounts for the distance between genes through the ground cost matrix. In this study, we evaluated four possible choices of ground cost, namely, three common metrics  and the dissTOM distance based on gene co-expression networks. In the analysis of simulated data, the final deconvolution effect of the four metrics did not show much difference; however, since the topological overlap measure (TOM) has been considered a more robust measure of gene interconnections , we recoAlthough DecOT obtains better deconvolution accuracy by using Wasserstein loss, optimization of such a loss also brings a greater computational cost. The application of entropic regularization allows tractable computation of data sets on a larger scale. However, there is a trade-off between accuracy and computation time. This trade-off can be tuned by the two hyperparameters When applying a supervised bulk-cell-type deconvolution algorithm, the possible individual variation and batch effect should be noted when combining references from multiple individuals and/or data sets. DecOT uses an ensemble framework to weigh the deconvolution across multiple results from each individual reference to mitigate individual effects. The weights of the ensemble framework indicate, to a certain extent, the similarity of the gene distribution between the reference individuals and the bulk samples. In the benchmarks on pseudo-bulk data, DecOT using the ensemble framework shows improved accuracy and robustness over existing methods in most scenarios.The performance of deconvolution will be greatly improved when paired single-cell references are available. However, there can be a problem regarding the cell-type integrity in the paired reference. We have tested two solutions in the study, imputation of the missing cell types, and/or applying the ensemble framework with DecOT. The results show that the ensemble framework can effectively utilize information of missing cell types from other reference individuals by adjusting the weights. Although the imputation solution also achieves acceptable results, the ensemble framework of DecOT shows more robust performance.