Robust joint score tests in the application of DNA methylation data analysis

Background Recently differential variability has been showed to be valuable in evaluating the association of DNA methylation to the risks of complex human diseases. The statistical tests based on both differential methylation level and differential variability can be more powerful than those based only on differential methylation level. Anh and Wang (2013) proposed a joint score test (AW) to simultaneously detect for differential methylation and differential variability. However, AW’s method seems to be quite conservative and has not been fully compared with existing joint tests. Results We proposed three improved joint score tests, namely iAW.Lev, iAW.BF, and iAW.TM, and have made extensive comparisons with the joint likelihood ratio test (jointLRT), the Kolmogorov-Smirnov (KS) test, and the AW test. Systematic simulation studies showed that: 1) the three improved tests performed better (i.e., having larger power, while keeping nominal Type I error rates) than the other three tests for data with outliers and having different variances between cases and controls; 2) for data from normal distributions, the three improved tests had slightly lower power than jointLRT and AW. The analyses of two Illumina HumanMethylation27 data sets GSE37020 and GSE20080 and one Illumina Infinium MethylationEPIC data set GSE107080 demonstrated that three improved tests had higher true validation rates than those from jointLRT, KS, and AW. Conclusions The three proposed joint score tests are robust against the violation of normality assumption and presence of outlying observations in comparison with other three existing tests. Among the three proposed tests, iAW.BF seems to be the most robust and effective one for all simulated scenarios and also in real data analyses. Electronic supplementary material The online version of this article (10.1186/s12859-018-2185-3) contains supplementary material, which is available to authorized users.


Background
DNA methylation is an epigenetic mechanism that regulates gene expression without changing genetic codes. Usually, DNA methylation inhibits the expression of its nearby gene by adding a methyl group to the fifth carbon atom of a cytosine ring. Since it is a reversible biological process, DNA methylation is now considered as a potential therapeutic target in cancer treatment due to its ability to inhibit the expression of oncogenes which can transform a cell into a tumor cell in certain circumstances.
One major goal in the analysis of methylation data is to identify disease-associated CpG sites. Many analyses in the past have been focused on the difference of average or *Correspondence: yuejiao@mathstat.yorku.ca 1 Department of Mathematics and Statistics, York University, 4700 Keele Street, M3J1P3 Toronto, Canada Full list of author information is available at the end of the article mean methylation levels between the disease and the control group. However, it has not been a common practice in the classical statistical analysis to test a hypothesis of equal variances since the difference of population means between the disease and control group is normally the inferential interest. Recently, some evidence suggests that the epigenetic variation is also a very important intrinsic characteristic associated with certain diseases [1][2][3][4][5][6]. These papers in DNA methylation analyses showed that differentially variable DNA methylation marks are biologically relevant to the disease of interest since the genes regulated by these marks are enriched in the biological pathways that have been found important to the disease of interest.
Although there are more than 50 statistical tests for equal variance [7], several new methods have been proposed especially for the analysis of DNA methylation data [2,8]. We recently compared these new methods [4] and proposed three improved equal variance tests based on the score test of logistic regression [6]. Since both mean and variance are biologically meaningful in DNA methylation analysis, it is logical to simultaneously test for equal mean and equal variance. The joint likelihood ratio test (jointLRT) and the two-sample Kolmogorov-Smirnov (KS) test are two traditional methods for this task. Recently Anh and Wang (2013) [8] proposed a new joint test based on logistic regression (AW), which is essentially a quadratic form of a vector of two tests. One of them is to test for equal means; the other is to test for equal variances. However, they did not provide the asymptotic distribution of their test statistic nor the comparison of their joint test with jointLRT or KS that are the benchmark tests in the statistical literature.
In this article, we derived the asymptotic distribution of the AW joint test statistic and made comprehensive comparisons between AW, jointLRT and KS tests. Although a normal distribution is usually assumed for methylation data, the violation of normality assumption and presence of outlying points can often be observed in the analysis of real data. Bi-modal distributions are also encountered frequently in practice. To improve the power and robustness of the AW joint test, we proposed three tests based on absolute deviation from mean (iAW.Lev), median (iAW.BF) and trimmed mean (iAW.TM) respectively.
Results from our simulation studies suggest that the three improved tests are robust in skewed distributions and (unimodal) distributions with outliers. Among the three improved tests, iAW.BF is the most robust in mixtures of two normal distributions and also in other scenarios. Results of real data analyses presented that iAW.BF and iAW.TM performed significantly better than AW, jointLRT, and KS. Although iAW.Lev works well in the simulation setting, it does not seem to be very stable in terms of the proportion of true validation in real data analyses.

Justification for Ahn and Wang's joint score test
Ahn and Wang (2013) [8] proposed a joint score test to detect methylation marks relevant to a disease. Their approach tests for homogeneity of means and variances simultaneously. Since Ahn and Wang (2013) [8] did not provide a detailed theoretical proof for the asymptotic distribution of this joint score test, we now fill this gap in theory.
Let X i and Y i denote the methylation value and the corresponding disease status of subject i, where i = 1, 2, . . . , n, with n = n 0 + n 1 , n 0 is the number of the non-diseased subjects (controls, Y i = 0) and n 1 is the number of the diseased subjects (cases, Y i = 1). To detect methylation loci that are relevant to a disease based on means and variances, the corresponding hypothesis is formulated as H 0 : μ 0 = μ 1 and σ 2 0 = σ 2 1 versus H 1 : μ 0 = μ 1 or σ 2 0 = σ 2 1 , in which μ 0 and μ 1 are means of methylation levels for controls and cases, respectively, and σ 2 0 and σ 2 1 are the corresponding variances. Instead of directly testing the above hypothesis, Ahn and Wang (2013) [8] proposed to test H 0 : β 1 = β 2 = 0 versus H a : β 1 = 0 or β 2 = 0, where β 1 and β 2 are the regression coefficients of the following logistic regression: and z i is the within-group squared deviation for subject i, which is defined as x i I y i = 0 /n 0 are the sample means for cases and controls. The AW test statistic T = U T −1 U is a quadratic form of two score statistics U 1 and U 2 for the above logistic regression, where U = (U 1 , U 2 ) T , and is the estimate of the covariance matrix Cov(U).
Under H 0 , the estimated covariance matrix has the following form: Note that in logistic regression (1), the random variables are y i , while x i and z i are fixed (i.e., non-random). Hence, the (asymptotic) distributions of the U 1 , U 2 , and T do not depend on the distributions of x i and z i . In this sense, we can say that the AW test statistic T is theoretically robust against the violation of the normality assumption for the predictors x i and z i . Dobson (1990) [9] showed that U H 0 → N(0, Cov(U)). When the sample size is large, the asymptotic distribution of T is χ 2 2 under H 0 , based on the Law of Large Numbers and the relationship between the multivariate normal distribution and the chi-squared distribution. Ascribed to limited space, the complete proof is included in the Additional file 1.

Three improved joint score tests
Since the within-group squared deviation in (2) might not be very robust, we propose three improved joint score tests.
In the first improved joint score test (denoted as iAW.Lev), we replace the within-group squared deviation by within-group absolute deviation [10]: For the logistic regression logit Pr , the joint score test statistic T Lev is asymptotically chi-squared distributed with two degrees of freedom: whereσ 2 z * is the sample variance for z * i , andσ xz * is the sample covariance between x i and z * i . Note that the proposed improved joint test is different from Levene's test [10] in that Levene's test regards z * i as random and uses ANOVA, while the proposed improved joint test regards z * i as fixed (i.e., non-random) and uses a logistic regression framework.
In the second improved joint score test, we replace the sample means in the T Lev by sample medians [11]: wherex 1 andx 0 are the sample medians for cases and controls respectively. Under the null hypothesis H BF 0 : β BF 0 = β BF 1 = 0, the joint score test statistic T BF follows asymptotically the chi-squared distribution with two degrees of freedom: whereσ 2 z BF is the sample variance for z BF i , andσ xz BF is the sample covariance between x i and z BF i . In the third improved joint score test, we replace the sample means in the T Lev by trimmed sample means [11]: = 0, the joint score test statistic T TM is asymptotically chi-squared distributed with two degrees of freedom: whereσ 2 z TM is the sample variance for z TM i , andσ xz TM is the sample covariance between x i and z TM i .

Simulation studies
We have conducted comprehensive simulations to compare the performances of the three improved tests with the three existing methods: the joint likelihood ratio test based on the normal distribution (jointLRT) [12,13], the Kolmogorov-Smirnov test (KS) [14], and Ahn and Wang's joint score test (AW). We have attained the mathematical expression and the exact distribution of jointLRT test statistics under normal distribution [15]. Due to computational complexity, we used the asymptotic distribution of jointLRT in our simulation studies. The simulation studies examined the following four aspects and their impacts on these six tests: (1) various sample sizes, (2) the presence of heterogeneity of means and variances, (3) the violation of the normality assumption, and (4) outliers. We considered various sample sizes: (n 0 , n 1 )=(100, 100), (n 0 , n 1 )=(50, 50), and (n 0 , n 1 )= (20,20). Four parametric models were employed to generate the methylation data: the normal distribution, the Beta distribution, the chi-square distribution, and the mixture of two normal distributions. To evaluate the impact of outliers, we replaced the DNA methylation level of one randomly picked disease subject by max{x 1,max , and diseased samples are different in both means and variances. We conducted 10,000 simulations to estimate Type I error rates for scenario (1). For the remaining 3 scenarios, 5000 simulations are conducted to estimate the power of a test using the corrected cutoff values obtained in scenario (1) so that corrected Type I error rates are approximately equal to the nominal Type I error rates.
Overall, the three improved joint score tests performed better than the other three methods when methylation levels contained outliers and had different variances between diseased and non-diseased samples. Besides, iAW.BF is the most robust in terms of power among all the scenarios. The KS test had conservative empirical Type I error rates and lowest power in many scenarios.
When methylation levels were generated based on normal distributions without outliers, all tests had the empirical Type I error rates close to the nominal levels, except for KS (Table 1). For Power Scenarios I, II and III, three improved joint score tests had similar performances, but slightly lower power for jointLRT and AW. When methylation values were from normal distributions with an outlier, the three improved joint score tests can keep empirical Type I error rates well at all nominal levels. Whereas the empirical Type I error rates of jointLRT were inflated at all nominal levels, AW and KS had very conservative empirical Type I error rates at all levels ( Table 1). For Power Scenarios I, II and III, the three improved tests had similar or greater power than AW. For Power Scenarios II and III (i.e. different variances), KS had poor estimated power despite the presence or absence of an outlier. Similar findings about KS are also observed in other parametric distributions (Tables 2 and 4).
Similar findings were also observed for the Beta distribution setting ( Table 2). When the Beta distributions of two groups were different in variances (Power Scenarios II and III) and contained outliers, the three improved tests had significantly greater power than AW.
When methylation values were generated from a two-component normal mixture distribution without (Table 3), both iAW.BF and AW had appropriate empirical Table 1 The empirical Type I error rates (× 100) and power (× 100) for the six tests when methylation values were generated from normal distributions without (Outlier=No) or with an outlier (Outlier=Yes  When methylation values were generated from a chisquared distribution without (Table 4), iAW.BF, iAW.TM and AW kept empirical Type I error rates well, though iAW.Lev presented increased empirical Type I error rates. While jointLRT had inflated empirical Type I error rates, and KS has rather conservative empirical Type I error rates. For Power scenarios II and III (i.e. different variances), iAW.BF and iAW.TM had significantly greater power than AW. Besides, iAW.Lev had similar power to AW for three power scenarios. When methylation values were generated from chi-squared distribution with an outlier, the performances of all tests are similar except that AW had conservative empirical Type I error rates.
From the results of the four tables, we found that iAW.BF could control empirical Type I error rates well and have similar or greater power than AW under all scenarios including the existence of outliers, skewed distributions and mixtures of two normal distributions. Except for the scenarios of mixtures of two normal distributions, iAW.Lev and iAW.TM can maintain empirical Type I error rates at proper levels and had similar or greater power than AW. In comparison, AW can keep appropriate empirical Type I error rates for any parametric distributions as designed without outliers. But when the methylation values were generated from a distribution with an outlier, AW tended to have conservative empirical Type I error rates and smaller estimated power. The jointLRT, on the Simulation studies were also conducted when sample size was moderate (50, 50) or small (20,20). The results are provided in Additional file 1: Tables S2-S9). We observed that empirical Type I error rates increased and power decreased when sample size decreased from 100 to 50 subjects per group. Furthermore, the three improved joint score tests still performed significantly better than AW under moderate or small sample size.

Real data analyses
We applied all six statistical tests to three publicly available DNA methylation data sets (GSE37020 [16], GSE20080 [17] and GSE107080 [18]) from Gene Expression Omnibus (GEO)(www.ncbi.nlm.nih.gov/geo). GSE37020 and GSE20080 used Illumina Human-Methylation27 (HM27k) platform to produce DNA methylation profiles for 27,578 CpG sites. Both data sets measured cervical smear samples collected from normal histology (regarded as normal samples) and changed tissues with cervical intraepithelial neoplasia of grade 2 or higher (CIN2+) (CIN2+ samples). GSE37020 contains 24 normal samples and 24 CIN2+ samples, while GSE20080 contains 30 normal samples and 18 CIN2+ samples. GSE107080 contained DNA methylation profiles of about 850K sites measured from whole blood samples using Illumina Infinium MethylationEPIC (EPIC) platform. GSE107080 included 100 individuals with illicit drug injection and hepatitis C type virus (IDU+/HCV+) and 305 individuals without illicit drug injection and hepatitis C type virus (IDU-/HCV-). All the individuals are recruited from a well-established longitudinal cohort, Veteran Aging Cohort Study.
For GSE37020 and GSE20080, we excluded CpG sites residing near SNPs or with missing values. Quantile plots and principal component analysis did not show obvious and suspicious patterns (for details please refer to [4]). We then obtained residuals of samples after regressing out the effect of age from DNA methylation levels. We re-did the principal component analysis on the adjusted data and did not find any obvious patterns (see Additional file 1: Figure S2). After data quality control and preprocessing (for details please refer to [4]), there were 22,859 CpG sites appearing in both cleaned data sets. We used cleaned GSE37020 as the discovery set and cleaned GSE20080 as the validation set to detect CpG sites differentially methylated (DM) or differentially variable (DV) between CIN2+ samples and normal samples. For a given CpG site in a given data set, we applied each of the six joint tests to test for equalities of both means and variances. For a given joint test, we claimed a CpG site in the analysis of GSE37020 as significant methylation candidate (different in means or variances) if the false discovery rate (FDR) [19] adjusted p-value for the CpG site is less than 0.05. The function p.adjust in the statistical software R was used to calculate FDR-adjusted p-value. For a significant site in the analysis of GSE37020, if the corresponding un-adjusted p-value in the analysis of GSE20080 is less than 0.05 and the difference directions of means and variances are consistent between the two data sets, then we claim that the significance in the analysis of GSE37020 is truly validated in the analysis of GSE20080. We use the differences of medians and mean absolute deviations between cases and controls to evaluate the directions.
For HM27k data set GSE37020, the numbers of significant CpG sites (i.e., CpG sites with FDR-adjusted p-value < 0.05) obtained by the 6 joint tests are 4556 (jointLRT), 1288 (KS), 1850 (AW), 2041 (iAW.Lev), 1843 (iAW.BF) and 1838 (iAW.TM). And the truly validated CpG sites are 1705 (jointLRT), 47 (KS), 220 (AW), 666 (iAW.Lev), 296 (iAW.BF) and 342 (iAW.TM). Table 5 presents the numbers/proportions of truly and falsely validated significant CpG sites. The three improved joint score tests have higher true validation ratios than joint LRT, KS test, and AW test. Among all the tests, iAW.Lev had the highest true validation rate (89.2%) and lowest false validation rate (10.8%), followed by iAW.TM and iAW.BF. And we also applied the 6 joint tests on the adjusted data sets, the performances of them are similar (see Additional file 1: Table S1). nSig : the number of significant CpG sites detected in GSE37020 based on FDR adjusted p-value < 0.05; nValidation : the number of validated CpG sites in GSE20080 based on unadjusted p-value < 0.05; nTV : the number of truly validated CpG sites with the same difference directions in means and variances between the two groups; pTV : = nTV nValidation , the proportion of significant CpG sites detected in GSE37020 and truly validated in GSE20080; nFV : the number of falsely validated CpG sites in GSE20080 with inconsistent difference direction in means or variances between the two groups; pFV : = nFV nValidation , the proportion of significant CpG sites detected in GSE37020 but falsely validated in GSE20080 Figure 1 showed the parallel boxplots of DNA methylation levels versus case-control status for the top CpG site (i.e. having the smallest p-value among those truly validated CpG sites for testing homogeneity of means and variances simultaneously) obtained by each of the 6 joint tests. All these top CpG sites were validated in GSE20080. It has been found that the high incidence of cervical lesions is associated to the genes ST6GALNAC3, CRB1 and RGS7, where cg26363196 (jointLRT), cg00321478 (AW) and cg21303386 (iAW.Lev) might reside [20,21]. Furthermore, the gene PRRG2, where cg2196766 (KS) might reside, is involved in signal transduction pathway, which might be a novel biomarker for CIN2+ diagnosis [22]. And the gene FPRL2, where cg06784466 (iAW.BF, iAW.TM) might reside, are related to innate immunity and host defense mechanisms [23].
For GSE107080, we downloaded the processed data set from GEO database [18]. We first removed the CpG sites with at least one missing value or with probe name using "ch" as the prefix. Secondly, CpG sites with detection p-values larger than or equal to 10 −12 are discarded. There are 378,808 CpG sites in the cleaned data set. We drew the plot of quantiles across arrays and did a principal component analysis for the cleaned GSE107080 data set. The results did not show any obvious patterns (see Additional file 1: Figure S3). Additionally, we regressed out the effects of age and cell type compositions and obtained the residuals. There are 378,808 CpG sites and 309 samples (cases: 95 and controls: 295) left in the data set after the adjustment. Results from the principal component analysis on the adjusted data did not show any obvious patterns (see Additional file 1: Figure S4).
For the EPIC data set GSE107080, the samples were randomly split into two sets with approximately equal size (due to odd numbers of cases and controls) as the training set and the validation set. The training set contained 148 controls (IDU-/HCV-) and 48 cases (IDU+/HCV+), and the validation set contained 147 controls and 47 cases. We use the similar method as above to determine if the significance of a CpG site is truly validated.
For GSE107080, the numbers of significant CpG sites (i.e., CpG sites with FDR-adjusted p-value < 0.  Table 6 presents the numbers/proportions of truly and falsely validated significant CpG sites based on GSE107080. The three improved tests have higher true validation ratios than joint LRT, KS and AW tests. Among the three improved tests, iAW.BF and iAW.TM have more than ten percent higher proportion of true validation than AW.

Discussion
The three improved joint score tests are derived from generalized linear model framework as AW. Thus they maintain the strengths of AW in terms of efficiency. Furthermore, the three improved tests use absolute deviation instead of squared deviation used by AW to enhance the robustness. For skewed methylation distributions or distributions with outliers, squared deviation used by AW can be enormously affected by extreme values and leads to erroneous results. Thus AW tends to have conservative empirical Type I error rates and smaller power in some scenarios. Our proposed methods rectify this problem and can maintain good power even if the distribution is skewed or contains one or more outliers. Besides, when compared to squared deviation, absolute deviation retains the same magnitude of the original measurement scales and consequently more interpretable. The iAW.Lev tends to have inflated empirical Type I error rates under skewed and mixture distributions. In comparison, iAW.BF and iAW.TM employ median and trimmed mean as central tendency respectively to calculate absolute deviation. Both of them are robust and can minimize the impact of outliers and skewed distributions in evaluating the overall dispersion of the sample data.
The performance of the jointLRT was highly dependent on the validity of normality assumptions. However, the empirical distribution of methylation data often demonstrates skewness and presence of outlying observations. The KS test was inclined to have conservative empirical Type I error rates and lowest power under many scenarios. Therefore it might not be suitable for DNA methylation analysis as expected.
We would like to address one limitation of our simulation studies. Since the analytical form of the underlying probability distribution of methylation data is rarely known, we have applied various settings in an attempt to mimic the reality. We also tried to evaluate our methods in four different aspects. However, our simulation study might not cover all cases that one might encounter in reality. Nevertheless, the results from real data analyses provide strong evidence to support the thesis that our proposed tests are in general more robust in comparison with the AW test.
Another remark is that the AW test and our improved tests are motivated and connected to the logistic regression. Potentially, these tests could be applied for prediction of disease. The difference of performances of our three proposed tests could be disease-related. In other words, one test might be more suitable for one specific type of disease.
We would also like to make some remarks about the important issue of striking a delicate balance between controlling the false positive rate and increasing testing power. In genomic data analysis, controlling false positive is an important issue. This is why the adjustment of p-values is required to control for multiple testing that could result in highly inflated type I error rates. However, when sample size is small (e.g., in pilot studies), we usually have to make some assumptions in order to carry out , the proportion of significant CpG sites detected in the training set and truly validated in the validation set; nFV : the number of falsely validated CpG sites in validation set with inconsistent difference direction in means or variances between the two groups; pFV : = nFV nValidation , the proportion of significant CpG sites detected in the training set but falsely validated in the validation set statistical inference. In this case, we can make the normality assumption and apply an F-test to detect differentially variable CpG sites.
Finally, we would like to remark that we can further validate the differentially methylated/variable (DM/DV) CpG sites, which were identified in our real data analysis, by technical validation. In the technical validation, we can use pyrosequencing technology to measure more accurately the DNA methylation levels of the identified CpG sites for a subset of cases and controls. If one specific CpG site is detected as DM/DV based on the pyrosequenced data, then we gain more evidence that this CpG site is DM/DV. Pathway enrichment analysis could also provide further evidence that the identified CpG sites are relevant to the disease of interest.

Conclusion
Results from simulation studies and real data analyses have demonstrated that the three proposed joint score tests performed better than the existing methods (AW, jointLRT, and KS) for testing equal means and variances simultaneously when methylation levels contained outliers or had different variances between diseased and non-diseased samples.
In general, iAW.BF was the most robust method in terms of power among all the scenarios considered in our simulation study. It also has significantly better performance when compared with the AW test. For the cases of mixtures of two normal distributions, iAW.Lev and iAW.TM performed similarly to or better than AW. In addition, the proposed tests can be easily applied to very large methylation data sets, eg. data sets from the platforms HM27k and EPIC.