text: **Extended Data Fig. 5 | Three examples of applying Twigstats. a**Fine-scale 
  population structure simulation emulating ref. 39 (see Methods for simulation 
  details). First two principal components are computed from pairwise outgroup 
  *f*3 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*f*3 
  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 