Search This Blog

Thursday, February 15, 2018

Modeling genetic ancestry with Davidski: step by step


There are many different ways to model your genetic ancestry. I prefer the Global25/nMonte method (see here). This is a step by step guide to modeling ancient ancestry proportions with this simple but powerful method using my own genome.


As far as I know, the vast majority of my recent ancestors came from the northern half of Europe. This may or may not be correct, but it gives me somewhere to start, so that I can come up with a coherent model. If you don't have this sort of information, because, perhaps, you were adopted, then just look in the mirror, and work from there. Like I say, it's not imperative that you know anything whatsoever about your ancestry, because your genetic data will do the talking, but you do need a model when modeling.

In scientific literature nowadays Northern Europeans are often described as a three-way mixture between Yamnaya-related pastoralists, Anatolian-derived early farmers, and Western European Hunter-Gatherers (WHG). So let's see if this model works for me. Obviously, if it does, then it'll confirm the information that I have about my origins, but it might also reveal finer details that I'm not aware of. The datasheet that I'm using for this model is available here.

[1] distance%=6.9025 / distance=0.069025

Davidski

Yamnaya_Samara 53.9
Barcin_N 30.75
Rochedane 15.35
Tepecik_Ciftlik_N 0

Yep, the model does work, with a fairly reasonable distance of almost 7%. The ancestry proportions more or less match those from scientific literature and the plethora of analyses that I've featured at this blog on the topic. Please note that I've kept things very simple, using only four reference populations and individuals as proxies for four distinct streams of ancestry. But I've put my own twist on this Neolithic/Bronze Age model by including two populations from Neolithic Anatolia (Barcin_N and Tepecik_Ciftlik_N), just to see what would happen. The WHG proxy is Rochedane.

Admittedly, though, my Yamnaya cut of ancestry appears somewhat bloated at over 53%, and the model's distance is a little higher than what I normally see for really strong models. So let's check if I can get a better fitting and more sensible result by adding a slightly more easterly forager proxy than Rochedane: Narva_Lithuania.

[1] distance%=5.9331 / distance=0.059331

Davidski

Yamnaya_Samara 45.75
Barcin_N 31.45
Narva_Lithuania 22.8
Rochedane 0
Tepecik_Ciftlik_N 0

The statistical fit does improve, and when given a choice between Rochedane and Narva_Lithuania, the algorithm picks the latter as the only source of extra forager input in my genome.

What could this mean? It might mean that a large part of my ancestry derives from the Baltic region. Actually, I know for a fact that this is true. But even if I had no idea about my genealogy, this result would be a very strong hint about my genetic origins. Indeed, let's follow this trail and try to further improve the fit of the model by adding a more relevant Yamnaya-related proxy, such as early Baltic Corded Ware (CWC_Baltic_early).

[1] distance%=5.444 / distance=0.05444

Davidski

CWC_Baltic_early 54.95
Barcin_N 26.7
Narva_Lithuania 18.35
Rochedane 0
Tepecik_Ciftlik_N 0
Yamnaya_Samara 0

Holy shit! To be honest, I wasn't expecting this sort of resolution and accuracy, and I can't promise that everyone using the Global25/nMonte method will see such incredibly nuanced outcomes, but this isn't a fluke. It can't be, because it gels so well with everything that I know about my ancestry. Please note also that I belong to Y-chromosome haplogroup R1a-M417, which is a lineage intimately associated with the Corded Ware expansion across Northern Europe (for instance, see here).

But of course, the Baltic and nearby regions haven't been isolated from migrations and invasions since the Corded Ware times. For instance, at some point, probably during the Bronze Age, Uralic-speaking groups moved west across the forest zone of Northeastern Europe and into the East Baltic and northern Scandinavia. It's generally accepted that they brought Siberian admixture with them (see here). Moreover, from the Iron Age to the Middle Ages, East Central Europe was under intense pressure from a wide range of nomadic steppe groups with complex ancestry, such as the Sarmatians, Avars, Huns, and Mongolians. Did any of these peoples leave their mark on my genome? At the risk of overfitting the model, let's explore this possibility by adding a few more reference populations.

[1] distance%=5.444 / distance=0.05444

Davidski

CWC_Baltic_early 54.95
Barcin_N 26.7
Narva_Lithuania 18.35
Han 0
Mongolian 0
Nganassan 0
Rochedane 0
Sarmatian_Pokrovka 0
Tepecik_Ciftlik_N 0
Yamnaya_Samara 0

Nothing changes when I add the Han Chinese, Mongolians, Nganassans (a Uralic group from Siberia), and Sarmatians to the model. But what about if I throw in the only ancient Slav in my datasheet?

[1] distance%=2.9904 / distance=0.029904

Davidski

Slav_Bohemia 85.9
CWC_Baltic_early 7.7
Narva_Lithuania 6.4
Barcin_N 0
Rochedane 0
Tepecik_Ciftlik_N 0
Yamnaya_Samara 0

Considering that the vast majority of my recent ancestors were Poles, thus a Slavic-speaking people from near the Baltic, this outcome makes perfect sense. And check out the new distance! But the problem now is that I'm overfitting the model by using two very similar and probably very closely related references, CWC_Baltic_early and Slav_Bohemia. And overfitting should be avoided at all costs. So it might be useful to break up this effort into two models: one focusing on the Neolithic and Bronze Age, and the other on the Iron Age and Middle Ages. I'll do that soon, but not just yet, because there are still too few Iron Age and Medieval samples available from the Baltic region and surrounds for meaningful analyses of this type.

See also...

Global25 workshop 1: that classic West Eurasian plot

Global25 workshop 2: intra-European variation

Global25 workshop 3: genes vs geography in Northern Europe

Getting the most out of the Global25

Genetic ancestry online store (to be updated regularly)

Thursday, September 22, 2016

Orcadians, the K15 and the calculator effect


Judging by the Google search terms that are bringing traffic to this and my other blogs, a total newb to the scene is analyzing the Orcadian samples from the HGDP at GEDmatch with my K15 test.

Please keep in mind that you will not see coherent results for many of the academic samples available online when using my tests.

That's because I used these samples to source the allele frequencies for the tests. As a result, their ancestry proportions will often be very different from those of other samples from the same ethnic groups that were not used in this way.

I call this problem the calculator effect, and it's described in my blog posts at the links below:

Beware the "calculator effect"

Ancient genomes and the calculator effect

The calculator effect is a very serious problem for most tests, but as far as my tests are concerned, it doesn't affect anyone except the above mentioned academic samples.

Wednesday, July 22, 2015

Marker overlap and test accuracy


A few people are asking me about the effects of marker overlap or genotype rate on test accuracy. Logic dictates that the better the overlap, the more accurate the results, but this isn't strictly true. Here's what I've learned over the years:

- accuracy doesn't necessarily improve with higher marker overlap, it improves (up to a certain point) with more markers

- you will still see accurate results using as little as 25,000 SNPs, as long as the test doesn't suffer from any serious problems

- poorly designed tests, such as those based on less than 1000 reference samples, always produce garbage results no matter what the marker overlap

In other words, a well designed test based on 200,000 SNPs will produce very accurate results for a genotype file with a marker overlap of 50%. On the other hand, another well designed test, based on just 50,000 SNPs, is likely to produce less accurate results for a genotype file with a marker overlap of 100%.

So how can you tell a well designed test from a poorly designed one? It's easy, just have a look at the results they're producing for people with less complex ancestry. For instance, ask a Lithuanian, Swede or Pole what they're seeing at the top of their oracles. Is the Swede seeing Swedish or, say, German? If the answer is German instead of Swedish, or at least some type of Scandinavian, then the test is garbage and best ignored.

By the way, the recent Allentoft et al. paper on the ancient genomics of Eurasia includes a useful discussion on the effects of missing markers on the accuracy of both ADMIXTURE and PCA results. Refer to section 6.2 in the freely available supplementary info PDF here.

Tuesday, May 12, 2015

4mix: four-way mixture modeling in R


Thanks to Eurogenes project member DESEUK1. A zip file with the R script, instructions and a couple of data sheets is available here.

So let's model Poles as a bunch of ancient genomes from Central and Eastern Europe using output from my K8 analysis.

Copy & Paste: source('4mix.r')

Hit ENTER

Copy & Paste: getMix('K8avg.csv', 'target.txt', 'HungaryGamba_EN', 'HungaryGamba_HG', 'Karelia_HG', 'Corded_Ware_LN')

Hit ENTER

After a few seconds you should see the results...

Target = 19% HungaryGamba_EN + 14% HungaryGamba_HG + 2% Karelia_HG + 65% Corded_Ware_LN @ D = 0.0062






Obviously the script can use ancestry proportions and/or population averages from any test, provided they're formatted properly. The accuracy of the modeling will depend on the quality of the input.

Update 19/05/2015: A new version of the 4mix script that can run multiple targets is available here, courtesy of Open Genomes.

Sunday, November 30, 2014

Short clip: The making of modern Europe


Simple but, I think, very cool animation: ten ancient genomes analyzed with the Eurogenes K15. More elaborate clips are on the way.



And this is basically the same thing, but restricted to samples from Hungary.

Wednesday, July 16, 2014

Model yourself as a mixture of ancient genomes


Update 12/05/2015: 4mix: four-way mixture modeling in R

...

This is really easy and should work well for most personal genomics customers (ie. those of European ancestry and with data files from 23andMe, FTDNA and AncestryDNA).

First of all, make sure you have your Eurogenes K15 ancestry proportions from GEDmatch. Then do the following:

- download the 4 Ancestors Oracle (here)

- download the Eurogenes ancient genomes datasheet (here)

- place everything into the same directory

- double click of the 4 Ancestors Oracle icon (the big red number 4)

- select the Eurogenes K15 ancient genomes datasheet

- type your Eurogenes K15 ancestry proportions into the fields provided

- hit the go button and let it rip

I'm not sure I'm allowed to upload the 4 Ancestors Oracle online, but I couldn't find the original link, so let's assume for the time being that I am. In any case, many thanks to Alexandr Burnashev for this great tool.

You'll also find some modern populations in the datasheet. They're there so that users with ancestry from outside of Europe don't end up with ridiculous results.

Obviously, you can edit the datasheet to explore more options by removing or adding individuals and populations. A spreadsheet of Eurogenes K15 population averages is available here. The oracle settings can also be tweaked in a couple of ways to fine tune the results.

If the calculator crashes, try replacing the periods with commas in both the datasheet and your ancestry proportions.

Please keep checking this post, because I'll attempt to update the datasheet at the link above every time a new ancient genome is published and has enough markers available to be tested with the Eurogenes K15. Eventually we might end up with a tool that covers most of the continents and many periods of history and prehistory.

I've done similar analyses of a variety of ancient genomes. For instance, StoraFörvar11, or SfF11, from Mesolithic Sweden came out 3/4 La Brana-1 and 1/4 MA-1, which translates to 3/4 Western European Hunter-Gatherer (WHG) and 1/4 Ancient North Eurasian (ANE), and lines up well with results reported recently for Swedish hunter-gatherers in scientific literature. You can see the full analysis StoraFörvar11 and a couple of other ancient genomes at the links below.

Analysis of Mesolithic Swedish forager StoraFörvar11

More ancient genomes from Sweden: Pitted Ware forager Ajvide58 and TRB farm girl Gokhem2

I'm still trying to answer a whole lot of e-mails so I won't be monitoring this post for a while. But please feel free to share your results and any tips you might have in the comments below.

Saturday, December 28, 2013

EEF-WHG-ANE test for Europeans


This test attempts to fit you to the three inferred prehistoric European populations as described in this recent preprint. The relevant Excel file can be downloaded here, and all you have to do is stick your Eurogenes K13 results into the fields provided to get the EEF-WHG-ANE ancestry proportions. A modified version for Near Eastern and Southeast European users can be accessed here.

The test is based on correlations between the average levels of the Eurogenes K13 and the ancient components among selected European populations. Below is a brief description of each of the ancient components.

Early European Farmer (EEF): apparently this is a hybrid component, the result of mixture between "Basal Eurasians" and a WHG-like population possibly from the Balkans. It's based on a 7500 year old Linearbandkeramik (LBK) sample from Stuttgart, Germany, but today peaks at just over 80% among Sardinians.

West European Hunter-Gatherer (WHG): this ancestral component is based on an 8,000 year old forager from the Loschbour rock shelter in Luxembourg, who belonged to Y-chromosome haplogroup I2a1b. However, today the WHG component peaks among Estonians and Lithuanians, in the East Baltic region, at almost 50%.

Ancient North Eurasian (ANE): this is the twist in the tale, a component based on a 24,000 year old Upper Paleolithic forager from South Central Siberia, belonging to Y-DNA R*, and known as Mal'ta boy or MA-1. This component was very likely present in Southern Scandinavia since at least the Mesolithic, but only seems to have reached Western Europe after the Neolithic. At some point it also spread into the Americas. In Europe today it peaks among Estonians at just over 18%, and, intriguingly, reaches a similar level among Scots. However, numbers weren't given in the paper for Finns, Russians and Mordovians, who, according to one of the maps, also carry very high ANE, but their results are confounded by more recent Siberian (ENA) admixture.

It's important to note that this test is only likely to be accurate for people of European ancestry, and indeed only those who aren't outliers from the main European clines of genetic diversity. For details of what that means, please consult the aforementioned paper. However, roughly speaking, if you're of European origin and don't score more than 3% East Asian, Siberian, Amerindian, South Asian, Oceanian, Northeast African and/or Sub-Saharan admixture, then you should get a coherent result. Users from the Near East and Caucasus should run the version specifically designed for them, while those from Southeastern Europe might find it useful to run both calculators and then compare the results.

Thanks to project member DESUK1 for putting this together at such short notice, and MfA for the modified version. Please post your results in the comments section below and state your ancestry when you do. This will help us to improve the accuracy of the test. My results make perfect sense, considering my Polish ancestry.

EEF 42.012706
WHG 40.52702615
ANE 17.46026785

This is my interpretation of who these components represent. Of course, this model might change when more ancient genomes are analyzed.

WHG and WHG/ANE: indigenous European hunter-gatherers
EEF: mixed European/Near Eastern Neolithic farmers
ANE/WHG: Proto-Indo-European invaders from the Eastern European steppe
ENA/ANE: early Uralics from the Volga-Ural region
EEF/WHG/ANE: late Indo-Europeans (ie. Celts, Germanics and Slavs)

Citation...

Iosif Lazaridis, Nick Patterson, Alissa Mittnik, et al., Ancient human genomes suggest three ancestral populations for present-day Europeans, bioRxiv, Posted December 23, 2013, doi: 10.1101/001552

See also...

Ancient human genomes suggest (more than) three ancestral populations for present-day Europeans

Ancient North Eurasian (ANE) levels across Asia