text: individuals form a clade with respect to reference groups. The reason 
  why this is a principled approach despite the 1000GP groups post-dating 
  the ancient individuals is that if a group of ancient individuals are truly 
  homogeneous, they will be so also with respect to later individuals. 
  
  **Code availability**
  Twigstats is freely available under an MIT licence through GitHub 
  (https://github.com/leospeidel/twigstats), and detailed documenta- 
  tion, as well as example data, is available at https://leospeidel.github. 
  io/twigstats/. The code has also been deposited at Zenodo (https:// 
  zenodo.org/records/13833120)76. All scripts to reproduce simulations, 
  and to run Relate on imputed ancient genomes, and downstream 
  analyses, including computation of*f*-statistics and running qpAdm 
  models, are available through GitHub (https://github.com/leospeidel/ 
  twigstats_paper). 
  We then define clusters by running UPGMA (unweighted pair group 
  method with arithmetic mean) on −log10[*P*values] obtained from 
  qpwave between all pairs of individuals and cut the resulting dendro- 
  gram at a height corresponding to a*P*value of 0.01. We then further 
  subdivide clusters by requiring all samples to be within 500 years of 
  the mean cluster age. 