Sample

Analyses were conducted using the UK Biobank, a resource containing rich phenotype and genotype data on ~ 500,000 individuals aged between 40 and 70 (Allen et al. 2014). To minimise confounding from population stratification, analyses were limited to white British individuals. We identified families and restricted heritability analyses to individuals with at least one family member in the UK Biobank, as well as phenotype data on neuroticism and/or years of education. Previous publications suggested a sample size of ~ 40,000 pairs of family members (parent-offspring, siblings, and couples) within the full dataset (Bycroft et al. 2018).

Genotyping

Genome-wide genetic data from the full release of the UK Biobank data were collected and processed according to the quality control pipeline (Bycroft et al. 2018). For primary GREML-KIN analyses, we used genotyped or imputed SNPs with minor allele frequency > 0.01 and imputation confidence (INFO) score > 0.4, indicating well imputed variants. Due to computing memory constraints, we used PLINK2 to prune down to 241,678 variants in approximate linkage equilibrium using an r2 threshold of 0.2 (Chang et al. 2015) before calculating genetic relatedness matrices.

Measures

Neuroticism was measured as a continuous trait, captured with 12 questionnaire items such as “Does your mood often go up and down?”, “Would you call yourself tense or ‘highly strung’?”. This trait was defined previously in the UK Biobank (Smith et al. 2013, 2016).

The years of education variable was defined according to ISCED categories, as in previous genomic studies in the UK Biobank and other samples (Hill et al. 2018; Lee et al. 2018). The six response categories were: none of the above (no qualifications) = 7 years of education; CSEs or equivalent = 10 years; O levels/GCSEs or equivalent = 10 years; A levels/AS levels or equivalent = 13 years; other professional qualification = 15 years; NVQ or HNC or equivalent = 19 years; college or university degree = 20 years of education. To test whether the number of response categories affected heritability estimates, as has been shown previously in the UK Biobank (Lee et al. 2018), we ran sensitivity analyses using a ‘coarsened’ years of education variable, plus a binary variable reflecting college completion (see Supplementary Fig. 1).

In all analyses the following covariates were included: age, sex, the first 40 ancestry principal components from the UK Biobank (Bycroft et al. 2018), genotyping batch, and assessment centre.

Analyses

Identification of family members

Sibling and parent–offspring pairs were identified using relatedness files (KING n.d.) received with the UK Biobank data. Relatedness between two individuals is summarised by a kinship coefficient, which is defined as the probability that a random allele from an individual is identical by descent (IBD) with an allele at the same locus from the other individual (i.e. identical and inherited from a common ancestor). For example, in parent–offspring duos, kinship is ~ 0.25, as it is the probability that a random allele in a child is from one specific parent (0.5 since humans are diploid) multiplied by the probability that the parental allele from that parent is passed to the child (0.5; independent to the first probability). To allow for normal variation in within-pair similarity, first-degree relatives are therefore defined as pairs that have a pairwise kinship coefficient of ≥ 0.177 and ≤ 0.354.

To distinguish parent–offspring pairs from sibling pairs, we plotted the proportion of SNPs with zero identity-by-state (IBS0) within the kinship bounds of 0.177–0.354 (Fig. 1). IBS describes the probability that alleles are the same regardless of common ancestry. When comparing two individuals, variants are termed IBS0 if neither allele is shared by the pair. Parent–offspring pairs have IBS0 = ~0 since they share one allele inherited by descent (IBD) in all positions on autosomes. In other words, an individual is unlikely to share zero variants with one of their parents, unless for example both copies come from the other parent (uniparental disomy), or unless there are genotyping errors meaning that shared variation is not called. In contrast, siblings have a higher pairwise IBS0.

Couples were identified as pairs of unrelated opposite-sex individuals matching exactly on a string of household variables: social deprivation (Townsend Deprivation Index), assessment centre, income, time at address, smoker in household, type of accommodation, relatives in household, number in household. This approach of matching on household variables was used in a recent study of assortative mating in the UK Biobank (Yengo et al. 2018). We note that there is potential for type 1 error: it is possible, especially in densely populated areas, that people could match on all eight variables by chance.

Kin-based SNP heritability method accounting for environmental similarity: GREML-KIN

GREML requires the calculation of genetic similarity for each pair of individuals across genotyped variants. This matrix of genomic similarity is compared to a matrix of pairwise phenotypic similarity using a random-effects mixed linear model, such that the variance of a trait can be decomposed into genetic and residual components, using maximum likelihood. Ordinarily, GREML is applied in samples of unrelated individuals and has a single common genetic variance component.

GREML-KIN is an extension of GREML that estimates the variance explained by multiple genetic and non-genetic sources. The method uses a linear mixed model to fit five matrices: G = common genotyped SNP effects; K = kin genetic effects; F = nuclear family (siblings, parent-offspring, and couples); S = siblings; C = couples. For the G matrix, we calculated genetic similarity for all possible pairs of individuals across all genotyped SNPs. As GREML-KIN allows for effects of the family environment, no relatedness cut-off was applied to the G matrix (unlike the standard GREML model applied only to unrelated individuals, where a cut-off of < 0.025 is typically used). The K matrix is a modified G matrix, containing only information on relatives (cut-off > 0.025), since values for unrelated pairs are set to 0. Family, sibling and couple (F, S and C) similarity matrices were created in the format required for GCTA. Elements in the genomic relatedness matrix were replaced by 0 if a pair did not have the specific relationship; and 1 if a pair do have the relationship, or for elements representing individuals’ relatedness to themselves.

Importantly, the variance components are not purely ‘genetic’ and ‘environmental’. The sibling and couple environment sharing matrices likely pick up variance due to other processes that inflate covariance between relatives, including dominance and assortative mating, respectively.

Assortative mating refers to greater similarity between partners than is expected by chance. This can result from multiple mechanisms, including direct choice based on phenotype, social homogamy, and convergence over time due to shared environments. Assortative mating amongst couples in the UK Biobank sample will be captured by fitting the couple similarity matrix (C). However, to the extent that phenotypic similarity among the parents of the UK Biobank participants reflects their genetic similarity, it is also likely that assortative mating in their parents will contribute to the additive genetic variance in our estimates (G + K). This is because assortative mating induces a positive correlation between trait-increasing alleles (‘gametic phase disequilbrium’), which elevates trait-specific genetic and phenotypic variance (Peyrot et al. 2016).

The genetic variance components are also likely to include some bias from the indirect effects of genetic variants shared with relatives. Genetic variants in the parents do not only have direct effects on offspring traits by being transmitted, but they also have indirect influences on offspring traits through the environment that they provide for their children. This can bias SNP-based heritability estimates (Young et al. 2018).

The residual component includes sources of variance that are not captured by the G, K, F, S or C matrices, particularly other environmental influences (idiosyncratic, individual-specific environments or perceptions that are not shared by family members) and error.

To identify the best-fitting model for each trait, we ran a model for every possible combination of variance components (31 models), and compared them with backwards stepwise likelihood ratio testing, starting with the full model and dropping non-significant parameters.

We compared GREML-KIN results against those from a standard GREML model in a subset of unrelated individuals from the family-based analyses. The standard GREML model uses a single genomic relatedness matrix with a cut-off to exclude one from each pair of related individuals (cut-off > 0.025). This approach therefore only detects population-level additive genetic effects tagged by common genotyped SNPs, plus potential confounding, for example from gene-environment correlation and population stratification. The residual component contains other sources of variance: gene–environment interaction, error, plus all of the environmental influence, rare variant effects that are not captured when using an unrelated population sample, and non-additive genetic effects.

GREML-LDMS-I to investigate the effects of less common variants

In our GREML-LDMS-I analyses, we started with whole genome data imputed from the HRC panel (93,095,623 autosomal variants; see Bycroft et al. 2018) We ran quality control to include variants across the allele frequency spectrum that were imputed with high confidence (INFO score > 0.80), and removed multiallelic variants. Three allele frequency bins were made, containing variants with minor allele frequency ranges of: 0.001–0.01, 0.01–0.1, 0.1–0.5, respectively. SNPs in each bin were split into high versus low linkage disequilibrium categories. We stratified by individual (rather than regional) SNP LD scores, since this has been shown to yield SNP heritability estimates that are more robust across different genetic architectures than estimates from other approaches (Evans et al. 2018). This led to six genome-wide genetic relatedness matrices, one for each allele frequency and LD bin (non-overlapping). All matrices included the same number of unrelated individuals (cut-off 0.025) with phenotype data and with at least one family connection as in standard GREML. The matrices were simultaneously fitted using a linear mixed model, and estimates were allowed to be negative. In supplementary analyses we explored whether the variance explained by the rarest alleles could be underestimated because their imputation quality was lower. Hence, we checked how many SNPs in each minor allele frequency bin were dropped when applying the INFO > 0.8 cutoff.

Sample independence

To ensure that our results were independent from the previous Generation Scotland study, we compared checksums for both samples to identify and remove overlapping participants. A checksum is the sum of nine numbers taken from binary genotype files. Checksums were obtained from Generation Scotland without accessing genotype data directly. We then ran checksums in the UK Biobank (after ensuring quality control of genomic data was the same), using a script from the Broad Institute, which is available online: https://personal.broadinstitute.org/sripke/share_links/checksums_download/outdated_readme/id_geno_checksum.v2.

We note that the number of relationships per individual in the UK Biobank is lower than in Generation Scotland. Their sample was selected to capture dense kinships, where many individuals have siblings, parents and spouses who are also study participants. This may result in lower power in the UK Biobank to detect influences of family similarity, especially if small in magnitude, and reduces power to separate confounding factors, as in biometric designs (McAdams et al. 2018).

Software

We used the following software in our analyses: identification of family members was performed using R; construction of genomic relationship matrices was done in GCTA; family, sibling and couple similarity matrices were made in bash; GREML analyses were conducted in GCTA. Scripts are available from the lead author on request. The UK Biobank is a public dataset available to all bona fide researchers (with funds to pay the access fee).