Abstract
Multiple sclerosis (MS) is a neuro-inflammatory and neurodegenerative disease that is most prevalent in Northern Europe. Although it is known that inherited risk for MS is located within or in close proximity to immune-related genes, it is unknown when, where and how this genetic risk originated1. Here, by using a large ancient genome dataset from the Mesolithic period to the Bronze Age2, along with new Medieval and post-Medieval genomes, we show that the genetic risk for MS rose among pastoralists from the Pontic steppe and was brought into Europe by the Yamnaya-related migration approximately 5,000 years ago. We further show that these MS-associated immunogenetic variants underwent positive selection both within the steppe population and later in Europe, probably driven by pathogenic challenges coinciding with changes in diet, lifestyle and population density. This study highlights the critical importance of the Neolithic period and Bronze Age as determinants of modern immune responses and their subsequent effect on the risk of developing MS in a changing environment.
Subject terms: Genetic variation, Autoimmunity, Evolutionary genetics, Genome evolution, Multiple sclerosis
Analysis of a large ancient genome dataset shows that genetic risk for multiple sclerosis rose in steppe pastoralists, providing insight into how genetic ancestry from the Neolithic and Bronze Age has shaped modern immune responses.
Main
MS is an autoimmune disease of the brain and spinal cord that currently affects more than 2.5 million people worldwide1. Its prevalence varies markedly with ethnicity and geographical location, with the highest prevalence observed in Europe (142.81 cases per 100,000 people); Northern Europeans are particularly susceptible to developing the disease3. The origins of and reasons for this geographical variation are poorly understood, yet such biases may hold important clues as to why the prevalence of autoimmune diseases, including MS, has continued to rise during the past 50 years.
Although still elusive, MS aetiology is thought to involve gene–gene and gene–environment interactions. Accumulating evidence suggests that exogenous triggers initiate a cascade of events involving a multitude of cells and immune pathways in genetically vulnerable individuals, which may ultimately lead to MS neuropathology1.
Genome-wide association studies (GWAS) have identified 233 commonly occurring genetic variants that are associated with MS; 32 variants are located in the human leukocyte antigen (HLA) region and 201 are located outside the HLA region4. The strongest MS associations are found in the HLA region, with the most prominent of these, HLA-DRB1*15:01, conferring an approximately threefold increase in the risk of MS in individuals carrying at least one copy of this allele. Collectively, genetic factors are estimated to explain approximately 30% of the overall disease risk, while environmental and lifestyle factors are considered the major contributors to MS. For instance, although infection with Epstein–Barr virus (EBV) frequently occurs in childhood and usually is symptomless, delayed infection into early adulthood, as typically observed in countries with high standards of hygiene, is associated with a 32-fold-increased risk of MS5,6. Lifestyle factors associated with increased MS risk, such as smoking, obesity during adolescence and nutrition or gut health, also vary geographically7. Autoimmunity could also result from altered pressure from other pathogens, creating a shift in the delicate balance of pro- and anti-inflammatory pathways8.
European genetic ancestry (henceforth ‘ancestry’) has been postulated to explain part of the global difference in MS prevalence in admixed populations9. Specifically, African American individuals with MS exhibit increased European ancestry in the HLA region compared with control individuals, with European haplotypes conferring more MS risk for most HLA alleles, including HLA-DRB1*15:01. Conversely, Asian American individuals with MS have decreased European ancestry in the HLA region compared with control individuals. Although ancient European ancestry and MS risk in Europe are known to be geographically structured (Fig. 1a,b), the effect of ancestry variation within Europe on MS prevalence is unknown.
Present-day ancestral variation can be modelled as a mixture of genetic ancestries derived from ancient populations, who can be distinguished by their subsistence lifestyle: western hunter-gatherers (WHG), eastern hunter-gatherers (EHG), Caucasus hunter-gatherers (CHG), farmers (Anatolian (ANA) + Neolithic) and steppe pastoralists (Fig. 1c,d). By using a large ancient genome dataset from the Mesolithic to the Bronze Age, presented in an accompanying study2, coupled with new Medieval and post-Medieval genomes, we quantified present-day European genetic ancestry with respect to these ancestral populations to identify signals of lifestyle-specific evolution. We then determined whether variants associated with an increased risk of MS have undergone positive selection. We asked when selection occurred and whether the targets of selection were specific to lifestyle. Finally, we examined the environmental conditions that may have caused selection for risk variants, including human subsistence practices and exposure to pathogens. An overview of the evidence provided by all methods used can be found in Extended Data Fig. 1.
To examine the ancestry patterns within modern genomes, we estimated ancestry at specific loci (‘local ancestry’) for ~410,000 self-identified ‘white British’ individuals in the UK Biobank10, using a reference panel of 318 ancient DNA samples (Fig. 1 and Extended Data Fig. 2; ref. 11) from the Mesolithic and Neolithic, including steppe pastoralists (Methods). Comparing the ancestry at each labelled single-nucleotide polymorphism (SNP; n = 549,323) to genome-wide ancestry in the UK Biobank provided an ‘anomaly score’. Two regions stood out as having the most extreme ancestry compositions (Fig. 2a): the LCT/MCM6 region on chromosome 2, which is well established as regulating lactase persistence11,12, and the HLA region on chromosome 6.
The HLA region is strongly associated with autoimmune diseases13, of which we examined MS and rheumatoid arthritis (RA), a common systemic inflammatory disease that characteristically affects the joints. Our dataset (comprising a large ancient genome dataset from the Mesolithic to the Bronze Age2 and 86 new Medieval and post-Medieval genomes from Denmark; Extended Data Fig. 2, Supplementary Note 1 and Supplementary Table 1) includes a total of 1,750 imputed diploid shotgun-sequenced ancient genomes (Supplementary Table 13), of which 1,509 are from Eurasia; together with modern data10, we achieved an almost complete transect from approximately 10,000 years ago to the present.
The frequencies of the alleles conferring the highest risk for MS (odds ratio (OR) > 1.5), all of which are within the HLA class II region, showed striking patterns in our ancient groups. In particular, the tag SNP (rs3135388[T]) for HLA-DRB1*15:01, which carries the highest risk for MS (OR = 2.9), was first observed in an Italian Neolithic individual (sample R3 from Grotta Continenza, dated with carbon-14 to between 5836 and 5723 bce (before common era), 4.05× coverage) and rapidly increased in frequency around the time of the emergence of the Yamnaya culture around 5,300 years ago in steppe and steppe-derived populations (Fig. 2). From risk allele frequencies of individuals in the UK Biobank born in, and having a ‘typical ancestral background’ for, a specific country11, we found that the frequency of HLA-DRB1*15:01 was highest in modern populations from Finland, Sweden and Iceland and in ancient populations with a high proportion of steppe ancestry (Fig. 2b, inset).
To investigate the risk for a particular genetic ancestry, we used the local ancestry dataset to calculate the risk ratio (Methods; weighted average prevalence, WAP) for each ancestry at all MS-associated fine-mapped loci present in the UK Biobank imputed dataset (n = 205/233; ref. 4 and Methods). For MS, steppe ancestry had the highest risk ratio at nearly all HLA SNPs, whereas farmer and outgroup ancestries were often the most protective (Fig. 3a), indicating that a steppe-derived haplotype at these positions confers MS risk.
Having shown that some ancestries carry higher risk at particular SNPs, we wanted to calculate an aggregate risk score for each ancestry. We used a statistic, the ancestral risk score (ARS; introduced in ref. 11), which is equivalent to a polygenic risk score (PRS) for a modern individual consisting entirely of one ancestry. ARS offers an improvement over calculating a PRS using ancient genotype calls directly, as it mitigates the effects of low ancient DNA sample numbers and bias14 while being robust to intervening drift and selection. We used effect size estimates from previous association studies, under an additive model, with confidence intervals obtained via an accelerated bootstrap15 (Supplementary Note 4). In the ARS for MS (Fig. 3b), steppe ancestry had the largest risk, followed by WHG, CHG and EHG ancestry; the farmer and outgroup ancestries had the lowest ARS. Therefore, steppe ancestry contributes the most risk for MS across all associated SNPs. We tested for a genome-wide association by resampling loci and found that steppe risk still clearly exceeded that for farmers (Fig. 3c). Although most of the signal was driven by SNPs in the HLA region, this pattern persisted even when we excluded these SNPs (Fig. 3b).
The fact that steppe ancestry confers risk at all but two MS-associated HLA SNPs (Fig. 3a) implies that these alleles have a common evolutionary history. We therefore investigated whether ancestry could be used for phenotype prediction. We conducted three types of association analysis in the UK Biobank for disease-associated SNPs, controlling for age, sex and the first 18 principal components. The first was a regular SNP-based association analysis, as in a genome-wide association study. The second tested for association with local ancestry probabilities instead of genotype values (Supplementary Note 3). The third was based on haplotype trend regression (HTR), which is used to detect interactions between SNPs16 by treating haplotypes as a set of features from which to predict a trait, instead of using SNPs as in a regular genome-wide association study. We developed a new method called HTR with extra flexibility (HTRX; Supplementary Note 5 and more details in ref. 17) that searches for haplotype patterns that include single SNPs and non-contiguous haplotypes. To evaluate the performance of our models and prevent overfitting, we assessed its ability to predict out-of-sample data, which measures how well the model can generalize to new data. We showed by simulation (Supplementary Fig. 11) that HTRX explains the same amount of variance as a regular genome-wide association study when interactions are absent and more variance as interaction strength increases.
Although our cohort of self-identified white British individuals is relatively underpowered with respect to MS (1,949 cases and 398,049 controls; prevalence of 0.487%), MS was associated with steppe and farmer ancestry (P < 1 × 10–10) in the HLA region (Supplementary Fig. 6). In three of four main linkage disequilibrium (LD) blocks within the HLA region (class I, two subregions of class II determined by LD blocks at 32.41–32.68 Mb and 33.04–33.08 Mb, and class III), local ancestry explained significantly more variation than genotypes (Fig. 4; measured by average out-of-sample McFadden’s R2 for logistic regression; Methods). While the increased performance of local ancestry in some regions compared with regular GWAS can be explained by tagging of SNPs outside the region, the increased performance of HTRX over GWAS quantifies the total effect of a haplotype, including rare SNPs and epistasis. Across the entire HLA region, haplotypes explained more out-of-sample variation than regular GWAS (at least 2.90%, compared to 2.48%). Interaction signals were also observed within the HLA class I region, within the HLA class II region, and between the HLA class I and class III regions.
We further tested whether co-occurring ancestries at each locus were associated with MS (see Methods and Supplementary Fig. 7) but found no evidence that risk was associated with any ancestry other than steppe ancestry.
Having established that steppe ancestry contributes most of the HLA-associated risk for MS, we investigated whether MS risk evolved under selection. We tested for evidence of directional selection across all associated SNPs, decomposed by ancestry, over time. This test used a ‘pathway-based chromosome painting’ technique (see Methods) based on inference of a sample’s nearest neighbours in the marginal trees of an ancestral recombination graph (ARG) that contains labelled individuals11. The resulting ancestral path labels, for haplotypes in both ancient and modern individuals, allowed us to infer allele frequency trajectories for risk-associated variants while controlling for changes in admixture proportions over time. The paths extend backwards from the present day to approximately 15,000 years ago and are labelled with the unique population through which a path travels (ANA, CHG, EHG or WHG). Because it uses distinct pathways, the approach does not use the labels of the relatively recent steppe admixture or outgroup populations, and the path labels are not representative of a continuous population but rather represent a path backwards in time that encompasses the corresponding population. For example, the CHG path originates in the CHG population, before merging with EHG to form the steppe population, and then merges with other ancestries in later European populations (Fig. 1).
In our ancestry path analysis, a substantial fraction of the fine-mapped MS-associated variants were not imputed in our ancient dataset, owing to quality-control filtering and the difficulty of accurately inferring HLA alleles in ancient samples18. To address this, we LD pruned genome-wide-significant summary statistics from the same study4, for which we could reliably assign ancestry path labels (n = 62; see Methods). This allowed us to test for polygenic selection across disease-associated variants using CLUES19 and PALM20.
For MS, we found evidence that disease risk was selectively increased, when considering all ancestries collectively (P = 1.02 × 10–5, polygenic selection gradient (ω) = 0.017), between 5,000 and 2,000 years ago (Fig. 5). Conditioning on each of the four long-term ancestral paths (CHG, EHG, WHG and ANA), we found a statistically significant signal of selection in the WHG (P = 7.22 × 10–5, ω = 0.021), EHG (P = 2.60 × 10–3, ω = 0.016) and CHG (P = 3.06 × 10–2, ω = 0.009) paths but not in the ANA path (P = 0.64, ω = 0.004). Again, it is likely that selection occurred in the pastoralist population of the steppe, as that population consisted of approximately equal proportions of EHG and CHG ancestry21 (Fig. 1). The SNP driving the largest change in genetic risk over time in the pan-ancestry analysis was rs3129934 (P = 1.31 × 10–11, selection coefficient (s) = 0.018), which tags the HLA-DRB1*15:01 haplotype22. We also tested three other SNPs that tag the HLA-DRB1*15:01 haplotype (rs3129889, rs3135388 and rs3135391) for evidence of selection and found that the ancestry-stratified signal was consistently strongest in CHG (Fig. 5b).
To further examine the nature of selection, we developed a new summary statistic: linkage disequilibrium of ancestry (LDA). LDA is the correlation between local ancestries at two SNPs, measuring whether recombination events between ancestries have occurred at a high frequency compared with recombination events within ancestries. We subsequently defined the ‘LDA score’ of a SNP as the total LDA of the SNP with the rest of the genome. A high LDA score indicates that the haplotype inherited from the reference population is longer than expected, whereas a low score indicates that the haplotype is shorter than expected (that is, underwent more recombination). For example, the LCT/MCM6 region exhibited a high LDA score (Extended Data Fig. 3), as expected from a relatively recent selective sweep23.The HLA region had significantly lower LDA scores than the rest of chromosome 6 (Extended Data Fig. 3). Through simulations, we showed that this signal must have been driven by selection favouring haplotypes of mixed ancestry over single-ancestry haplotypes (Supplementary Figs. 46–48 and Methods). Extending multi-SNP selection models24, our explanation is that at least two separate loci arose selectively in separate populations that later admixed and remained selected in the HLA region, justifying a new term, ‘recombinant-favouring selection’. This means that there was selection for diverse ancestry in the HLA region, driven by recombination. Unlike other measures of balancing selection such as FST, LDA describes excess ancestry LD from specific, dated populations and therefore is an independent signal. For the HLA class II region, the selection measures all lined up (LDA score, FST and π; Extended Data Fig. 4), but for the HLA class I region the LDA score had an additional non-diverse minimum at 30.8 Mb, implying that here the genome is ancestrally diverse but genetically strongly constrained. The LDA score is thus informative about the type of selection being detected and whether it has been subject to change.
Because MS would not have conferred a fitness advantage on ancient individuals, it is likely that this selection was driven by traits with shared genetic architecture, of which increased risk for MS in the present is a pleiotropic by-product. We therefore looked at LD-pruned MS-associated SNPs that showed statistically significant evidence for selection using CLUES (n = 32) in one or more ancestries and which also had a genome-wide-significant trait association (P < 5 × 10–8) for any of the 4,359 traits from the UK Biobank (ref. 10; UK Biobank Neale laboratory, round 2; http://www.nealelab.is/uk-biobank/) and any of the 2,202 traits in the FinnGen study25. We observed that all selected SNPs were also associated with multiple other traits (Supplementary Figs. 19–27). To determine whether the observed signal of polygenic selection favouring MS risk could be better explained by selection acting on a genetically correlated trait, we performed a systematic analysis of traits in UK Biobank and FinnGen with at least 20% overlap among the MS-associated selected SNPs (n = 115 traits). Using a joint test in PALM specifically designed for disentangling polygenic selection on correlated traits, we found no UK Biobank or FinnGen traits for which the selection signal favouring MS risk was significantly attenuated by selection acting on a genetically correlated trait, when accounting for the number of tests (Supplementary Note 6). This demonstrates that the selection signal for MS could not be explained by selection acting on any genetically correlated trait that we tested.
Because both the UK Biobank and FinnGen are underpowered with respect to many traits and diseases, we also undertook a manual literature search (Methods) for all LD-pruned MS-associated SNPs that showed statistically significant evidence for selection using CLUES (n = 32, of which 25 (78%) are in the HLA region). We found that most of the alleles under positive selection were associated with protective effects against specific pathogens and/or infectious diseases (disease or pathogen associated/total selected in ancestry path: pan-ancestry, 11/14; ANA, 8/9; CHG, 6/9; EHG, 6/7; WHG, 17/18; Supplementary Note 8, Supplementary Table 11 and Extended Data Fig. 5), although we note that GWAS data are not available for many infectious diseases. We observed that the selected alleles had protective associations with several chronic viruses (EBV, varicella-zoster virus, herpes simplex virus and cytomegalovirus) and with viruses or diseases not associated with transmission in small hunter-gatherer groups (for example, mumps and influenza). Moreover, many selected alleles conferred a reduction of risk for parasites, for skin and subcutaneous tissue, gastrointestinal, respiratory, urinary tract and sexually transmitted infections, or for pathogens associated with these or other infections (for example, Clostridioides difficile, Streptococcus pyogenes, Mycobacterium tuberculosis and coronavirus) (Supplementary Note 8, Supplementary Table 11 and Extended Data Fig. 5). We emphasize that, although this evidence is strongly suggestive, many of these putative associations may not be statistically robust owing to underpowered GWAS and the bias in candidate gene studies.
We compared these findings for MS with results for RA, which in contrast to MS is a systemic inflammatory disease, although it is mostly known for its characteristic joint lesions13. Our findings for RA show a strikingly different ancestry risk profile. HLA-DRB1*04:01 is the largest genetic risk factor for RA; in CLUES analysis, the tag SNP for this allele (rs660895) showed evidence of continuous negative selection until approximately 3,000 years ago (P = 7.95 × 10–7; Extended Data Fig. 6). We found that WHG and EHG ancestries often conferred the most risk at SNPs associated with RA (relative risk ratio of RA-associated SNPs based on WAP; see Methods), and these ancestries contributed the greatest risk for RA in aggregate, as reflected by a higher ARS for these ancestries (Supplementary Note 4), while the steppe and outgroup ancestries had the lowest scores (Extended Data Fig. 7). These results were recapitulated in a local ancestry GWAS (Supplementary Note 3).
We found that RA-associated SNPs have undergone negative polygenic selection (P = 3.26 × 10–3; Extended Data Fig. 6) over the last approximately 15,000 years. When decomposing by ancestry path, we found that all paths exhibited a negative selection gradient; none achieved nominal significance, although the CHG path came close (P = 6.33 × 10–2, ω = −0.014).
These results demonstrate that genetic risk for RA was higher in the distant past, in contrast to MS, with RA-associated risk variants present at higher frequencies in European hunter-gatherer populations before the arrival of agriculture. To understand what might underlie the higher genetic risk in hunter-gatherer populations and subsequent negative selection, we again undertook a manual literature search for pleiotropic effects of LD-pruned SNPs that showed statistically significant evidence of selection (n = 55, of which 36 (65%) were in the HLA region). We found that the majority of selected SNPs were associated with protection against distinct pathogens and/or infectious diseases across all paths (disease or pathogen associated/total selected in ancestry path: pan-ancestry, 16/20; ANA, 12/16; CHG, 8/13; EHG, 14/20; WHG, 16/21). We found that selected RA risk alleles were typically linked to the same pathogens or diseases as in the MS analysis, although some SNPs were protective against pathogens or diseases not observed in the MS risk analysis (for example, Entamoeba histolytica, measles, viral hepatitis, arthropod-borne viral fevers and viral haemorrhagic fevers, and pneumococcal pneumonia; Supplementary Note 8, Supplementary Table 12 and Extended Data Fig. 5).
Discussion
The last 10,000 years have seen some of the most extreme global changes in lifestyle, with the emergence of farming in some regions and pastoralism in others. While 5,000 years ago farmer ancestry predominated across Europe, a relatively diverged genetic ancestry arrived with the steppe migrations around this time26,27. We have shown that this genetic ancestry contributes the most genetic risk for MS today and that these variants were the result of positive selection coinciding with the emergence of a pastoralist lifestyle on the Pontic-Caspian steppe and continued selection in the subsequent admixed populations in Europe. These results address the long-standing debate around the north–south gradient in MS prevalence in Europe and indicate that the steppe ancestry gradient in modern populations—specifically in the HLA region—across the continent may cause this phenomenon, in combination with environmental factors. Furthermore, although epistasis between MS-associated variants in the HLA region has been demonstrated before28–31, we have shown that accounting for this explains more variance than independent SNP effects alone. Many of the haplotypes carrying these risk alleles have ancestry-specific origins, which could be exploited for individual risk prediction and may offer a pathway from genetic ancestry associations to a mechanistic understanding of MS risk. We have compared these findings with results for RA, another HLA class II-associated chronic inflammatory disease, and found that the genetic risk for RA exhibits a contrasting pattern; for RA, genetic risk was highest in Mesolithic hunter–gatherer ancestry and has decreased over time.
Our interpretation of this history is that co-evolution between a range of pathogens and their human hosts may have resulted in massive and divergent genetic ancestry-specific selection on immune response genes according to lifestyle and environment followed by recombinant-favouring selection after these populations merged. Similar examples of pathogen-driven evolution have recently been published32,33. The late Neolithic and Bronze Age were a time of massively increased prevalence of infectious diseases in human populations, owing to increased population density as well as contact with, and consumption of, domesticated animals and their products. The most recent common ancestor of many disease-associated pathogens existed in this period34–42; although these diseases are common today, it is difficult to infer their geographical ranges in the past, which may have been more limited43. We have shown that many of the MS- and RA-associated variants under selection confer some resistance to a range of infectious diseases and pathogens (Supplementary Note 8; for example, HLA-DRB1*15:01 is associated with protection against tuberculosis44 and increased risk for lepromatous leprosy45). We were, however, underpowered to detect specific associations beyond this hypothesis owing to poor knowledge of the distribution and diversity of past diseases, poor preservation of endogenous pathogens in the archaeological record and a lack of well-powered GWAS for many infectious diseases, partly owing to widespread vaccination programmes. Together, these findings indicate that population dispersals, changing lifestyles and increased population density may have resulted in high and sustained transmission of both new and old pathogens, driving selection of variants in immune response genes, which are now associated with autoimmune diseases.
A pattern that repeatedly appears is that of lifestyle change driving changes in risk and phenotypic outcomes. Our data indicate that, in the past, environmental changes driven by lifestyle innovation may have inadvertently driven an increase in genetic risk for MS. Today, with increasing prevalence of MS cases observed over the last five decades46,47, we again observe a striking correlation with changes in our environment, including lifestyle choices and improved hygiene, which no longer favours the previous genetic architecture. Instead, the fine balance of genetically driven cell functions within the immune system, which are needed to combat a broad repertoire of pathogens and parasites without harming self-tissue, has been met with new challenges, including a potential absence of requirement. For example, while a population of immune cells, CD4+ T helper type 1 (TH1) cells, direct strong cellular immune responses against intracellular pathogens, T helper type 2 (TH2) cells mediate humoral immune responses against extracellular bacteria and parasites and aid tissue homeostasis and repair. We have shown that the majority of selected MS-associated SNPs are associated with protection against a wide range of infectious challenges, in line with selection for strong but balanced TH1/TH2 immunity in the Bronze Age. The skewed TH1/TH2 balance observed in MS may partly result from the developed world’s increased sanitation, which has led to a substantially reduced burden of parasites, which the immune system had evolved to efficiently combat48.
Similarly, the new pathogenic challenges associated with agriculture, animal domestication, pastoralism and higher population densities might have substantially increased the risk of triggering a systemic RA-associated inflammatory state in genetically predisposed individuals. This could have led to an increased risk of a serious outcome following subsequent infections49, years before any potential joint lesions50, resulting in negative selection and might thus represent a parallel between RA-associated inflammation in the Bronze Age and MS today, in which lifestyle changes have exposed previously favourable genetic variants as risks for autoimmune disease.
More broadly, it is clear that the late Neolithic and Bronze Age were a critical period in human history during which highly genetically and culturally divergent populations evolved and mixed2. These separate histories probably dictate the genetic risk and prevalence of several autoimmune diseases today. Unexpectedly, the emergence of the pastoralist steppe lifestyle may have had an impact on immune responses as great as or greater than that of the emergence of farming during the Neolithic transition, which is commonly held to be the greatest lifestyle change in human history.
Methods
Data generation
Overview
To examine variants associated with phenotypes backwards in time, we assembled a large ancient DNA dataset. Here we present new genomic data from 86 ancient individuals from Medieval and post-Medieval periods from Denmark (Extended Data Fig. 2, Supplementary Note 1 and Supplementary Table 1). The samples range in age from around the eleventh to the eighteenth century. We extracted ancient DNA from tooth cementum or petrous bone and shotgun sequenced the 86 genomes to a depth of genomic coverage ranging from 0.02× to 1.6× (mean of 0.39× and median of 0.27×). The genomes of the 86 new individuals were imputed using 1000 Genomes phased data as a reference panel by an imputation method designed for low-coverage genomes (GLIMPSE)51, and we also imputed 1,664 ancient genomes presented in the accompanying study2. Depending on the specific data quality requirements for the downstream analyses, we filtered out samples with poor coverage and variant sites with low minor allele frequency (MAF) and low imputation quality (average genotype probability of <0.98). Our dataset of ancient individuals spans approximately 15,000 years across Eurasia (Extended Data Fig. 2).
Authorizations for excavating the three sites, Kirkegård, Holbæk and Tjærby, were granted, respectively, to the Aalborg Historiske Museum, the Museum Vestsjælland (previously Museet for Holbæk og Omeg) and the Kulturhistorisk Museum Randers. The current study of samples from these three sites is covered by agreements given to GeoGenetics, Globe Institute, University of Copenhagen, by the Aalborg Historiske Museum, the Museum Vestsjælland and the Kulturhistorisk Museum Randers, respectively.
Ancient DNA extraction and library preparation
Laboratory work was conducted in the dedicated ancient DNA clean-room facilities at the Lundbeck Foundation GeoGenetics Centre (Globe Institute, University of Copenhagen). A total of 86 Medieval and post-Medieval human samples from Denmark (Supplementary Table 2) were processed using semi-automated procedures. Samples were processed in parallel. For each extract, non-USER-treated and USER-treated (NEB) libraries were built52. All libraries were sequenced on the NovaSeq 6000 instrument at the GeoGenetics Sequencing Core, Copenhagen, using S4 200-cycle kits v1.5. A more detailed description of DNA extraction and library preparation can be found in Supplementary Note 1.
Basic bioinformatics
The sequencing data were demultiplexed using the Illumina software BCL Convert (https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html). Adaptor sequences were trimmed and overlapping reads were collapsed using AdapterRemoval (v2.2.4)53. Single-end collapsed reads of at least 30 bp and paired-end reads were mapped to human reference genome build 37 using BWA (v0.7.17)54 with seeding disabled to allow for higher sensitivity. Paired- and single-end reads for each library and lane were merged, and duplicates were marked using Picard MarkDuplicates (v2.18.26; http://picard.sourceforge.net) with a pixel distance of 12,000. Read depth and coverage were determined using samtools (v1.10)55 with all sites used in the calculation (-a). Data were then merged to the sample level and duplicates were marked again.
DNA authentication
To determine the authenticity of the ancient reads, post-mortem DNA damage patterns were quantified using mapDamage2.0 (ref. 56). Next, two different methods were used to estimate the levels of contamination. First, we applied ContamMix to quantify the fraction of exogenous reads in the mitochondrial reads by comparing the mitochondrial DNA consensus genome to possible contaminant genomes57. The consensus was constructed using an in-house Perl script that used sites with at least 5× coverage, and bases were only called if observed in at least 70% of reads covering the site. Additionally, we applied ANGSD (v0.931)58 to estimate nuclear contamination by quantifying heterozygosity on the X chromosome in males. Both contamination estimates used only filtered reads with a base quality of ≥20 and mapping quality of ≥30.
Imputation
We combined the 86 newly sequenced Medieval and post-Medieval Danish individuals with 1,664 previously published ancient genomes2. We then excluded individuals showing contamination (more than 5%), low autosomal coverage (less than 0.1×) or low genome-wide average imputation genotype probability (less than 0.98), and we chose the higher-quality sample in a close relative pair (first- or second-degree relatives). A total of 1,557 individuals passed all filters and were used in downstream analyses. We restricted the analysis to SNPs with an imputation INFO score of ≥0.5 and MAF of ≥0.05.
Kinship analysis and uniparental haplogroup inference
READ59 was used to detect the degree of relatedness for pairs of individuals.
The mitochondrial DNA haplogroups of the Medieval and post-Medieval individuals were assigned using HaploGrep2 (ref. 60; Supplementary Fig. 3). Y-chromosome haplogroup assignment was inferred following an already published workflow61 (Supplementary Fig. 5). More details can be found in Supplementary Note 2.
Standard population genetics analyses
The main population genetics approach on which we based our inference was population-based painting (detailed below). However, to robustly understand population structure, we applied other standard techniques. First, we used principal-component analysis (PCA) (Extended Data Fig. 2) to investigate the overall population structure of the dataset. We used PLINK62, excluding SNPs with MAF < 0.05 in the imputed panel. On the basis of 1,210 ancient western Eurasian imputed genomes, the Medieval and post-Medieval samples clustered close to each other, displaying a relatively low genetic variability and situated within the genetic variability observed in the post-Bronze Age western Eurasian populations.
We then used two additional standard methods to estimate ancestry components in our ancient samples. First, we used model-based clustering (ADMIXTURE)63 (Supplementary Note 1 and Supplementary Fig. 1) on a subset of 826,248 SNPs. Second, we used qpAdm64 (Supplementary Note 1, Supplementary Fig. 2 and Supplementary Table 15) with a reference panel of three genetic ancestries (WHG, ANA and steppe) on the same 826,248 SNPs. We performed qpAdm applying the option ‘allsnps: YES’ and a set of seven outgroups was used as ‘right populations’: Siberia_UpperPaleolithic_UstIshim, Siberia_UpperPaleolithic_Yana, Russia_UpperPaleolithic_Sunghir, Switzerland_Mesolithic, Iran_Neolithic, Siberia_Neolithic and USA_Beringia. We set a minimum threshold of 100,000 SNPs, and only results with P < 0.05 were considered.
Population painting
Our main analysis used chromosome painting65 with a panel of six ancient ancestries. This allows fine-scale estimation of ancestry as a function of these populations. We ran chromosome painting on all ancient individuals not in the reference panel, using a reference panel of ancient donors grouped into populations to represent specific ancestries: WHG, EHG, CHG, farmer (ANA + Neolithic), steppe and African (method described in ref. 11). Painting followed the pipeline of ref. 66 based on GLOBETROTTER67, with admixture proportions estimated using NNLS. NNLS explains the genome-wide haplotype matches of an individual as a mixture of genome-wide haplotype matches of the reference populations. This set-up allows both the reference panel and any additional samples to be described using these six ancestries (Fig. 1).
We then painted individuals born in Denmark of a typical ancestry (typical on the basis of density-based clustering of the first 18 principal components11). The reference panel used for chromosome painting was designed to capture the various components of European ancestry only, and so we urge caution in interpreting these results for non-European samples.
This dataset provides the opportunity to study the population history of Denmark from the Mesolithic to the post-Medieval period, covering around 10,000 years, which can be considered a typical Northern European population. Our results clearly demonstrate the impact of previously described demographic events, including the influx of Neolithic farmer ancestry ~9,000 years ago and steppe ancestry ~5,000 years ago26,27. We highlight genetic continuity from the Bronze Age to the post-Medieval period (Supplementary Note 1 and Supplementary Fig. 1), although qpAdm detected a small increase in the farmer component during the Viking Age (Supplementary Note 1, Supplementary Fig. 2 and Supplementary Table 15), while the Medieval period marked a time of increased genetic diversity, probably reflecting increased mobility across Europe. This genetic continuity is further confirmed by the haplogroups identified in the uniparental genetic markers (Supplementary Note 2). Together, these results indicate that after the steppe migration in the Bronze Age there may have been no other major gene flow into Denmark from populations with significantly different Neolithic and Bronze Age ancestry compositions and therefore no changes in these ancestry components in the Danish population.
Local ancestry from population painting
Chromosome painting provides an estimate of the probability that an individual from each reference population is the closest match to the target individual at every position in the genome. This provided our first estimate of local ancestry from ref. 2: the population of the first reference individual to coalesce with the target individual, as estimated by Chromopainter65. This was estimated for all white British individuals in the UK Biobank, using the population painting reference panel described above. We refer to this as ‘local ancestry’, although we note that the closest relative in the sample may not represent ancestry in the conventional sense.
Pathway painting
An alternative approach is to identify to which of the four major ancestry pathways (ANA farmer, CHG, EHG and WHG) each position in the genome best matches. This has the advantage of not forcing haplotypes to choose between ‘steppe’ ancestry and its ancestors but the disadvantage of being more complex to interpret. To do this, we modelled ancestry path labels in the GBR, FIN and TSI 1000 Genomes populations68 and 1,015 ancient genomes generated using a neural network to assign ancestry paths on the basis of a sample’s nearest neighbours at the first five informative nodes of a marginal tree sequence, with an informative node defined as a node that had at least one leaf from the reference set of ancient samples described above (ref. 11; Supplementary Note 1c). We refer to these as ‘ancestry path labels’.
SNP associations
We aimed to generate SNP associations from previous studies for each phenotype in a consistent approach. To generate a list of SNPs associated with MS and RA, we used two approaches: in the first, we downloaded fine-mapped SNPs from previous association studies. For each fine-mapped SNP, if the SNP did not have an ancestry path label, we found the SNP with the highest LD that did, with a minimum threshold of r2 ≥ 0.7, in the GBR, FIN and TSI 1000 Genomes populations using LDLinkR69. The final SNPs used for each phenotype can be found in Supplementary Table 4 (MS) and Supplementary Table 5 (RA).
For MS, we used data from ref. 4. For non-MHC SNPs, we used the ‘discovery’ SNPs with P(joined) and OR(joined) generated in the replication phase. For MHC variants, we searched the literature for the reported HLA alleles and amino acid polymorphisms (Supplementary Table 3). In total, we generated 205 SNPs that were either fine-mapped or in high LD with a fine-mapped SNP (15 MHC, 190 non-MHC).
For RA, we downloaded 57 genome-wide-significant non-MHC SNPs for seropositive RA in Europeans70. We retrieved MHC associations separately (ref. 71; with associated ORs and P values from ref. 72). In total, we generated 51 SNPs that were either fine-mapped or in high LD with a fine-mapped SNP (3 MHC, 48 non-MHC).
Second, because we could not always find LD proxies for fine-mapped SNPs that were present in our ancestry path label dataset, we found that we were losing significant signal from the HLA region; therefore, we generated a second set of SNP associations. We downloaded full summary statistics for each disease (using ref. 4 for MS and ref. 73 for RA), restricted to sites present in the ancestry path label dataset, and ran PLINK’s (v1.90b4.4)74 clump method (parameters: --clump-p1 5e-8 --clump-r2 0.05 --clump-kb 250; as in ref. 75) using LD in the GBR, FIN and TSI 1000 Genomes populations68 to extract genome-wide-significant independent SNPs.
In the main text, we report results for the first set of SNPs (‘fine-mapped’) for analyses involving local ancestry in modern data and the second set of SNPs (‘pruned’) for analyses involving polygenic measures of selection (CLUES and PALM).
Anomaly score: regions of unusual ancestry
To assess which regions of ancestry were unusual, we converted the ancestry estimates to Z scores by standardizing to the genome-wide mean and standard deviation. Specifically, let A(i,j,k) denote the probability of the kth ancestry (k = 1, ..., K) at the jth SNP (j = 1, ..., J) of a chromosome for the ith individual (i = 1, ..., N). We first computed the mean painting for each SNP, . From this, we estimated a location parameter µk and a scale parameter σk using a block-median approach. Specifically, we partitioned the genome into 0.5-Mb regions and, within each, computed the mean and standard deviation of the ancestry. The parameter estimates were the median values over the whole genome. We then computed an anomaly score for each SNP for each ancestry Z(j,k) = (A(j,k) – µk)/σk. This is the normal-distribution approximation to the Poisson binomial score for excess ancestry, for which a detailed simulation study is presented in ref. 76.
To arrive at an anomaly score for each SNP aggregated over all ancestries, we also had to account for correlations in the ancestry paintings. Instead of scaling each ancestry deviation A*(j,k) = A(j,k) – µk by its standard deviation, we instead ‘whitened’ them, that is, rotated the data to have an independent signal. Let C = A*TA* be a K × K covariance matrix, and let C–1 = UDVT be a singular value decomposition. Then, is the whitening matrix from which Z = A*W is normally distributed with covariance matrix diag(1) under the null hypothesis that A* is normally distributed with mean 0 and unknown covariance Σ. The ancestry anomaly score test statistic for each SNP is , which is chi-squared distributed with K degrees of freedom under the null, and we report P values from this.
To test for gene enrichment, we formed a list of all SNPs reaching genome-wide significance (P < 5 × 10–8) and, using the R package gprofiler2 (ref. 77), converted these to a list of unique genes. We then used gost to perform an enrichment test for each Gene Ontology (GO) term, for which we used default P-value correction via the g:Profiler SCS method. This is an empirical correction based on performing random lookups of the same number of genes under the null, to control the error rate and ensure that 95% of reported categories (at P = 0.05) are correct.
Allele frequency over time
To investigate how effect allele frequencies have changed over time, we extracted high-effect alleles for each phenotype from the ancient data. We excluded all non-Eurasian samples, grouped them by ‘groupLabel’, excluded any group with fewer than four samples and coloured points by ancestry proportion according to genome-wide NNLS based on chromosome painting (described above).
Weighted average prevalence
To understand whether risk-conferring haplotypes evolved in the steppe population or in a pre- or post-dating population, we developed a statistic that could account for the origin of risk to be identified with multiple ancestry groups, which do not have to be the same set for each SNP.
We first applied k-means clustering to the dosage of each ancestry for each associated SNP and investigated the dosage distribution of clusters with significantly higher MS prevalence. For the target SNPs, the elbow method78 suggested selecting around 5–7 clusters, and we chose 6 clusters. After performing the k-means cluster analysis, we calculated the average probability for each ancestry for case individuals. Furthermore, we calculated the prevalence of MS in each cluster and performed a one-sample t test to investigate whether it differed from the overall MS prevalence (0.487%). This tested whether any particular combinations of ancestry were associated with the phenotype at a SNP. Clusters with high MS risk ratios had a high proportion of steppe components (Supplementary Fig. 7), leading to the conclusion that steppe ancestry alone is driving this signal.
We can then compute the WAP, which summarizes these results into the ancestries. For the jth SNP, let denote the sum of the kth ancestry probabilities of all the individuals in the mth cluster (k,m = 1, ..., 6), where njm is the cluster size of the mth cluster. Letting πjm denote the prevalence of MS in the mth cluster, the WAP for the kth ancestry is defined as
where Pjkm is defined as the weight for each cluster.
The standard deviation of is computed as s.d. , where , and s(yjm) is the standard deviation of the outcome for the individuals in the mth cluster. We also tested the hypothesis against and computed the P value as .
For each ancestry, WAP measures the association of that ancestry with MS risk across all clusters. To make a clear comparison, we calculated the risk ratio (compared to the overall MS prevalence) for each ancestry at each SNP and assigned a mean and confidence interval for the risk ratio of each ancestry on each chromosome (Fig. 3 and Extended Data Fig. 7).
PCA and UMAP of WAP and average dosage
To sort risk-associated SNPs into ancestry patterns according to that risk, we performed PCA on the average ancestry probability and WAP at each MS-associated SNP (Supplementary Fig. 8). The former showed that all of the HLA SNPs except three from the HLA class II and III regions had much larger outgroup components than the other SNPs. The latter analysis indicated a strong association between steppe ancestry and MS risk. Additionally, outgroup ancestry at rs10914539 on chromosome 1 exceptionally reduced the incidence of MS, whereas outgroup ancestry at rs771767 (chromosome 3) and rs137956 (chromosome 22) significantly boosted MS risk.
Ancestral risk score
To assign risk to ancient ancestries by computing the equivalent of a polygenic score for each, we followed methods developed in ref. 11. We calculated the effect allele painting frequency for a given ancestry F{anc,i} for SNP i using the formula:
where there are Meffect individuals homozygous for the effect allele, Malt individuals homozygous for the other allele and is the sum of the painting probabilities for that ancestry in individuals homozygous for the effect allele at SNP i. This can be interpreted as an estimate of an ancestral contribution to effect allele frequency in a modern population. The per-SNP painting frequencies can be found in Supplementary Tables 4–6.
To calculate the ARS, we summed over all I pruned SNPs in an additive model:
We then ran a transformation step as in ref. 79, centring results around the ancestral mean (that is, all ancestries) and reporting as a Z score. To obtain 95% confidence intervals, we ran an accelerated bootstrap over loci, which accounts for the skew of data to better estimate confidence intervals80.
GWAS of ancestry and genotypes
The total variance of a trait explained by genotypes (SNP values), ancestry and haplotypes (described below) is a measure of how well each captures the causal factors driving that trait. We therefore computed the variance explained for each data type in a ‘head-to-head’ comparison at either specific SNPs or SNP sets. In this section, we describe the model and covariates accounted for.
We used the UK Biobank to fit GWAS models for local ancestry values and genotype values separately, using only SNPs known to be associated with the phenotype (fine-mapped SNPs). We used the following phenotype codes for each phenotype: MS, data field 131043; RA, data field 131849 (seropositive).
Let Yi denote the phenotype status for the ith individual (i = 1, ..., 399,998), which takes a value of 1 for a case and 0 for a control, and let πi = Pr(Yi = 1) denote the probability that this individual is a case. Let Xijk denote the kth ancestry probability (k = 1, ..., K) for the jth SNP (j = 1, ..., 205) of the ith individual. Cic is the cth predictor (c = 1, ..., Nc) for the ith individual. We used the following logistic regression model for GWAS, which assumes the effects of alleles are additive:
We used Nc = 20 predictors in the GWAS models, including sex, age and the first 18 principal components, which are sufficient to capture most of the population structure in the UK Biobank81.
First, we built the model with K = 1. By using only one ancestry probability in each model, we aimed to find the statistical significance of each SNP under each ancestry. We then built the model with K = 5, that is, using all six local ancestry probabilities, which sum to 1. We calculated the variance explained by each SNP by summing the variance explained by Xijk (k = 1, …, 5).
We considered fitting multivariate models by using all the SNPs as covariates. However, the dataset contains only 1,982 cases. Even when only one ancestry is included, the multivariate model has 191 predictors, which could result in overfitting problems. Therefore, the GWAS models were preferred to multivariate models.
We also fitted a logistic regression model for GWAS using the genotype data as follows:
where Xij ∈ {0,1,2} denotes the number of copies of the reference allele of the jth SNP (j = 1, ..., 205) that the ith individual has and Cic (c = 1, ..., Nc) denotes the covariates, including age, sex and the first 18 principal components, for the ith individual, where Nc = 20. Because the UK Biobank is underpowered compared to the case–control study in which these SNPs were found, the only statistically significant (P < 10–5) association was for the HLA class II SNP tagging HLA-DRB1*15:01.
GWAS comparison for trait-associated SNPs
In this section, we describe how we moved from associations between SNPs (either genotype values or ancestry) and a trait to total variance explained.
We compared the variance explained by SNPs from the GWAS model using the painting data (all six local ancestry probabilities; the seventh was a linear combination of the first six) with that from the GWAS model using the genotype data. McFadden’s pseudo-R2 measure82 is widely used for estimating the variance explained by logistic regression models. McFadden’s pseudo-R2 is defined as
where LM and L0 are the likelihoods for the fitted and null model, respectively. Taking overfitting into account, we use the adjusted McFadden’s pseudo-R2 value by penalizing the number of predictors:
where N is the sample size and k is the number of predictors.
Specifically, R2(SNPs) is calculated as the extra variance in addition to sex, age and the 18 principal components that can be explained by SNPs:
Notably, two SNPs stood out for explaining much more variance than the others when fitting the GWAS model using the genotype data, but overall more SNPs from GWAS painting explained more than 0.1% of the variance, which indicates that the painting data are probably more efficient for estimating the effect sizes of SNPs and detecting significant SNPs. Additionally, some SNPs from GWAS models using painting data explained almost the same amount of variance, suggesting that these SNPs consist of very similar ancestries.
HTRX
Ancestry is a strong predictor of MS, but we wanted to understand whether it was tagging some causal factor that was not in our genetic data or whether it was tagging either interactions or rare SNPs. To address this, we propose HTRX, which searches for haplotype patterns that include single SNPs and non-contiguous haplotypes. HTRX is an association between a template of n SNPs and a phenotype. The template gives a value for each SNP, with values of 0 or 1 reflecting that the reference allele of the SNP is present or absent, respectively, while an ‘X’ means that either value is allowed. For example, haplotype 1X0 corresponds to a three-SNP haplotype in which the first SNP is the alternative allele and the third SNP is the reference allele, while the second SNP can be either the reference or alternative allele. Therefore, haplotype 1X0 is essentially only a two-SNP haplotype.
To examine the association between a haplotype and a binary phenotype, we replace the genotype term with a haplotype in the standard GWAS model:
where Hij denotes the jth haplotype probability for the ith individual:
HTRX can identify gene–gene interactions and is superior to HTR not only because it can extract combinations of significant SNPs within a region, leading to improved predictive performance, but also because the haplotypes are more interpretable as multi-SNP haplotypes are only reported when they lead to increased predictive performance.
HTRX model selection procedure for shorter haplotypes
Fitting HTRX models directly on the whole dataset can lead to significant overfitting, especially as the number of SNPs increases. When overfitting occurs, the models experience poorer predictive accuracy against unseen data. Further, HTRX introduces an enormous model space, which must be searched.
To address these problems, we implemented a two-step procedure:
Step 1: Select candidate models. This step aims to address the model search problem by obtaining a set of models more diverse than those obtained with traditional bootstrap resampling83.
Randomly sample a subset (50%) of data. Specifically, when the outcome is binary, stratified sampling is used to ensure the subset has approximately the same proportion of cases and controls as the whole dataset.
Start from a model with fixed covariates (18 principal components, sex and age) and perform forward regression on the subset, that is, iteratively choose a feature (in addition to the fixed covariates) to add whose inclusion enables the model to explain the largest variance, and select s models with the lowest Bayesian information criterion (BIC)84 to enter the candidate model pool.
Repeat (1) and (2) B times and select all the different models in the candidate model pool as the candidate models.
Step 2: Select the best model using tenfold cross-validation.
Randomly split the whole dataset into ten groups with approximately equal size, using stratified sampling when the outcome is binary.
In each of the ten folds, use a different group as the test dataset and take the remaining groups as the training dataset. Then, fit all the candidate models on the training dataset and use these fitted models to compute the additional variance explained by features (out-of-sample R2) in the test dataset. Finally, select the candidate model with the highest average out-of-sample R2 as the best model.
HTRX model selection procedure for longer haplotypes (cumulative HTRX)
Longer haplotypes are important for discovering interactions. However, there are 3k – 1 haplotypes in HTRX if the region contains k SNPs, making this unrealistic for regions with large numbers of SNPs. To address this issue, we propose cumulative HTRX to control the number of haplotypes, which is also a two-step procedure.
Step 1: Extend haplotypes and select candidate models.
Randomly sample a subset (50%) of data, using stratified sampling when the outcome is binary. This subset is used for all the analysis in (2) and (3).
Start with L randomly chosen SNPs from the entire k SNPs and keep the top M haplotypes that are chosen from forward regression. Then, add another SNP to the M haplotypes to create 3M + 2 haplotypes. There are 3M haplotypes obtained by adding 0, 1 or X to the previous M haplotypes, as well as two bases of the added SNP, that is, ‘XX…X0’ and ‘XX…X1’ (as X was implicitly used in the previous step). The top M haplotypes are then selected using forward regression. Repeat this process until M haplotypes are obtained that include k – 1 SNPs.
Add the last SNP to create 3M + 2 haplotypes. Afterwards, start from a model with fixed covariates (18 principal components, sex and age), perform forward regression on the training set and select s models with the lowest BIC to enter the candidate model pool.
Repeat (1)–(3) B times and select all the different models in the candidate model pool as the candidate models.
Step 2: Select the best model using tenfold cross-validation, as described in ‘HTRX model selection procedure for shorter haplotypes’.
We note that, because the search procedure in step 1(2) may miss some highly predictive haplotypes, cumulative HTRX acts as a lower bound on the variance explainable by HTRX.
As a model criticism, only common and highly predictive haplotypes (that is, those with the greatest adjusted R2) are correctly identified, but the increased complexity of the search space of HTRX leads to haplotype subsets that are not significant on their own but are significant when interacting with other haplotype subsets being missed. This issue would be eased if we increased all the parameters l, M and B but with higher computational cost or improved the search by optimizing the order of adding SNPs. This leads to decreased certainty that the exact haplotypes proposed are ‘correct’ but reinforces the inference that interaction is extremely important.
Simulation study for HTRX
To investigate how the total variance explained by HTRX compares to that from GWAS and HTR, we used a simulation study comparing
linear models (denoted by ‘lm’) and generalized linear models with a logit link function (denoted by ‘glm’);
models with or without actual interaction effects;
models with or without rare SNPs (frequency of less than 5%);
removing or retaining rare haplotypes when rare SNPs exist.
We started from creating the genotypes for four different SNPs Gijq (where i = 1, ..., 100,000 denotes the index of individuals, j = 1 (1XXX), 2 (X1XX), 3 (XX1X) and 4 (XXX1) represents the index of SNPs and q = 1,2 for the two genomes as individuals are diploid). If no rare SNPs were included, we sampled the frequency Fj of these four SNPs from 5% to 95%; otherwise, we sampled the frequency of the first two SNPs from 2% to 5% (in practice, we obtained F1 = 2.8% and F2 = 3.1% under our seed) while the frequency of the last two SNPs was sampled from 5% to 95%. For the ith individual, we sampled Gijq ~ Binomial(1,Fj) for the qth genome of the jth SNP and took the average value of the two genomes as the genotype for the jth SNP of the ith individual: . On the basis of the genotype data, we obtained the haplotype data for each individual, and we considered removing haplotypes rarer than 0.1% or not when rare SNPs were generated. In addition, we sampled 20 fixed covariates (including sex, age and 18 principal components) Cic, where c = 1, ..., 20 from UK Biobank for 100,000 individuals.
Next, we sampled the effect sizes of SNPs and covariates and normalized them by their standard deviations: and for each fixed j and c, respectively. When an interaction existed, we created a fixed effect size for haplotype 11XX as twice the average absolute SNP effects: where H1 refers to 11XX; otherwise, H1 = 0. Note that when rare SNPs were included.
Finally, we sampled the outcome on the basis of the outcome score (for the ith individual):
where γ is a scale factor for the effect sizes of SNPs and haplotype 11XX, ei ~ N(0,0.1) is the random error and w is a fixed intercept term. For linear models, outcome Yi = 0i; for generalized linear models, we sampled the outcome from the binomial distribution Yi ~ Binomial(1,πi), where is the probability that the ith individual is a case.
As the simulation was intended to compare the variance explained by HTRX, HTR and SNPs (GWAS) in addition to fixed covariates, we tripled the effect sizes of SNPs and haplotype 11XX (if an interaction existed) by setting γ = 3. In ‘glm’, to ensure a reasonable case prevalence (for example, below 5%), we set w = –7, which was also applied in ‘lm’.
We applied the procedure described in ‘HTRX model selection procedure for shorter haplotypes’ for HTRX, HTR and GWAS and visualized the distribution of the out-of-sample R2 for each of the best models selected by each method in Supplementary Fig. 11. In both ‘lm’ and ‘glm’, HTRX had equal predictive performance to the true model. It performed as well as GWAS when interaction effects were absent, explained more variance when an interaction was present and was significantly more explanatory than HTR. When rare SNPs are included, the only effective interaction term is rare. In this case, the difference between GWAS and HTRX became smaller, as expected, and removing the rare haplotypes minimally reduced the performance of HTRX.
In conclusion, we demonstrated through simulation that our HTRX implementation (1) searches the haplotype space effectively and (2) protects against overfitting. This makes it a superior approach compared with HTR and GWAS to integrate SNP effects with gene–gene interactions. Its robustness is also retained when there are rare effective SNPs and haplotypes.
Quantifying selection using historical allele frequencies from pathway painting
The historical trajectory of SNP frequencies is a strong signal of selection when ancient DNA data are available. This is the main purpose of our pathway painting method and can be used to infer selection at individual loci and combined into a polygenic score by analysing sets of SNPs associated with a trait.
First, we inferred allele frequency trajectories and selection coefficients for a set of LD-pruned genome-wide-significant trait-associated variants using a modified version of CLUES (Coalescent Likelihood Under Effects of Selection)19. To account for population structure in our samples, we applied a new chromosome painting technique based on inference of a sample’s nearest neighbours in the marginal trees of an ARG that contains labelled individuals11. We ran CLUES using a time series of imputed ancient DNA genotype probabilities obtained from 1,015 ancient western Eurasian samples that passed all quality-control filters. We produced four additional models for each trait-associated variant by conditioning the analysis on one of the four ancestral path labels from our chromosome painting model: WHG, EHG, CHG or ANA.
Second, we were able to infer polygenic selection gradients (ω) and P values for each trait, that is, for MS and RA, in all ancestral paths, using PALM (Polygenic Adaptation Likelihood Method)20. Full methods and results can be found in Supplementary Note 6.
LDA and LDA score
In population genetics, LD is defined as the non-random association of alleles at different loci in a given population85. Just like the values of the genotype, ancestries can be correlated along the genome, and, further, deviation from the expected length distribution for a particular ancestry is a signal of selection, dated by the affected ancestry. We propose an ancestry linkage disequilibrium (LDA) approach to measure the association of ancestries between SNPs and an LDA score to quantify deviations from the null hypothesis that ancestry is inherited at random across loci.
LDA is defined in terms of local ancestry. Let A(i,j,k) denote the probability of the kth ancestry (k = 1, ..., K) at the jth SNP (j = 1, ..., J) of a chromosome for the ith individual (i = 1, ..., N).
We define the distance between SNPs l and m as the average L2 norm between ancestries at those SNPs. Specifically, we compute the L2 norm for the ith genome as
We then compute the distance between SNPs l and m by averaging Di(l, m):
We define D*(l, m) as the theoretical distance between SNPs l and m if there is no LDA between them. D*(l, m) is estimated by
where i* ∈ {1, ..., N} is resampled without replacement at SNP l. Using the empirical distribution of ancestry probabilities accounts for variability in both the average ancestry and its distribution across SNPs. Ancestry assignment can be very precise in regions of the genome where the reference panel matches the data and uncertain in others where only distant relatives of the underlying populations are available.
The LDA between SNPs l and m is a similarity, defined in terms of the negative distance –D(l, m) normalized by the expected value D*(l, m) under no LD, expressed as
LDA therefore takes an expected value of 0 when haplotypes are randomly assigned at different SNPs and positive values when the ancestries of the haplotypes are correlated.
LDA is a pairwise quantity. To arrive at a per-SNP property, we define the LDA score of SNP j as the total LDA of this SNP with the rest of the genome, that is, the integral of the LDA for that SNP. Because this quantity decreases to zero as we move away from the target SNP, this is in practice computed within a window of X cM (we use X = 5 as LDA is approximately zero outside this region in our data) on both sides of the SNP. Note that we measure this quantity in terms of the genetic distance, and therefore the LDA score is measuring the length of ancestry-specific haplotypes compared to individual-level recombination rates.
As a technical note, when SNPs are present near either end of the chromosome, they no longer have a complete window, which results in a smaller LDA score. This would be appropriate for measuring total ancestry correlations, but to make LDA score useful for detecting anomalous SNPs we use the LDA score of the symmetric side of the SNP to estimate the LDA score within the non-existent window.
where gd(l) is the genetic distance (that is, position in cM) of SNP l and tg is the total genetic distance of a chromosome. We also assume the LDA on either end of the chromosome equals the LDA of the SNP closest to the end: LDA(j,gd = 0) = LDA(j,lmin(gd)) and LDA(j,gd = td) = LDA(j,lmax(gd)), where gd is the genetic distance and lmin(gd) and lmax(gd) are the indexes of the SNP with the smallest and largest genetic distance, respectively.
The integral is computed assuming linear interpolation of the LDA score between adjacent SNPs.
LDA thus quantifies the correlations between the ancestry of two SNPs, measuring the proportion of individuals who have experienced a recombination leading to a change in ancestry, relative to the genome-wide baseline. LDA score is the total amount of genome in LDA with each SNP (measured in recombination map distance).
Simulation study for LDA and LDA score
For the simulation in Supplementary Fig. 46, an ancient population P0 evolved for 2,200 generations before splitting into two subpopulations, P1 (steppe) and P2 (farmer). After evolution for 400 generations, we added mutations m1 and m2 at different loci in P1 and P2. Both added mutations were then positively selected in the following 300 generations, after which we sampled 20 individuals from each of P1 and P2 as reference samples. At generation 2,900, P1 and P2 admixed to P3, in which both added mutations experienced strong positive selection for 20 generations. Finally, we sampled 1,000 individuals from P3 to compute their ancestry proportions of P1 and P2 using the chromosome painting technique and calculated the LDA score of the simulated chromosome positions.
We investigated balancing selection at two loci as well. The balancing selection in P1 and P2 ensured that the mutant allele reached around 50% frequency, while positive selection made the mutant allele become almost the only allele. In P3, if m1 or m2 was positively selected, its frequency reached greater than 80% regardless of whether the allele experienced balancing or positive selection in P1 or P2, because we set strong positive selection. If m1 or m2 underwent balancing selection in P3, its frequency slightly increased; for example, if m1 underwent balancing selection in P1, it had a frequency of 25% when P3 was created, and the frequency reached around 37.5% after 20 generations of balancing selection in P3.
As shown in Supplementary Fig. 47, positive selection in P3 resulted in low LDA scores around the selected locus if this allele was not uncommon (that is, if it had a frequency of 50% (balancing selection) or 100% (positive selection) in subpopulation P1 or P2). Note that the balancing selection in P1 or P2 worked the same as ‘weak positive selection’, because m1 and m2 were rare when they first occurred and were positively selected until they reached a frequency of 50%.
We also performed simulations for selection at a single locus (Supplementary Figs. 47 and 48).
Stage 1: An ancient population P0 evolved for 1,600 generations, and then we added a mutation m0, which underwent balancing selection until generation 2,200, when P0 split into P1 and P2, where the frequency of m0 was around 50%.
Stage 2: We then explored different combinations of positive, balancing and negative selection of m0 in P1 and P2. The frequency of m0 reached 80%, 50% and 20% when it was positively selected, underwent balancing selection or was negatively selected, respectively, until generation 2,899, when we sampled 20 individuals each in P1 and P2 as the reference samples.
Stage 3: P1 and P2 then merged into P3 in generation 2,900. In P3, for each combination of selection in stage 2, we simulated positive, balancing and negative selection for m0. The selection lasted for 20 generations, and we then sampled 4,000 individuals from P3 as the modern population.
When m0 was positively selected in at least one of P1 and P2 and it experienced negative selection in P3, the LDA scores around the loci of m0 were low. Otherwise, no abnormal LDA scores were found surrounding m0.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Online content
Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41586-023-06618-z.
Supplementary information
Acknowledgements
We extend our thanks to all the former and current staff at the Lundbeck Foundation GeoGenetics Centre and the GeoGenetics Sequencing Core and to colleagues across the many institutions detailed below. We are particularly grateful to M. Madrona, L. Hansen and J. Bitz-Thorsen for laboratory assistance; to J. Hansen, S. Mularczyk, K. Thorø Michler and E. Neerup Nielsen for their help with sampling; and to L. Olsen as project manager for the Lundbeck Foundation GeoGenetics Centre project. The Lundbeck Foundation GeoGenetics Centre is supported by grants from the Lundbeck Foundation (R302-2018-2155, R155-2013-16338), the Novo Nordisk Foundation (NNF18SA0035006), the Wellcome Trust (214300), Carlsberg Foundation (CF18-0024), the Danish National Research Foundation (DNRF94, DNRF174), the University of Copenhagen (KU2016 programme), the Rise II project ‘Towards a New European Prehistory’ (M16-0455) and Ferring Pharmaceuticals A/S (to E.W.). We thank UK Biobank for access to the UK Biobank genomic resource. We also thank and acknowledge the participants and investigators of the FinnGen study. We are thankful to Illumina for collaboration. E.W. thanks St John’s College, Cambridge, for providing a stimulating environment of discussion and learning and the Lundbeck Foundation, the Novo Nordisk Foundation, the Wellcome Trust, the Carlsberg Foundation and the Danish National Research Foundation for financial support. R.N. acknowledges US National Institutes of Health grant R01GM138634. K.E.A., A.P.A., A.K.N.I. and L.F. thank the OAK Foundation.
Extended data figures and tables
Author contributions
W.B., Y.Y., E.K.I.-P., K.E.A., G.S. and L.T.J. contributed equally to this work. A.K.N.I., D.J.L., L.F. and E.W. led the study. W.B., A.R.-M., M.E.A., L.F., R.N. and E.W. conceptualized the study. R.N., K.K., L.F. and E.W. acquired funding for research. A.R., C.G., F.D., M.L.S.J., S.B.M., B.S., L.K., I.M.H., N.W., L.V. and T.S.K. were involved in sample collection and processing. W.B., Y.Y., E.K.I.-P., A.S., A.P., S.R. and D.J.L. were involved in developing and applying methodology. W.B., Y.Y., E.K.I.-P., G.S., A.P.A., A.R., E.A.D., M.S., S.R., A.K.N.I. and D.J.L. undertook formal analyses of data. W.B., Y.Y., E.K.I.-P., K.E.A., L.T.J., A.K.N.I., L.F. and E.W. drafted the main text (W.B. led this). W.B., Y.Y., E.K.I.-P., G.S., L.T.J., E.A.D., A.S., F.D., M.L.S.J., S.B.M., B.S., L.K., I.M.H., N.W., L.V., A.K.N.I. and D.J.L. drafted the supplementary notes and materials. W.B., Y.Y., E.K.I.-P., K.E.A., L.T.J., A.P.A., K.K., R.N., A.K.N.I., D.J.L., L.F. and E.W. were involved in reviewing drafts and editing. All co-authors read, commented on and agreed the submitted manuscript.
Peer review
Peer review information
Nature thanks Samira Asgari, Luis Barreiro and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.
Data availability
All collapsed and paired-end sequence data for new samples sequenced in this study are publicly available on the European Nucleotide Archive (accession code PRJEB65098), together with trimmed sequence alignment map files, aligned using human genome build GRCh37. Previously published ancient genomic data used in this study are detailed in Supplementary Table 13 and are all already publicly available.
Code availability
The modified version of CLUES used in this study is available from https://github.com/standard-aaron/clues (CLUES: 10.5281/zenodo.8228252; PALM: 10.5281/zenodo.8228262). The pipeline and conda environment necessary to replicate the analysis of allele frequency trajectories and polygenic selection in Supplementary Note 6 are available on GitHub at https://github.com/ekirving/ms_paper (10.5281/zenodo.8228192). The code to create ancestry anomaly scores based on chromosome painting is on GitHub at https://github.com/danjlawson/ms_paper (10.5281/zenodo.8232688). The code to compute LDA and LDA score is available on GitHub at https://github.com/YaolingYang/LDAandLDAscore (10.5281/zenodo.8228298). The code for HTRX is on GitHub at https://github.com/YaolingYang/HTRX (10.5281/zenodo.8228295). The code for ARS calculation is on GitHub at https://github.com/will-camb/ms_paper (10.5281/zenodo.8228406).
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
These authors contributed equally: William Barrie, Yaoling Yang, Evan K. Irving-Pease, Kathrine E. Attfield, Gabriele Scorrano, Lise Torp Jensen
These authors jointly supervised this work: Astrid K. N. Iversen, Daniel J. Lawson, Lars Fugger, Eske Willerslev
Contributor Information
Astrid K. N. Iversen, Email: astrid.iversen@ndcn.ox.ac.uk
Daniel J. Lawson, Email: dan.lawson@bristol.ac.uk
Lars Fugger, Email: lars.fugger@ndcn.ox.ac.uk.
Eske Willerslev, Email: ew482@cam.ac.uk.
Extended data
is available for this paper at 10.1038/s41586-023-06618-z.
Supplementary information
The online version contains supplementary material available at 10.1038/s41586-023-06618-z.
References
- 1.Attfield, K. E., Jensen, L. T., Kaufmann, M., Friese, M. A. & Fugger, L. The immunology of multiple sclerosis. Nat. Rev. Immunol.10.1038/s41577-022-00718-z (2022). [DOI] [PubMed]
- 2.Allentoft, M. E. et al. Population genomics of post-glacial western Eurasia. Nature10.1038/s41586-023-06865-0 (2024). [DOI] [PMC free article] [PubMed]
- 3.Walton C, et al. Rising prevalence of multiple sclerosis worldwide: insights from the Atlas of MS, third edition. Mult. Scler. J. 2020;26:1816–1821. doi: 10.1177/1352458520970841. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.International Multiple Sclerosis Genetics Consortium et al. Multiple sclerosis genomic map implicates peripheral immune cells and microglia in susceptibility. Science. 2019;365:eaav7188. doi: 10.1126/science.aav7188. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Bjornevik K, et al. Longitudinal analysis reveals high prevalence of Epstein–Barr virus associated with multiple sclerosis. Science. 2022;375:296–301. doi: 10.1126/science.abj8222. [DOI] [PubMed] [Google Scholar]
- 6.Lanz TV, et al. Clonally expanded B cells in multiple sclerosis bind EBV EBNA1 and GlialCAM. Nature. 2022;603:321–327. doi: 10.1038/s41586-022-04432-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Olsson T, Barcellos LF, Alfredsson L. Interactions between genetic, lifestyle and environmental risk factors for multiple sclerosis. Nat. Rev. Neurol. 2017;13:25–36. doi: 10.1038/nrneurol.2016.187. [DOI] [PubMed] [Google Scholar]
- 8.Benton ML, et al. The influence of evolutionary history on human health and disease. Nat. Rev. Genet. 2021;22:269–283. doi: 10.1038/s41576-020-00305-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Chi C, et al. Admixture mapping reveals evidence of differential multiple sclerosis risk by genetic ancestry. PLoS Genet. 2019;15:e1007808. doi: 10.1371/journal.pgen.1007808. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Bycroft C, et al. The UK Biobank resource with deep phenotyping and genomic data. Nature. 2018;562:203–209. doi: 10.1038/s41586-018-0579-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Irving-Pease, E. K. et al. The selection landscape and genetic legacy of ancient Eurasians. Nature10.1038/s41586-023-06705-1 (2024). [DOI] [PMC free article] [PubMed]
- 12.Itan Y, Powell A, Beaumont MA, Burger J, Thomas MG. The origins of lactase persistence in Europe. PLoS Comput. Biol. 2009;5:e1000491. doi: 10.1371/journal.pcbi.1000491. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Fugger L, Jensen LT, Rossjohn J. Challenges, progress, and prospects of developing therapies to treat autoimmune diseases. Cell. 2020;181:63–80. doi: 10.1016/j.cell.2020.03.007. [DOI] [PubMed] [Google Scholar]
- 14.Dehasque M, et al. Inference of natural selection from ancient DNA. Evol. Lett. 2020;4:94–108. doi: 10.1002/evl3.165. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Efron B. Better bootstrap confidence intervals. J. Am. Stat. Assoc. 1987;82:171–185. doi: 10.1080/01621459.1987.10478410. [DOI] [Google Scholar]
- 16.Zaykin DV, et al. Testing association of statistically inferred haplotypes with discrete and continuous traits in samples of unrelated individuals. Hum. Hered. 2002;53:79–91. doi: 10.1159/000057986. [DOI] [PubMed] [Google Scholar]
- 17.Yang Y, Lawson DJ. HTRX: an R package for learning non-contiguous haplotypes associated with a phenotype. Bioinform. Adv. 2023;3:vbad038. doi: 10.1093/bioadv/vbad038. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Thuesen, N. H., Klausen, M. S., Gopalakrishnan, S., Trolle, T. & Renaud, G. Benchmarking freely available HLA typing algorithms across varying genes, coverages and typing resolutions. Frontiers Immunol.https://www.frontiersin.org/articles/10.3389/fimmu.2022.987655 (2022). [DOI] [PMC free article] [PubMed]
- 19.Stern AJ, Wilton PR, Nielsen R. An approximate full-likelihood method for inferring selection and allele frequency trajectories from DNA sequence data. PLoS Genet. 2019;15:e1008384. doi: 10.1371/journal.pgen.1008384. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Stern AJ, Speidel L, Zaitlen NA, Nielsen R. Disentangling selection on genetically correlated polygenic traits via whole-genome genealogies. Am. J. Hum. Genet. 2021;108:219–239. doi: 10.1016/j.ajhg.2020.12.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Jones ER, et al. Upper Palaeolithic genomes reveal deep roots of modern Eurasians. Nat. Commun. 2015;6:8912. doi: 10.1038/ncomms9912. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Comabella M, et al. Identification of a novel risk locus for multiple sclerosis at 13q31.3 by a pooled genome-wide scan of 500,000 single nucleotide polymorphisms. PLoS ONE. 2008;3:e3490. doi: 10.1371/journal.pone.0003490. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Bersaglieri T, et al. Genetic signatures of strong recent positive selection at the lactase gene. Am. J. Hum. Genet. 2004;74:1111–1120. doi: 10.1086/421051. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.He Z, Dai X, Beaumont M, Yu F. Detecting and quantifying natural selection at two linked loci from time series data of allele frequencies with forward-in-time simulations. Genetics. 2020;216:521–541. doi: 10.1534/genetics.120.303463. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Kurki MI, et al. FinnGen provides genetic insights from a well-phenotyped isolated population. Nature. 2023;613:508–518. doi: 10.1038/s41586-022-05473-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Haak W, et al. Massive migration from the steppe was a source for Indo-European languages in Europe. Nature. 2015;522:207–211. doi: 10.1038/nature14317. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Allentoft ME, et al. Population genomics of Bronze Age Eurasia. Nature. 2015;522:167–172. doi: 10.1038/nature14507. [DOI] [PubMed] [Google Scholar]
- 28.Gregersen JW, et al. Functional epistasis on a common MHC haplotype associated with multiple sclerosis. Nature. 2006;443:574–577. doi: 10.1038/nature05133. [DOI] [PubMed] [Google Scholar]
- 29.Wang JH, et al. Modeling the cumulative genetic risk for multiple sclerosis from genome-wide association data. Genome Med. 2011;3:3. doi: 10.1186/gm217. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Cotsapas C, Mitrovic M. Genome-wide association studies of multiple sclerosis. Clin. Transl. Immunol. 2018;7:e1018. doi: 10.1002/cti2.1018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Slim L, Chatelain C, de Foucauld H, Azencott C-A. A systematic analysis of gene–gene interaction in multiple sclerosis. BMC Med. Genomics. 2022;15:100. doi: 10.1186/s12920-022-01247-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Kerner G, et al. Human ancient DNA analyses reveal the high burden of tuberculosis in Europeans over the last 2,000 years. Am. J. Hum. Genet. 2021;108:517–524. doi: 10.1016/j.ajhg.2021.02.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Kerner G, et al. Genetic adaptation to pathogens and increased risk of inflammatory disorders in post-Neolithic Europe. Cell Genomics. 2023;3:100248. doi: 10.1016/j.xgen.2022.100248. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Bos KI, et al. Pre-Columbian mycobacterial genomes reveal seals as a source of New World human tuberculosis. Nature. 2014;514:494–497. doi: 10.1038/nature13591. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Sabin S, et al. A seventeenth-century Mycobacterium tuberculosis genome supports a Neolithic emergence of the Mycobacterium tuberculosis complex. Genome Biol. 2020;21:201. doi: 10.1186/s13059-020-02112-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Rasmussen S, et al. Early divergent strains of Yersinia pestis in Eurasia 5,000 years ago. Cell. 2015;163:571–582. doi: 10.1016/j.cell.2015.10.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Spyrou MA, et al. Analysis of 3800-year-old Yersinia pestis genomes suggests Bronze Age origin for bubonic plague. Nat. Commun. 2018;9:2234. doi: 10.1038/s41467-018-04550-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Rascovan N, et al. Emergence and spread of basal lineages of Yersinia pestis during the Neolithic decline. Cell. 2019;176:295–305. doi: 10.1016/j.cell.2018.11.005. [DOI] [PubMed] [Google Scholar]
- 39.Düx A, et al. Measles virus and rinderpest virus divergence dated to the sixth century BCE. Science. 2020;368:1367–1370. doi: 10.1126/science.aba9411. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Guellil M, et al. Ancient herpes simplex 1 genomes reveal recent viral structure in Eurasia. Sci. Adv. 2022;8:eabo4435. doi: 10.1126/sciadv.abo4435. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Weinert LA, et al. Rates of vaccine evolution show strong effects of latency: implications for varicella zoster virus epidemiology. Mol. Biol. Evol. 2015;32:1020–1028. doi: 10.1093/molbev/msu406. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Pontremoli, C., Forni, D., Clerici, M., Cagliani, R. & Sironi, M. Possible European origin of circulating varicella zoster virus strains. J. Infect. Dis.10.1093/infdis/jiz227 (2019). [DOI] [PubMed]
- 43.Mammas IN, Spandidos DA. Paediatric virology in the hippocratic corpus. Exp. Ther. Med. 2016;12:541–549. doi: 10.3892/etm.2016.3420. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Tian C, et al. Genome-wide association and HLA region fine-mapping studies identify susceptibility loci for multiple common infections. Nat. Commun. 2017;8:599. doi: 10.1038/s41467-017-00257-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 45.Krause-Kyora B, et al. Ancient DNA study reveals HLA susceptibility locus for leprosy in medieval Europeans. Nat. Commun. 2018;9:1569. doi: 10.1038/s41467-018-03857-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Wallin MT, et al. The prevalence of MS in the United States: a population-based estimate using health claims data. Neurology. 2019;92:e1029–e1040. doi: 10.1212/WNL.0000000000007035. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47.Feigin VL, et al. Global, regional, and national burden of neurological disorders, 1990–2016: a systematic analysis for the Global Burden of Disease Study 2016. Lancet Neurol. 2019;18:459–480. doi: 10.1016/S1474-4422(18)30499-X. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Fleming J, Fabry Z. The hygiene hypothesis and multiple sclerosis. Ann. Neurol. 2007;61:85–89. doi: 10.1002/ana.21092. [DOI] [PubMed] [Google Scholar]
- 49.Listing J, Gerhold K, Zink A. The risk of infections associated with rheumatoid arthritis, with its comorbidity and treatment. Rheumatology. 2013;52:53–61. doi: 10.1093/rheumatology/kes305. [DOI] [PubMed] [Google Scholar]
- 50.Nielen MMJ, et al. Specific autoantibodies precede the symptoms of rheumatoid arthritis: a study of serial measurements in blood donors. Arthritis Rheum. 2004;50:380–386. doi: 10.1002/art.20018. [DOI] [PubMed] [Google Scholar]
- 51.Rubinacci S, Ribeiro DM, Hofmeister RJ, Delaneau O. Efficient phasing and imputation of low-coverage sequencing data using large reference panels. Nat. Genet. 2021;53:120–126. doi: 10.1038/s41588-020-00756-0. [DOI] [PubMed] [Google Scholar]
- 52.Meyer M, Kircher M. Illumina sequencing library preparation for highly multiplexed target capture and sequencing. Cold Spring Harb. Protoc. 2010;2010:pdb.prot5448. doi: 10.1101/pdb.prot5448. [DOI] [PubMed] [Google Scholar]
- 53.Schubert M, Lindgreen S, Orlando L. AdapterRemoval v2: rapid adapter trimming, identification, and read merging. BMC Res. Notes. 2016;9:88. doi: 10.1186/s13104-016-1900-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 54.Li H, Durbin R. Fast and accurate short read alignment with Burrows–Wheeler transform. Bioinformatics. 2009;25:1754–1760. doi: 10.1093/bioinformatics/btp324. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 55.Li H, et al. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009;25:2078–2079. doi: 10.1093/bioinformatics/btp352. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 56.Jónsson H, Ginolhac A, Schubert M, Johnson PLF, Orlando L. mapDamage2.0: fast approximate Bayesian estimates of ancient DNA damage parameters. Bioinformatics. 2013;29:1682–1684. doi: 10.1093/bioinformatics/btt193. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Fu Q, et al. A revised timescale for human evolution based on ancient mitochondrial genomes. Curr. Biol. 2013;23:553–559. doi: 10.1016/j.cub.2013.02.044. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 58.Korneliussen TS, Albrechtsen A, Nielsen R. ANGSD: analysis of next generation sequencing data. BMC Bioinformatics. 2014;15:356. doi: 10.1186/s12859-014-0356-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 59.Monroy Kuhn JM, Jakobsson M, Günther T. Estimating genetic kin relationships in prehistoric populations. PLoS ONE. 2018;13:e0195491. doi: 10.1371/journal.pone.0195491. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 60.Weissensteiner H, et al. HaploGrep 2: mitochondrial haplogroup classification in the era of high-throughput sequencing. Nucleic Acids Res. 2016;44:W58–W63. doi: 10.1093/nar/gkw233. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 61.Scorrano G, Yediay FE, Pinotti T, Feizabadifarahani M, Kristiansen K. The genetic and cultural impact of the steppe migration into Europe. Ann. Hum. Biol. 2021;48:223–233. doi: 10.1080/03014460.2021.1942984. [DOI] [PubMed] [Google Scholar]
- 62.Purcell S, et al. PLINK: a tool set for whole-genome association and population-based linkage analyses. Am. J. Hum. Genet. 2007;81:559–575. doi: 10.1086/519795. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 63.Shringarpure SS, Bustamante CD, Lange K, Alexander DH. Efficient analysis of large datasets and sex bias with ADMIXTURE. BMC Bioinformatics. 2016;17:218. doi: 10.1186/s12859-016-1082-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 64.Patterson N, et al. Ancient admixture in human history. Genetics. 2012;192:1065–1093. doi: 10.1534/genetics.112.145037. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 65.Lawson DJ, Hellenthal G, Myers S, Falush D. Inference of population structure using dense haplotype data. PLoS Genet. 2012;8:e1002453. doi: 10.1371/journal.pgen.1002453. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 66.Margaryan A, et al. Population genomics of the Viking world. Nature. 2020;585:390–396. doi: 10.1038/s41586-020-2688-8. [DOI] [PubMed] [Google Scholar]
- 67.Hellenthal G, et al. A genetic atlas of human admixture history. Science. 2014;343:747–751. doi: 10.1126/science.1243518. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 68.1000 Genomes Project Consortium et al. A global reference for human genetic variation. Nature. 2015;526:68–74. doi: 10.1038/nature15393. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 69.Myers TA, Chanock SJ, Machiela MJ. LDlinkR: an R package for rapidly calculating linkage disequilibrium statistics in diverse populations. Front. Genet. 2020;11:157. doi: 10.3389/fgene.2020.00157. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 70.Ishigaki, K. et al. Multi-ancestry genome-wide association analyses identify novel genetic mechanisms in rheumatoid arthritis. Nature Genet.54, 1640–1651 (2022). [DOI] [PMC free article] [PubMed]
- 71.Alekseyenko AV, et al. Causal graph-based analysis of genome-wide association data in rheumatoid arthritis. Biol. Direct. 2011;6:25. doi: 10.1186/1745-6150-6-25. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 72.Raychaudhuri S, et al. Five amino acids in three HLA proteins explain most of the association between MHC and seropositive rheumatoid arthritis. Nat. Genet. 2012;44:291–296. doi: 10.1038/ng.1076. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 73.RACI consortium et al. Genetics of rheumatoid arthritis contributes to biology and drug discovery. Nature. 2014;506:376–381. doi: 10.1038/nature12873. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 74.Chang CC, et al. Second-generation PLINK: rising to the challenge of larger and richer datasets. GigaScience. 2015;4:7. doi: 10.1186/s13742-015-0047-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 75.Ju D, Mathieson I. The evolution of skin pigmentation-associated variation in West Eurasia. Proc. Natl Acad. Sci. USA. 2021;118:e2009227118. doi: 10.1073/pnas.2009227118. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 76.Nelson RM, Wallberg A, Simões ZLP, Lawson DJ, Webster MT. Genomewide analysis of admixture and adaptation in the Africanized honeybee. Mol. Ecol. 2017;26:3603–3617. doi: 10.1111/mec.14122. [DOI] [PubMed] [Google Scholar]
- 77.Kolberg L, Raudvere U, Kuzmin I, Vilo J, Peterson H. gprofiler2—an R package for gene list functional enrichment analysis and namespace conversion toolset g:Profiler. F1000Res. 2020;9:ELIXIR-709. doi: 10.12688/f1000research.24956.2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 78.Thorndike RL. Who belongs in the family? Psychometrika. 1953;18:267–276. doi: 10.1007/BF02289263. [DOI] [Google Scholar]
- 79.Berg JJ, Coop G. A population genetic signal of polygenic adaptation. PLoS Genet. 2014;10:e1004412. doi: 10.1371/journal.pgen.1004412. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 80.Frangos CC, Schucany WR. Jackknife estimation of the bootstrap acceleration constant. Comput. Stat. Data Anal. 1990;9:271–281. doi: 10.1016/0167-9473(90)90109-U. [DOI] [Google Scholar]
- 81.Sarmanova, A., Morris, T. & Lawson, D. J. Population stratification in GWAS meta-analysis should be standardized to the best available reference datasets. Preprint at bioRxiv10.1101/2020.09.03.281568 (2020).
- 82.McFadden, D. in Frontiers in Econometrics 105–142 (Academic, 1973).
- 83.Efron B. Bootstrap methods: another look at the jackknife. Ann. Stat. 1979;7:1–26. doi: 10.1214/aos/1176344552. [DOI] [Google Scholar]
- 84.Kass RE, Wasserman L. A reference Bayesian test for nested hypotheses and its relationship to the Schwarz criterion. J. Am. Stat. Assoc. 1995;90:928–934. doi: 10.1080/01621459.1995.10476592. [DOI] [Google Scholar]
- 85.Slatkin M. Linkage disequilibrium—understanding the evolutionary past and mapping the medical future. Nat. Rev. Genet. 2008;9:477–485. doi: 10.1038/nrg2361. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
All collapsed and paired-end sequence data for new samples sequenced in this study are publicly available on the European Nucleotide Archive (accession code PRJEB65098), together with trimmed sequence alignment map files, aligned using human genome build GRCh37. Previously published ancient genomic data used in this study are detailed in Supplementary Table 13 and are all already publicly available.
The modified version of CLUES used in this study is available from https://github.com/standard-aaron/clues (CLUES: 10.5281/zenodo.8228252; PALM: 10.5281/zenodo.8228262). The pipeline and conda environment necessary to replicate the analysis of allele frequency trajectories and polygenic selection in Supplementary Note 6 are available on GitHub at https://github.com/ekirving/ms_paper (10.5281/zenodo.8228192). The code to create ancestry anomaly scores based on chromosome painting is on GitHub at https://github.com/danjlawson/ms_paper (10.5281/zenodo.8232688). The code to compute LDA and LDA score is available on GitHub at https://github.com/YaolingYang/LDAandLDAscore (10.5281/zenodo.8228298). The code for HTRX is on GitHub at https://github.com/YaolingYang/HTRX (10.5281/zenodo.8228295). The code for ARS calculation is on GitHub at https://github.com/will-camb/ms_paper (10.5281/zenodo.8228406).