Extended Data Fig. 5: Three examples of applying Twigstats.
From: High-resolution genomic history of early medieval Europe

a Fine-scale population structure simulation emulating ref. 39 (see Methods for simulation details). First two principal components are computed from pairwise outgroup f3 statistics on the genotypes directly and on Relate trees inferred from the 50 target individuals. Labels in plots show the average coordinates of members of that population. For each panel, we calculate a separation index (SI) as in39, which we define as the proportion of individuals for which the closest individual (by the Euclidean distance in PC space) is in the same population. b, Fine-scale genetic structure in Neolithic Europe quantified using an MDS calculated on a symmetric matrix that contains all pairwise outgroup f3 statistics (outgroup: YRI) between individuals. These are either calculated directly on genotypes or calculated using Twigstats on Relate genealogies with a cutoff of 1000 generations. Individuals were selected by filtering based on Steppe and Western Hunter-gatherer ancestry (Methods). c, Admixture proportions inferred using qpAdm with three distal sources of Western Hunter-gatherers, early European farmers, and Yamnaya Steppe people46. We show results for Twigstats-5000. Bias is measured as the difference in admixture proportions obtained from Twigstats-5000 and all SNPs, and we show standard errors of the latter. We plot two standard errors around the mean. The standard error improvement shown is one minus the ratio of standard errors obtained from Twigstats-5000 and using all SNPs. d, Neanderthal admixture proportion inferred using an f4-ratio of the form f4(outgroup, Altai, target, Mbuti)/f4(outgroup, Altai, Vindija, Mbuti). We compute these on genetic variation data from the Simon’s Genome Diversity Project (SGDP)75 and use the high-coverage Altai and Vindija Neanderthals78,79. We also compute equivalent f4-ratio statistics in a simulation emulating Neanderthal admixture 50,000 years ago and a second simulation involving no Neanderthal admixture but deep structure that leads to a similar inference unless deep coalescences are ignored by Twigstats. We plot two standard errors around the mean.