GWAS of MDD, rMDD, fMDD and mMDD in GS:SFHS were conducted using mixed linear model based association (MLMA) analysis33, implemented in GCTA (v1.25.)34. To account for population structure, two genomic relationship matrices (GRMs) were used, as this method allows the inclusion of closely and distantly related individuals in genetic analyses35. The first GRM included pairwise relationship coefficients for all individuals. The second GRM had off-diagonal elements < 0.05 set to 0. GRMs were created using the mixed linear model with candidate marker excluded (MLMe) approach, where GRMs are calculated excluding SNPs located on the chromosome under analysis33. No fixed effects covariates were fitted in this analysis as sex was being assessed as a stratifier, and the two GRMs adequately accounted for population stratification (tested using univariate LD Score Regression36). MLMA employs restricted maximum likelihood methods on the linear scale. As such, test statistics (betas and their corresponding standard errors) were transformed to Odds Ratios and their corresponding 95% Confidence Intervals on the liability scale using a Taylor transformation expansion series37,38. Further details of GWAS can be found in the Supplementary Methods.