Background

Depression is a heterogeneous syndrome and encompasses various concomitant symptoms with varying reactions to treatment. Depressive symptoms are currently assessed through mainly subjective self-reported measures such as questionnaires and interviews. Clinical decision-making and treatment selection depend primarily on the clinical experience and professional judgment of psychiatrists because of no biomarker available for diagnostic or prognostic testing [1]. Selective serotonin reuptake inhibitors (SSRIs) are the common first-line agents used to treat major depressive disorder (MDD) [2, 3], but over two-third of the patients who received SSRIs treatment failed to achieve symptom remission [4]. In response to antidepressants, it is estimated that up to 42% of the individual variation was explained by genetic factors. From this perspective, the genetic makeup of patients may help to select an appropriate medication for different individuals and allow adjustment of drug dosage according to the likelihood of optimal therapeutic effect with least side effects. However, no significant discovery of specific genetic polymorphisms have been reported [5].

Other studies have demonstrated a link between epigenetic modifications and MDD, including methylation [6]. DNA methylation occurs at the cytosine pyrimidine ring of cytosine–phosphate–guanine dinucleotide sites (CpGs), which are particularly common in the promoter regions [7]. DNA methylation in combination with genetic predisposition and environmental exposure could serve as a prognostic factor of disease occurrence or personal risk [8]. Blood methylation patterns have also been evidenced to be associated with the risk of long-term depression [9]. Variation in the TPH2 gene was explored as a possible factor since genetic variability related to the brain serotonin system has a significant impact on MDD [10]. Our previous studies indicate that TPH2 single nucleotide polymorphisms (SNPs) (rs7305115, the haplotype of rs7305115 and rs4290270 [11], rs1487278, and rs2171363 compounding childhood adversity [12]) are closely associated with the antidepressant response in Chinese MDD patients. Equally important, the investigation on potential biomarkers for predicting response to depression treatment is urgently need due to the high rate of treatment resistance, the increased suicide rate in non-reactive MDD patients, and the crushing economic burden. Predicting patient’s response to an early-stage treatment can help clinicians to optimize therapeutic methods at an earlier stage, which will reduce morbidity and improve patients’ life quality. To the best of our knowledge, only little research has previously been undertaken to predict early responders in MDD based on DNA methylation.

Machine learning (ML) has been used as a valuable tool to assist clinicians to make more thoughtful decisions for their patients due to its capability to manage complex and voluminous datasets with various types of clinical and genomic data [13]. Machine learning has also emerged as a powerful tool to uncover unknown features from large-scale epigenetic data [14]. MDD classification and prediction, based on machine learning and neuroimaging information (e.g., MRI data), have been investigated [15] and systematically summarized [16]. An ensemble learning model has been reported to integrate imaging and genetic information for individualized baseline prediction of response to a 2-week antidepressant treatment in 98 MDD inpatients [17]. Along with clinical and genetic factors assessed at baseline, some machine learning models could generate predictors for treatment response assessed at Week 5 [18]. Deep learning models were developed to evaluate antidepressant treatment outcomes in Taiwanese subjects [19].

Therefore, we sought to identify DNA methylation features and to construct supervised machine learning classifiers to assign responders and non-responders after a 2-week treatment. These potential predictors may enhance the understanding of the epigenetic mechanisms of early prognosis in MDD.

Materials and methods

Standards and guidelines of machine learning in psychiatry were followed when this study was conducted and reported [20].

Participants and clinical assessments

This study included 291 inpatients in a tertiary hospital who were diagnosed as major depressive disorders. Patient eligibility was determined based on the criteria of the Diagnostic and Statistical Manual of the American Psychiatric Association, Fourth Edition (DSM-IV). Blood samples were collected before antidepressant treatment.

All patients met the following criteria: Han Chinese, 18–65 years old, baseline 17-item Hamilton Depression Rating Scale (HAMD-17) [21] scores > 17 points, and their depressive symptoms lasted at least 2 weeks. All patients had just been diagnosed or had recently relapsed and had not been on medication for at least two weeks prior to enrollment. All diagnoses were made independently by two psychiatrists with professional tenure or higher, and confirmed by a third psychiatrist. Participants had never been diagnosed with other DSM-IV Axis I diagnosis (including substance use disorder, schizophrenia, affective disorder, bipolar disorder, generalized anxiety disorder, panic disorder, obsessive-compulsive disorder). They had never been diagnosed with personality disorder or mental retardation. Patients with a history of organic brain syndrome, endocrine, and primary organic diseases, or other medical conditions that would hinder psychiatric evaluation were excluded from the study. Other exclusion criteria included blood, heart, liver, and kidney disorders; electroconvulsive therapy in the past 6 months; or an episode of mania in the previous 12 months. Pregnant and nursing females were also excluded from participation.

All study subjects in the study endorsed written consent that was approved by the Zhongda Hospital Ethics Committee (2016ZDSYLL100-P01) under the Declaration of Helsinki.

Demographic and clinical data

Response was defined as ≥ 50% reduction in HAMD-17 scores from baseline to two weeks [22]. Accordingly, the two-week treatment participants were divided into two groups, responders and non-responders.

Two retrospective self-report questionnaires, the Childhood Trauma Questionnaire (28-item short-form, CTQ-SF) and the Life Events Scale (LES), were used to evaluate recent stress exposures and childhood adversities, respectively. The evaluation of LES and CTQ scales was completed by the same nurse using consistent, scripted language. LES is a self-assessed questionnaire composed of 48 items, reflecting both positive and negative life events experienced within the past year. The LES is divided into positive and negative life events (NLES). The CTQ-SF was dichotomized for use in the gene-environment interaction analyses.

Twelve considered demographic and clinical features are age, gender, years of education, marital status, family history, first occurrence or not, age of onset, number of occurrences, illness duration, HAMD-17, NLES and CTQ-SF baseline scores (Supplemental Material Table 1).

Genetic information

Primers were previously designed by us to encompass 100 bp upstream and 100 bp downstream of TPH2 SNPs that showed a significant association with the antidepressant response, as well as with GC sequence content of CpGs > 20% after methylation [11, 12]. Out of the total 24 TPH2 SNPs, only 11 SNPs (rs7305115, rs2129575, rs11179002, rs11178998, rs7954758, rs1386494, rs1487278, rs17110563, rs34115267, rs10784941, rs17110489) met the DNA methylation status criteria of the sequences to be detected (Supplemental Material Table 2). Methylation levels of 38 TPH2 CpGs were calculated and presented as the ratio of the number of methylated cytosines to the total number of cytosines.

Missing value handling

In the data set comprising 291 observations of 51 variables (12 demographic and clinical features, 38 CpGs’ methylation levels and 1 response variable), 6% entries were missing (see Fig. 1). Of the CpGs’ methylation levels, 3 CpGs (TPH2-7-99, TPH2-7-142, TPH2-7-170) were excluded because they had more than 45% missing values. Due to the randomness of experimental/technological errors and interrelatedness of the variables, missing completely at random (MCAR)/missing at random (MAR) was assumed for the DNA methylation data and the mean imputation can deal with the missing data [23, 24]. The values of other features with missing values were imputed with mode and mean in the case of categorical and numerical features, respectively.

Fig. 1
figure 1

Missingness pattern in the DNA methylation data set

Classification modeling using machine learning algorithms

Normalization (Linear transformation) was used to improve the numerical stability of the model and reduce training time [25]. To avoid overfitting when harnessing maximum amount of data, cross-validation (CV) using entire sample was used to report prediction performance. The CV was 5-fold and the averaged prediction metrics including the area under the receiver operating curve (AUC), F-Measure, G-Mean, accuracy, sensitivity, specificity, positive predictive value (PPV) and negative predictive value (NPV) were reported. Hyperparameter tuning was based on AUC with random search using the caret default tuning settings. A packaging method (Recursive Feature Elimination with random forest, RFE-RF) [26] with 5-fold CV was employed to select the features that contributed the most to the prediction of the early antidepressant response in MDD patients. The variable importance was also estimated using random forest. For better replicability, the 5-fold CV procedure was repeated 10 times.

ML methods were implemented via their interface with the open-source R package “caret” in a standardized and reproducible way. Five different supervised ML algorithms were used in this study, including logistic regression, classification and regression trees (CART), support vector machine with radial basis function kernel (SVM-RBF), a boosting method (logitboost) and random forests (RF) to develop predictive models. All analyses were implemented in R statistical software (version 4.0.4). We utilized the caret package which implements rpart, caTools, e1071 and RandomForest packages for CART, logitboost, SVM-RBF and RF, respectively.

Results

Demographic and clinical characteristics of patients

After a two-week antidepressant therapy, 180 (61.9%) of MDD patients met the criteria for responding to antidepressants. 35.1% (n = 102) of patients were males and the mean age was 46.4, 46.7% (n = 136) of patients were first occurrence and the mean of baseline HAMD-17 was 22.95. Further details of the baseline characteristics of demographic and clinical features are shown in Table 1.

Prior to treatment, no statistically significant differences in the demographic features were observed between the responders and non-responders. The demographic features include age, years of education, family history, education duration, marital status, age of onset, illness duration, NLES and CTQ scores. However, the predominant proportion of women versus men was significant (P = 0.011). Moreover, the HAMD-17 baseline scores of responders were significantly lower than those of non-responders (P = 0.030).

Table 1 Demographic and clinical features at baseline

Model performance

Clinical-based classification

Formulas in classifiers were summarized in Table 2. The results illustrated in Table 3 were obtained when we employed depression severity scores (HAMD-17), together with demographic and clinical features, without / with performing feature selection. A comparison of the classifiers’ performances led to the conclusion that RF reached the highest averaged AUC, and RFE improved the AUC from 58.1% (95%CI: 56.9-59.3%) to 61.2% (95%CI: 60.1-62.4%), but without statistically significant difference (P = 0.067). ROC curves of different classifiers based on demographic and clinical features were demonstrated in Fig. 2. It can also be concluded by comparing the other values that SVM-RBF had highest F-measure and sensitivity values and that logitboost exhibited a higher G-mean, accuracy and specificity than the rest of the algorithms.

Table 2 Formulas in classifiers
Table 3 Averaged prediction metrics for each classifier based on clinical characteristics
Fig. 2
figure 2

ROC curves of different classifiers based on clinical data a) ROC curves without RFE. b) ROC curves with RFE.

CpGs-Based classification

We then examined the discriminant methylation potential of 38 TPH2 CpGs. Formulas in classifiers were listed in Table 2. The results that we achieved when CpG sites were used for classification without/with RFE were summarized in Table 4. It can be concluded that the best performing classification algorithm is RF. Additionally, RFE improved the AUC from 59.0% (95%CI: 57.8-60.3%) to 66.6% (95%CI: 65.4-67.8%) and accuracy from 62.8 to 67.0%, with significant differences (P = 0.004). ROC curves of different classifiers based on TPH2 CpGs data were shown in Fig. 3. SVM-RBF obtained F-measure above 75% and sensitivity above 98%.

Table 4 Averaged prediction metrics for each classifier based on TPH2 CpGs
Fig. 3
figure 3

ROC curves of different classifiers based on CpGs data a) ROC curves without RFE. b) ROC curves with RFE.

Clinical-and-CpGs-Based classification

The results that were gathered from the clinical and TPH2 CpGs data, without/with performing feature selection, were summarized in Table 5, which suggest that RF clearly outperformed the other four classifiers. Additionally, RFE improved the AUC from 61.1% (95%CI: 59.9-62.3%) to 72.9% (95%CI: 71.8-74.0%) and accuracy from 62.5 to 70.0%, the differences were significant (P < 0.001). ROC curves of different classifiers based on clinical and TPH2 CpGs data were illustrated in Fig. 4, suggesting that SVM-RBF obtained F-measure above 75% and sensitivity above 91%.

RF was established as the optimal performing model (72.9% AUC, 78.5% F-Measure, 59.8% G-Mean, 70.0% accuracy, 88.2% sensitivity, 0.706 PPV and 0.679 NPV), with 23 features selected by RFE. RF was thus used to estimate the variable importance of these 23 features for classification. The top-15 variables and variable importance were shown in Table 3 of Supplemental Material. Top-10 variables are TPH2-10-60 (rs2129575), TPH2-2-163 (rs11178998), TPH2-7-170 (rs34115267), TPH2-8-237 (rs10784941), TPH2-1-77 (rs7305115), TPH2-2-133 (rs11178998), TPH2-2-139 (rs11178998), TPH2-8-106 (rs10784941), age of first onset and TPH2-2-159 (rs11178998).

Table 5 Averaged prediction metrics for each classifier based on clinical characteristics and TPH2 CpGs
Fig. 4
figure 4

ROC curves of different classifiers based on clinical and CpGs data a) ROC curves without RFE. b) ROC curves with RFE.

Discussion

Given the phenotypic complexity of the antidepressant response, clinical data are insufficient to guide the treatment selection for each patient [27]. Methylation marks are potential biomarkers reflecting variation within the central nervous system [28] and they are very stable in bio-samples. TPH2 contributes to altered neuronal serotonin (5-HT) function, which are associated with MDD or suicidal behavior. Methylation of CpGs in the TPH2 promoter area affects gene expression [29]. TPH2 is therefore considered as a candidate gene for MDD and the pharmacogenetics of the antidepressant reaction [30]. However, the precise mechanism of the serotonin system in MDD remains to be clarified [31, 32]. In the present study, clinical features and information on TPH2 methylation were gathered to establish prediction models for the early-stage antidepressant response in the Chinese Han population, leading to the identification of important CpGs as potential biomarkers in the early MDD treatment.

The response rate (a 50% reduction of HAMD-17 scores at 2 weeks relative to baseline) is 61.9% in our study. All patients were treated with a single antidepressant appropriate to the clinical indication. Specifically, the antidepressants include Selective Serotonin Reuptake Inhibitors (SSRI) (n = 177) and non-SSRIs (n = 114). The non-SSRIs include serotonin and nor-epinephrine reuptake inhibitors (SNRI) (n = 94), noradrenergic and selective serotonergic antidepressants (NaSSA(s) (n = 13), and serotonin antagonists and reuptake inhibitors (SARI) (n = 7). Antipsychotics and mood stabilizers were not used for concomitant treatment, except for a low dose of benzodiazepine anxiolytic for the treatment of insomnia in some cases. In contrast, the response rate reported in the literature is 36.5% for the MDD patients treated with fluoxetine [33]. Our response rate is indeed higher than that described in the literature. The relatively higher response rate in our study is probably caused by: (1) samples that we collected from in-patients who might have received better care and support from clinic staff at the hospital; (2) the baseline HAMD-17 of in-patients was 22.95 in this study, indicating that the symptoms of these in-patients were mild and not refractory; and (3) the patients were discharged at 2 weeks. They might expect to be discharged, which could cause a bias in the evaluation at 2 weeks. The treatment rebound may occur in patients after discharge from the hospital. Lacking follow up is the limitation of this study. This study more focuses on the short-term effect in 2 weeks, from the perspective of machine learning to analyses its impact factors. Additionally, antidepressant drug dosage was adjusted as needed during the study.

Our findings suggest the better prediction performance of the models with the selected features. The prediction model can synergize clinical data with DNA methylation data to improve the prediction power of our classifiers and clinical prognostic evaluation [34]. RF with RFE in this study outperformed the other reported models according to the clinical features (AUC = 61.2%, 95%CI: 60.1-62.4%) / TPH2 CpGs features (AUC = 66.6%, 95%CI: 65.4-67.8%) / both clinical and TPH2 CpGs features (AUC = 72.9%, 95%CI: 71.8-74.0%). Compared with the other three evaluated models, logistic and rpart classifier have the relatively lower values of ROC-AUC and are less accurate. The sensitivity and specificity were associated with optimal threshold. For example, the classifier’s Youden index gets maximum value at a threshold of 0.581, the sensitivity and specificity of RF with RFE based on clinical and TPH2 CpGs features are 0.882 and 0.405. If we reduce threshold, the sensitivity will decrease and the specificity will increase. In our study, the specificities of all models are not high, which means the classifiers are better at identifying likely responders than at identifying likely non-responders. We also chose AUC to represent the performance of models because AUC combines sensitivity and specificity under different thresholds and it is more often to evaluate for model performance.

Encouraged by the good performance of the RF model, we further investigated the contribution from TPH2 methylation. RFE helped us to identify a small subset of discriminative and predictive CpGs in SNP TPH2 sites. These SNP sites with high importance values have been demonstrated to have a connection with neuropsychiatric conditions, and our research results are consistent with those reported data. A recent research has shown that rs2129575 might be a susceptibility gene underlying heroin addiction [35]. A meta-analysis of the studies in BD showed that the fixed summary OR for rs11178998 (1184 cases and 1585 controls) was 1.33 (95% CI: 1.09–1.61) [36]. Another systematic review and meta-analysis showed that TPH2 SNPs rs11178998 is associated with one or more psychopathological conditions [37]. Also, a significant association with schizophrenia for rs10784941 (p = 0.009, OR minor G-allele 0.82 [0.71–0.95]) was observed in the discovery sample consisting of 788 schizophrenia patients and 688 controls [38]. Moreover, meta-analysis results based on nine SNPs in the TPH2 gene revealed that rs7305115 was associated with suicidal behavior under a fixed effect model [39]. Additionally, rs34115267 was selected into its cohort study due to its risk patterns and processes for psychopathology emerging in adolescence (ROOTS) project [40]. Collectively, in this study, the good performance of ML implied its potential to predict MDD and to assist clinicians in making more objective and efficient decisions. Even though we cannot advocate the applicability of these clinical prediction models at this moment, our study provided the probability of exploring more blood-based biomarkers for MDD prediction, serving as a step towards precision medicine in psychiatry. These predictive SNPs in early-stage treatment response could be utilized in many contexts, such as fundamental research, drug development and clinical practice.

Besides, demographic and clinical variables (e.g., age of first onset, age) were considered important features for early-stage treatment response prediction. Further evidence was provided that age and gender moderate response to antidepressants [41]. In actual statistical analyses, most research on MDD included age and gender as key covariates [42, 43].

However, the following limitations should be considered when interpreting the findings of this study. In view of the relatively small sample size, 5-fold CV was employed to avoid overfitting of the models, and future prospective studies utilizing larger sample sizes are warranted to confirm our findings. Also, the following predictors could be selected to reduce the uncertainty associated with the prediction of the early-stage antidepressant response: electroencephalogram (EEG) [44] and environmental factors [45], such as diet, alcohol consumption, stress and smoking status.

Conclusion

In conclusion, the effects of TPH2 on the early-stage antidepressant response was explored by supervised machine learning algorithms. On the basis of the baseline depression severity and the TPH2 CpG sites, machine learning approaches can enhance our ability to predict the early-stage antidepressant response. Some potentially important predictors (e.g., TPH2-10-60(rs2129575), TPH2-2-163(rs11178998), age of first onset, age) in early-stage treatment response could be utilized in future fundamental research, drug development and clinical practice.