Introduction

Major Depressive Disorder (MDD) is predicted to become the leading cause of disability worldwide by 20301, partly due to the limitations of current treatments2. Although antidepressants are commonly prescribed effective treatments3, they prove to be ineffective in a high proportion of cases, with an estimated 40% of those presenting with MDD developing treatment-resistant depression4,5. Furthermore, many treatments are commonly accompanied by side effects, including weight changes, dizziness, fatigue and sexual dysfunction2. There is a need for more effective and better-tolerated antidepressant treatments and to target existing treatments to those most likely to respond. Advances are hampered by poor mechanistic understanding of both MDD itself6,7 and how currently prescribed antidepressants lead to therapeutic effects8.

The mechanism of currently prescribed antidepressants is incompletely understood. Initial theories surmised that their therapeutic effects were primarily due to the inhibition of monoamine reuptake in the synapse, leading to an increase in monoamine concentrations in the brain9. However, antidepressant treatment has a delayed onset for symptomatic improvement, which does not reflect the immediate effect on monoamine levels10. This casts doubt on the simple role of monoamines as a causal factor in MDD7,8,11, although other experimental paradigms continue to suggest their importance12. Another prominent theory suggests that antidepressants exert their therapeutic effects by increasing brain-derived neurotrophic factor (BDNF), leading to synaptic remodelling13 and enhanced neuronal plasticity8,14. A recent study found evidence of antidepressants binding directly the BDNF receptor (neurotrophic tyrosine kinase receptor 2;TRKB), proposing this as a potential mechanism of action independent of changes in monoamine concentrations15. Additionally, sex differences in MDD risk16,17, antidepressant efficacy and side-effects are well-documented18, which may reflect sex-specific differences in neuronal circuitry19. However, precise mechanisms of these differences are unclear.

DNAm, the addition of a methyl group at a cytosine-phosphate-guanine (CpG) site, regulates gene expression and impacts cellular function20,21. The evidence for the effect of antidepressants on DNA methylation (DNAm) is growing22,23. In vitro studies found that the antidepressant paroxetine interacted with DNA methyltransferase (DNMT), a key enzyme involved in DNAm24. Furthermore, studies of chronically stressed rodent models have found that stress-induced DNAm and behavioural changes are reversed through both antidepressant treatment25 and DNMT inhibitors26. In 2022, Barbu et al.27 performed a methylome-wide association study (MWAS) of self-reported antidepressant exposure in a subset of participants in Generation Scotland (GS, N = 6428) and the Netherlands Twin Register (NTR, N = 2449), and identified altered DNAm near to genes involved in the innate immune response in those exposed to antidepressants27. As self-report measures may be unreliable due to volunteer recall bias, a poor understanding of the medication nosology, and non-disclosure28,29,30, Barbu et al.27 also performed an MWAS of antidepressant exposure based on recorded antidepressant prescriptions in the last 12 months. However, this assumes continuous treatment, potentially overestimating exposure due to general low adherence to antidepressant medication31. The calculation of active treatment periods from consecutive prescribing events could provide a potentially more reliable identification of antidepressant exposure32. Here, adherence to the medication is assumed given regular prescription dispensations at an expected frequency (given their amount and dosage), rather than a singular prescribing event.

In our study, we build upon previous analyses by Barbu et al.27 by analysing a larger sample of GS (N = 16,531), and by estimating active treatment periods from prescribing records to identify those exposed to antidepressants at DNAm measurement. First, an MWAS was performed on both the self-report and prescription-derived measures of antidepressant exposure. Second, the MWAS analyses were restricted to MDD cases only to assess potential confounding by MDD, and sex-stratified analyses were conducted to investigate any sex-specific effects. Third, functional follow-up analysis of differentially methylated CpG sites was performed. Fourth, we investigated the enrichment of top CpGs in GS and an independent MWAS conducted in the Netherlands Study of Depression and Anxiety (NESDA). Fifth, the relationship between time in treatment and DNAm at significant CpG sites was investigated. Finally, a methylation profile score (MPS) for self-report antidepressant exposure was trained in GS and tested for an association with antidepressant exposure in eight independent external datasets: Finn Twin Cohort (FTC), Study of Health in Pomerania (SHIP-Trend), Lothian Birth Cohort 1936 (LBC1936), FOR2107, NTR, Avon Longitudinal Study of Parents and Children (ALSPAC), Munich Antidepressant Response Study-Unipolar Depression Study (MARS-UniDep) and the Environmental Risk (E-Risk) Longitudinal Twin Study, alongside a prospective sample of GS: Stratifying Depression and Resilience Longitudinally (STRADL) (Fig. 1).

Fig. 1: Study design of investigating antidepressant exposure and DNA methylation.
figure 1

Data: Participants in Generation Scotland (GS) provided blood samples from which DNA methylation was measured. Their antidepressant exposure status was measured using both self-report questionnaires and prescription-derived measures. Prescription-derived measures: Repeated regular prescriptions over time (X axis) for antidepressants (purple bars) are merged to form active antidepressant treatment periods (blue bars). Individuals in an active treatment period at the time of blood sample (black cross) are classed as antidepressant exposed. Methylome-wide association studies: A methylome-wide association study (MWAS), subsequent regional analysis and functional annotation was performed for both measures of antidepressant exposure. Additionally, an enrichment analysis was done using MBD-Sequencing data in the Netherlands Depression and Anxiety (NESDA) cohort for the self-report antidepressant exposure. Methylation Profile Score: Weights for a methylation profile score (MPS) of self-reported antidepressant exposure was calculated in GS using a least absolute shrinkage and selection operator (LASSO) model. Eight independent datasets then tested the association of this MPS with self-reported antidepressant exposure. Created in BioRender. Davyson, E. (2024) https://BioRender.com/s43g100.

Results

The demographics of both antidepressant exposure phenotypes in the GS are shown in Table 1. To assess demographic differences between the exposed and unexposed group, we used Welch’s independent samples t-tests for continuous variables (age, BMI) and chi-squared tests for categorical variables (sex, smoking status and lifetime MDD status).

Table 1 Demographics and structured clinical interview of the DSM (SCID) diagnoses of antidepressant exposed and unexposed individuals using the prescription-derived and self-reported antidepressant exposure phenotypes in Generation Scotland

In both self-report and prescription-derived measures, the antidepressant exposed group were significantly older (tself-report(1970) = 10.6, pself-report = 1.01 × 10−25, tprescription-derived(1180) = 7.35, pprescription-derived = 3.63 × 1013) and had significantly higher BMI measurements (tself-report(1700) = 11.4, pself-report = 5.45 × 1029, tprescription-derived(980) = 9.82, pprescription-derived = 8.69 × 1022). Additionally, both phenotypes showed that the antidepressant-exposed group had significantly different proportions of current, former and never smokers (\(\lambda\)2self-report(2) = 160, pself-report = 1.69 × 1035, \(\lambda\)2prescription-derived(2) = 114, pprescription-derived = 1.49 × 1025), a significantly higher proportion of females (\(\lambda\)2self-report(1) = 214, pself-report = 1.53 × 1048, \(\lambda\)2prescription-derived(1) = 129, pprescription-derived = 7.62 × 1030) and significantly higher proportion of those with lifetime-MDD (\(\lambda\)2self-report(1) = 2170, pself-report < 1 × 10320, \(\lambda\)2prescription-derived(1) = 1450, pprescription-derived = 2.72 × 10318).

Methylome-wide association studies

The self-report MWAS (Fig. 2A, Table 2) and prescription-derived MWAS (Fig. 2B, Supplementary Table 1) identified seven and four hypermethylated CpGs respectively, in those exposed to antidepressants (Supplementary Figs. 1, 2). The effect estimates from all CpGs in both analyses were significantly correlated (R = 0.54, p < 2.2 × 1016) (Supplementary Fig. 3).

Fig. 2: Methylome-wide association studies (MWAS) of self-reported and prescription-derived antidepressant exposure.
figure 2

Manhattan plots of the MWAS of self-report (A) and prescription-derived (B) antidepressant exposure using a Mixed-linear-model Omics-based Analysis (MOA) model. Significance was assessed using the p-value threshold 9.42 × 10−8, as recommended for case-control MWAS analyses67. C The MOA MWAS standardised effect sizes and 95% confidence-intervals (effect estimate +/- 1.96*Standard Error) for associated CpGs (p < 9.42 × 108) for the full sample (Nself-report = 16,531, Nprescription-derived = 7951) and MDD-subgroup sample (Nself-report = 2268, Nprescription-derived = 792). Data are presented as the MWAS effect estimates +/- the 95% confidence intervals. Effect sizes represent a per-1 standard-deviation increase in CpG methylation M-values.

Table 2 Eight CpGs associated with self-reported (SR) and/or prescription-derived (PD) antidepressant use

In the MDD-subgroup self-report MWAS, only cg08527546 exhibited a significant association with antidepressant exposure (β = 0.050, p = 3.57 × 108); no CpGs were significantly associated in the MDD-subgroup prescription-derived MWAS (Supplementary Table 2, Supplementary Fig. 4). For both phenotypes, there was a significant correlation between CpG effect estimates in the full and MDD-subgroup analyses (Rself-report = 0.57, pself-report < 2.2 × 1016, Rprescription = 0.43, pprescription < 2.2 × 1016) (Supplementary Fig. 5). Notably, restricting the analyses to MDD cases resulted in an average 2.5-fold and 2.1-fold increase in the self-report and prescription-derived effect sizes of the significant CpGs respectively (Fig. 2C).

In the sex-stratified analyses, two CpGs were significantly associated with self-report antidepressant exposure in females, cg26277237 (β = 0.030, p = 1.77 × 1010) and cg02183564 (β = 0.023, p = 4.29 × 109) (Supplementary Table 3) and there were no significant associations with antidepressant exposure in males (Supplementary Fig. 6). The effect sizes of CpGs in the male-only and female-only analyses were significantly correlated (R = 0.039, p < 2.2 × 1016) (Supplementary Fig. 7). Of the eight CpG sites significantly associated with antidepressant exposure in the overall analysis, all demonstrated a larger effect size in females (Supplementary Figs. 7-8). Four of these sites showed nominally significant sex differences (cg26277237; p = 0.0081, cg02183564; p = 0.0132, cg08907118; p = 0.0335, cg03222540; p = 0.0305) (Supplementary Data 1).

Differentially methylated regions

There were 719,506 candidate regions considered in the analysis. The self-report MWAS had one significant DMR (\(\beta\) = 0.096, padj = 4.98 × 103) (Supplementary Data 2), consisting of two CpGs (cg01964004 and cg15071067), which maps to deoxyguanosine kinase antisense RNA1 (DGUOK-AS1) (Supplementary Fig. 9). The prescription-derived MWAS identified no significant DMRs (Supplementary Data 3).

Functional Annotation

The most significant 100 CpGs from the self-report and prescription-derived MWAS were annotated to 77 and 83 genes respectively (Supplementary Data 4-7). There was a significant overlap between both the CpG-sets (Noverlap = 17, p = 1.95 × 1048, Supplementary Fig. 10) and the gene-sets (Noverlap = 16, p = 1.3 × 1025, Supplementary Fig. 11). The self-report gene-set was significantly enriched for the genes expressed in the amygdala (pFDR= 0.043,

Supplementary Data 8, Supplementary Fig. 12), whilst the prescription-derived gene-set had no significant enrichment (Supplementary Data 9, Supplementary Fig. 13). There was significant enrichment of the self-report gene-set in GO:0008021; “synaptic vesicle membrane” (pFDR = 0.030, Supplementary Figs. 14-16, Supplementary Tables 4-5, Supplementary Data 10-11). There was no significant enrichment for any GO:Biological Processes pathways tested for either gene set (Supplementary Figs. 17-18, Supplementary Data 12-13).

Enrichment analysis: Netherlands Study of Depression and Anxiety

We tested whether top findings from our self-reported MWAS on all participants were also more likely to be among the top findings in an independent MWAS of antidepressant exposure in the Netherlands Depression and Anxiety (NESDA) cohort33. Notably, all participants in this cohort had a recent (~6 months) MDD DSM-IV diagnosis, obtained using the Composite International Diagnostic Interview, including single-episode and recurrent MDD (Supplementary Methods). DNAm was assayed on whole-blood samples from 812 MDD patients, 398 of which reported using one or more antidepressants, using methyl-CG binding domain sequencing (MBD-Seq)34,35,36. Data quality control and the MWAS was performed using RaMWAS37 (Supplementary Methods). Enrichment tests were performed to assess the top findings from GS and NESDA MWAS. The enrichment analyses were performed using the ‘shiftR R package38 that performs circular permutations to account for having correlated methylation levels between CpG sites. For both MWAS’, CpGs were filtered to those which showed a concordant direction of effect and three thresholds (0.1, 0.5 and 1%) were used to define top (by p-value) findings. We corrected for this “multiple testing” by using the same thresholds in the permutations and selecting the most significant result from each permutation to generate the “empirical” null distribution. Results suggested a small (OR: 1.39) but significant (P < 0.042) enrichment between the top 1% of results from both MWAS’ (Supplementary Data 14).

Methylation differences by time in treatment

To investigate the relationship of DNAm at significantly associated CpGs (n = 8) with the length of antidepressant exposure, a two-tailed Spearman correlation test was performed between the DNAm levels and time in current treatment for those within a treatment period (N = 863). Two probes, cg15071067 (DGUOK-AS1) and cg26277237 (KANK1), showed a significant correlation between methylation and time in treatment (cg15071067:\(\rho\)= 0.085, p = 0.012, cg26277237: \(\rho\)= 0.087, p = 0.011) (Supplementary Figs. 19-21, Supplementary Table 6), with the same direction of effect found in the MWAS.

Methylation profile score

There were 212 CpGs identified by the LASSO regression model (Supplementary Figs. 22-24, Supplementary Data 15), used to calculate the MPS in external cohorts (Fig. 3A, Supplementary Figs. 25-34). All cohorts bar one (NTR) showed a positive relationship between antidepressant MPS and antidepressant exposure (\(\beta\)FTC = 0.156, \(\beta\)SHIP-Trend = 0.134, \(\beta\)STRADL = 0.149, \(\beta\)LBC1936 = 0.228, \(\beta\)FOR2107 = 0.349, \(\beta\)MARS = 0.263, \(\beta\)ALSPAC = 0.170, \(\beta\)ERISK = 0.342\(,\beta\)NTR = −0.031) (Supplementary Fig. 35, Supplementary Table 7). Nagelkerke’s pseudo R2 estimates ranged from 1.11 × 10−3 (NTR) to 0.03 (LBC1936) (Fig. 3B). The random-effects meta-analysis (Fig. 3C) found a significant association between antidepressant exposure and the MPS (pooled \(\beta \) [95%CI]: 0.196 [0.105, 0.288], p < 1 × 104), with low heterogeneity between studies (I2 [95%CI] = 0% [0, 64.8%]) (Supplementary Table 8).

Fig. 3: An antidepressant exposure methylation profile score (MPS) and antidepressant exposure in external cohorts.
figure 3

A The number of participants exposed and unexposed to antidepressants in each cohort (NNTR = 3087, NSTRADL = 658, NFTC = 1678, NSHIP-TREND = 495, NALSPAC = 801, NLBC1936 = 889, NMARS-UniDep = 312, NERISK = 1658, NFOR2107 = 658). B Nagelkerke’s pseudo R2, representing an estimate of how much variance in the antidepressant exposure outcome that is explained by the MPS in each cohort. C The effect estimates and 95% confidence intervals (effect estimate +/− 1.96*Standard Error) of MPS ~ antidepressant exposure association in each cohort, using either a generalised linear model (FOR2107 and ALSPAC), a generalised linear mixed model (SHIP-Trend, LBC1936, MARS-UniDep, STRADL and E-Risk) or a generalised estimation equation model (FTC and NTR). The square size = study weight in the random-effects meta-analysis. The pooled effect estimate interval, calculated from a random-effects meta-analysis, is represented by the blue diamond (Npooled=10,236). Created in BioRender. Davyson, E. (2024) https://BioRender.com/q70l792.

Discussion

This study presents a large investigation of antidepressant exposure and the methylome39. There was evidence of hypermethylation at eight individual CpGs and a singular region on Chromosome 2 (BP: 74196550-74196572) in those exposed to antidepressants using both self-report and prescription-derived measures32. Sex-stratified analyses indicated larger effect estimates in females compared to males. Functional annotation found that genes annotated to the top 100 differentially methylated CpGs in the self-report MWAS were significantly enriched in both a synaptic vesicle membrane gene-ontology and for genes expressed in the amygdala. Preliminary analysis indicated a significant correlation between the time in treatment and methylation at two probes (cg15071067; DGUOK-AS1 and cg26277237; KANK1). Furthermore, there was significant enrichment in the top 1% of findings from an independent MWAS using MBD-Seq profiling. Finally, an MPS trained on GS data, demonstrated a robust association with antidepressant exposure in a meta-analysis of eight external cohorts and a prospective wave of data from GS, indicating the generalisability of our findings.

The CpG with the highest significance and the largest effect size, cg26277237, mapped to KN motif and ankyrin repeat domains 1 (KANK1), and was previously reported by Barbu et al.27 on a smaller sample of GS. KANK1 facilitates the formation of the actin cytoskeleton and has an active role in neurite outgrowth and neurodevelopment40. A meta-analysis of copy-number variant association studies found a significant duplication in KANK1 in those with five different neurodevelopmental disorders, including MDD41. The DMR analysis indicated antidepressant exposure is also significantly associated with hypermethylation near DGUOK-AS1, a long non-coding RNA (lncRNA). DGUOK-AS1 has an inhibitory role on the expression of a nearby gene DGUOK42, which encodes a mitochondrial enzyme involved in the production of mitochondrial DNA42, and has previously been implicated as a risk gene in schizophrenia43 and Alzheimer disease44. A recent review reported evidence that antidepressants do influence mitochondrial function, although the effects are heterogeneous between different types of antidepressants, independent of their current classification45,46. Functional validation of the associations of antidepressant exposure with DNAm at KANK1 and DGUOK-AS1 would strengthen our findings. The integration of additional multi-omic data alongside in-vitro experiments could further assess the impact of these associations on biologically relevant processes, such as neuroplasticity.

Our results show broadly consistent findings between self-report and prescription-derived measures. However, self-report measures showed stronger signal in downstream functional annotation analyses. Due to the strong correlation between effect estimates and several overlapping significant signals, this is likely due to the increased sample size and power in the self-report cohort (+8580 individuals). The top CpGs in the self-report MWAS were significantly enriched for genes expressed in the amygdala, an important component of emotional brain circuits, specifically in regulating fear and stress responses47. Genomic studies of MDD have shown enrichment in neural synaptic pathways48 and brain regions in the meso-limbic system, including the prefrontal cortex, nucleus accumbens, hippocampus and the amygdala49. Several meta-analyses have found evidence of amygdala hyperreactivity in those with MDD50,51,52, while other studies have demonstrated the amygdala response to stress can be dampened through neuroplastic processes following antidepressant treatment53 or cognitive behavioural therapy54. Furthermore, a recent systematic review reported sex-specific differences in amygdala activity and grey matter volume in MDD16. Notably, our sex-stratified analyses found nominally significant sex differences in the DNAm-antidepressant exposure associations at four significant CpGs, with larger effects observed in females. Although there is no clear consensus regarding sex differences in antidepressant efficacy, reports have found that women generally respond better to selective serotonin reuptake inhibitors (SSRIs) than men19. The nominally significant sex-differences in DNAm associations with antidepressant exposure and the significant enrichment of genes in the amygdala observed in this study highlight the potential role of the amygdala in mediating sex-specific responses to antidepressants. Future studies could investigate sex-specific DNAm-profiles of antidepressant exposure and their functional impact on the amygdala using functional imaging data.

There are several strengths of this study. The comparison of self-report and prescription-derived measures is valuable to the research community. Self-reported measures are often cheaper and easier to obtain in large-scale cohort studies31. Equally, the methods used in this study to derive of medication exposure using prescription records could enable passive data collection, enabling more generalisable analyses on whole populations outside of biases which influence participation in biobank cohorts55. Furthermore, the MDD-subgroup analysis indicates that the hypermethylation associated with antidepressant use is not primarily driven by MDD indication. Additionally, the performance of the GS-trained MPS in discriminating antidepressant exposure across eight external datasets, alongside the significant enrichment of top findings with an independent MWAS, demonstrates that this may be a generalisable biomarker indicative of antidepressant exposure.

This study has various limitations. Firstly, both measures of antidepressant exposure do not discriminate between antidepressant drugs, classes, or dosages. However, we anticipate the opportunity to investigate more medication-specific effects on the methylome using prescription-linkage data as biobanks increase in size. Secondly, all the cohorts used primarily consist of European ancestry. It is paramount that this analysis is conducted in non-European ancestral groups to further verify our findings and disentangle any ancestry-specific effects56,57,58. Thirdly, our epidemiological analyses do not adjust for various other potential confounders, such as comorbidities and concomitant treatments. However, adjusting for all possible confounds such as these may bias findings due to collinearity and collider bias. Fourthly, by design, this epidemiological study cannot directly address causality between antidepressant exposure and DNAm. The integration of DNAm analysis into randomised controlled trials of antidepressants is important to establish the exact nature of the association and to inform potential new targets for antidepressant therapy. Finally, this study does not examine recently approved rapid-acting antidepressants, such as ketamine. Future research could build on this by exploring the associations between DNAm and rapid-acting antidepressants, while comparing these effects with those of slower-acting antidepressants discussed in this study.

This study indicates that antidepressant exposure is associated with hypermethylation at DGUOK-AS1 and KANK1, which have roles in mitochondrial metabolism and neurite outgrowth respectively. Future research should include more cohorts of non-European ancestry, alongside the incorporation of DNAm in randomised trials of antidepressants to establish causality. If replicated, targeting of these genes could inform the design of more effective and better tolerated treatments for depression.

Methods

Ethics declaration

All components of Generation Scotland: The Scottish Family Health Study (GS) received ethical approval from the NHS Tayside Committee on Medical Research Ethics (REC Reference Number: 05/S1401/89). Generation Scotland has also been granted Research Tissue Bank status by the East of Scotland Research Ethics Service (REC Reference Number: 20-ES-0021), providing generic ethical approval for a wide range of uses within medical research. All participants included in the current study provided informed consent for the use of their data for biomedical research. The research presented in this study complies with these ethical regulations. The study protocol for the Netherlands Study of Anxiety and Depression (NESDA) was approved centrally by the Ethical Review Board of the VU University Medical Centre and subsequently by local review boards of each participating centre (METC number 2003-183). After full verbal and written information about the study, written informed consent was obtained from all participants at the start of baseline assessment. Ethics approvals have been granted for multiple studies concerning the Finnish Twin Cohort (FTC) twins by the ethics committees of Helsinki University Central Hospital (113/E3/2001, 249/E5/2001, 346/E0/05, 270/13/03/01/2008, and 154/13/03/00/2011) with the last one on the transfer of biological samples to the THL Biobank in 2018 (HU51179912017). Participants in the FTC were given information on the study procedures and of freedom to participate or to decline at any point in both oral and written form. Informed consent was obtained upon the contact with the study subjects before new questionnaire information was collected, and when clinical investigations were undertaken with sampling of biological material. The Study of Health in Pomerania (SHIP) received ethical approval from the ethics Committee of the University Medicine Greifswald, Germany (BB 39/08). All participants provided written informed consent before any assessment and/or sampling took place. FOR2107 received ethical approval from the ethics committees of the Medical Faculties, University of Marburg (AZ: 07/14) and University of Münster (2014-422-b-S). Participants provided written consent before any assessment and/or sampling took place. The Netherlands Twin Register was approved by the Central Ethics Committee on Research Involving Human Subjects of the VU university Medical Centre, Amsterdam, an Institutional Review Board certified by the U.S Office of Human Research Protections (IRB number IRB00002991 under Federal-wide Assurance-FWA00017598; IRB/institute codes, NTR 03-180). Informed consent was obtained from all participants. The Munich Antidepressant Response (MARS) study was approved by the local Ethics Committee of the Ludwig Maximilians University, Munich, Germany (318/00; 244/01) and carried out in accordance with the latest version of the Declaration of Helsinki. All participants provided written consent after the study protocol and potential risks were explained. The UniPolar Depression (UniDep) study was approved by the Bavarian State Medical Association (BLAEK) (01217) and written informed consent was obtained from all subjects. The Lothian Birth Cohort 1936 (LBC1936) received ethical approval from the Multicentre Research Ethics Committee for Scotland (baseline, MREC/01/0/56), the Lothian Research Ethics Committee (age 70, LREC/2003/2/29), and the Scotland A Research Ethics Committee (ages 73, 76, 79, 07/MRE00/58). All participants provided written informed consent. Ethical approval for the Avon Longitudinal Study of Parents and Children (ALSPAC) was obtained from the ALSPAC Ethics and Law Committee and the Local Research Ethics Committees under proposal B3818. Consent for biological samples has been collected in accordance with the Human Tissue Act (2004). Each study phase of the Environmental risk (E-risk) Longitudinal Twin Study received ethical approval from the Joint South London and Maudsley and Institute of Psychiatry Research Ethics Committee (NRES 1997/122). Parents gave informed consent, and twins gave assent between 5 and 12 years and then informed consent at age 18. All components of the Stratifying Resilience and Depression Longitudinally (STRADL) received formal national ethical approval from the NHS Tayside committee on research ethics (reference 14/SS/0039).

Generation Scotland

Generation Scotland: The Scottish Family Health Study (GS) is a family-based cohort study (N ~ 24,000), investigating the genetic and environmental factors influencing health within Scotland (Supplementary Methods)59,60. Data collection including biological sampling occurred between February 2006 and March 2011.

Methylation data

DNAm was profiled from baseline blood samples using the Illumina MethylationEPIC array for 19,390 individuals. Methylation typing was performed in 4 distinct sets between 2017 and 2021. Sets 1, 2 and 4 included related individuals within and between each set while all individuals in set 3 were unrelated to each other and to individuals in set 1 (genetic relationship matrix (GRM) threshold <0.05). Following quality control (QC) (Supplementary Methods), the sample sizes were Set 1: 5087, Set 2: 459, Set 3: 4450 and Set 4: 8873 individuals. The sets were combined and dasen normalisation was performed across all individuals61. In total, 752,741 probes and 18,869 individuals passed QC. Beta-values were transformed to M-values using the ‘beta2M()’ function in the ‘lumi’ R package62, and standardised using the ‘std-probe’ flag in the OSCA software63.

Antidepressant exposure phenotypes

Prescription-derived antidepressant exposure was measured using antidepressant prescriptions from Public Health Scotland (Supplementary Methods), according to the British National Formulary (BNF) paragraph code ‘040303’, which largely corresponds to Anatomical Therapeutic Chemical (ATC) subclass ‘N06A’ (Supplementary Table 9) (Nprescriptions = 174,454, Npeople = 7544) (Supplementary Table 10, Supplementary Figs. 36-43). After removing ambiguous prescriptions (Nprescriptions = 5484, Npeople = 171) (Supplementary Methods, Supplementary Table 11), active treatment periods were defined by consecutive dispensing of antidepressant medications (Supplementary Methods, Supplementary Fig. 44-46). Those who had their blood-draw appointment \(\ge \!7\) days after treatment initiation or <7 days after the end of a treatment period were defined as exposed (Nexposed = 861) (Supplementary Fig. 47). Those with no antidepressant prescriptions on record were defined as unexposed (Nunexposed = 7090).

Self-reported antidepressant exposure was derived from questionnaires sent 1–2 weeks before venepuncture (Supplementary Methods, Supplementary Table 12, Supplementary Fig. 48). Those who did/did not self-report antidepressant use were defined as exposed and unexposed respectively (Nexposed = 1508, Nunexposed = 15,023). Out of 6473 individuals with both self-report and prescription-derived phenotypes, 6355 exhibited concordant classification of antidepressant exposure (Supplementary Fig. 49). The MDD-only phenotypes were derived by stratifying the samples to those with a lifetime MDD diagnosis, ascertained by the Structured Clinical Interview of the Diagnostic and Statistical Manual, version IV (SCID)64 (prescription-derived: Nexposed = 380, Nunexposed = 412, self-report: Nexposed = 766, Nunexposed = 1502) (Supplementary Methods, Supplementary Fig. 50).

Methylome-wide association study

The MWAS were performed using a Mixed-linear-model Omics-based Analysis (MOA) in the OSCA software63. To account for relatedness within GS, each phenotype was regressed on a GRM65 using the Best Linear Unbiased Prediction (BLUP) tool in GCTA software66 (‘reml-pred-rand’ flag). The residuals were entered into a MOA model, which included a methylation omics-relatedness matrix as a random effect and age, sex, AHRR probe (cg05575921) M-values to proxy for smoking status, and predicted monocyte and lymphocyte cell proportions as fixed effects. Statistical significance was assessed using the p-value threshold 9.42 × 10−8, as recommended for case-control MWAS analyses67. Effect sizes represent a per-1 standard-deviation increase in CpG methylation M-values. For any significant CpGs, we searched the EWAS catalog to assess their associations with other traits in the literature. For sex-stratified analyses, we divided our participants by self-reported sex (male/female) and used the same MOA model without sex as a covariate.

Differentially methylated regions (DMRs) were identified using the ‘dmrff’ R package68, which performs an inverse-variance-weighted meta-analysis of MWAS beta and standard-error estimates per region, adjusting for estimate uncertainty and the correlational structure between probes. Candidate DMRs are identified as sets ( >2) of CpGs <= 500 bp apart with nominal significance (P < 0.05) and consistent effect direction. DMRs achieving Bonferroni-corrected p-value < 0.05 were considered statistically significant.

Functional annotation

Gene-sets for both MWAS were collated by annotating the top 100 CpGs (by p-value) by the Infinium MethylationEPIC BeadChip database69. Hypergeometric tests, using ‘phyper()’, were used to assess the overlap of CpGs and gene-sets from both analyses. The background set consisted of CpGs and genes on or annotated to the EPIC array (Supplementary Data 16). The ‘GENE2FUNC’ analysis in functional mapping and annotation web-tool (FUMA) was used to assess enrichment of both gene-sets across 54 specific tissues in the Genotype-Tissue Expression (GTEx)70,71 Project. Both gene-sets were tested for enrichment in synapse-related GO terms using the SynGo web tool72 and for enrichment in GO: Biological Processes gene-sets (20 <ngenes <500) in the msigdbr database73, using the gsameth()’ function from ‘missMethyl’ R package74 (Supplementary Data 17).

Methylation profile score

A least absolute shrinkage and selection operator (LASSO) penalised regression model was applied using ‘cv.biglasso()’ from the ‘glmnet’ R package75 on the GS sample to generate weights for a MPS of antidepressant exposure. First, the self-report phenotype was regressed against the GRM (using BLUP) to account for relatedness, and then on age, sex, AHRR probe M-values as a proxy for smoking status, batch, and white blood cell (monocyte and lymphocyte) proportions. The extracted residuals were used as the dependent variable and the standardised CpG sites on both EPIC and 450 K Illumina arrays (N = 365,912) were included as independent variables. Ten-fold cross-validation was applied, and the mixing parameter was set to 1. The non-zero weighted CpGs identified in the LASSO model were used to calculate a weighted-sum MPS in external datasets (FTC, SHIP-Trend, FOR2107, NTR, LBC1936, ALSPAC, MARS-UniDep and E-Risk, Ntotal = 9578, Nexposed = 619) and a prospective sample of GS (STRADL, Ntotal = 658, Nexposed = 42) (Supplementary Methods). The association between antidepressant exposure and the MPS was assessed using; generalised linear mixed models, generalised linear models and generalised estimation equations, depending on the cohort’s population structure (i.e., twin studies vs unrelated participants) and DNAm pre-processing (Supplementary Methods). In-depth information about each cohort’s sample, DNAm pre-processing and associational model can be found in the supplementary information (Supplementary Methods, Supplementary Data 18-20). All models have antidepressant exposure as the outcome and include age at blood sampling, sex, batch (where applicable), white blood cell proportions/counts and M-values at the AHRR probe as covariates. A random-effects meta-analysis using a DerSimonian-Laird estimator was performed to assess the overall association between the MPS and antidepressant exposure, using the ‘meta’ R package76.

Statistics and reproducibility

No statistical method was used to predetermine the sample size in either the self-report or prescription-derived MWAS analysis. Sample size was determined by the availability of eligible individuals (with DNA methylation and phenotypic information available) in each cohort. For all the MWAS’, samples that failed quality control checks (Supplementary Methods) were excluded from the analysis. For the MDD-subgroup analyses, individuals who fulfilled criteria for bipolar disorder in the SCID assessment (Nprescription-derived = 18, Nself-report = 52) were discarded. For external cohorts which utilised inpatient and outpatient samples (FOR2107, MARS and UniDep) there were further exclusionary criteria. In FOR2107, individuals with a bipolar, schizophrenia or schizoaffective disorder diagnosis were excluded. In MARS, individuals were excluded if they displayed hypomanic symptoms, a diagnosis of alcohol dependence, a history of illicit drug use or having depressive symptoms secondary to another medical or neurological condition. In UniDep, individuals were excluded if they had manic or hypomanic episodes, mood incongruent psychotic symptoms, a lifetime diagnosis of intravenous drug abuse and depressive symptoms which are secondary to a substance abuse disorder or due to medical illness or medication. The study design did not involve randomization as this is an observational study utilizing data from population-based cohorts. The investigators were not blinded to the exposure or outcome variables as this was an observational study with no experimental allocation of treatments.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.