Cryptic relatedness and population structure were evaluated using a set of high quality markers pruned for linkage disequilibrium (LD). Genetic relatedness was estimated using PLINK v1.9116,117 to identify first and second-degree relatives (π^>0.2) and one individual was excluded from each related pair. Genetic outliers were identified for exclusion based on principal component analyses using EIGENSOFT35,118. This was done separately for each of the PGC cohorts and on a merged set of genotypes for the iPSYCH cohort (Supplementary Information). Across studies, a total of 20,183 cases and 35,191 controls remained for analysis after QC.