PCA, LAI, DATES, IBD
Here are a couple of ideas for smaller projects you could also work on to practice simulations and modeling. Similarly to the case studies on STRUCTURE / ADMIXTURE and ADMIXTOOLS, they are all revolving around building models to generate ground-truth data for use in:
benchmarking methods to decide which is the most appropriate for your research problem,
validating the robustness of results from methods you already obtained,
developing simulation-based inference pipelines,
all using external software (rather than slendr-based statistics).
Unlike the many exercises in our tutorial sessions, I can’t provide the questions for you (let alone the answers). But, this is a workshop, and we can definitely come up with ideas to tackle these together.
PCA
PCA is an incredibly popular method in population genetics, but there’s been quite a bit of controversy surrounding it, with a highly combative paper criticizing the application of PCA in all of population genetics, almost to a point of claiming that none of the published results can be really trusted.
As an example, take a look at Figure 5 in the paper, demonstrating that an Indian population can be arbitrarily placed in proximity to Europeans, East Asians, and Africans, simply by tweaking the sample sizes of all groups before they applying PCA on their genotype data.
If you’re curious about this issue, you have now all the tools at your disposal to be able to use slendr to evaluate patterns and (un)expected behavior of PCA in the light of the criticisms in the paper.
Things you could take a look into are:
How do imbalanced sample sizes from different populations distort the shape of a PCA compared to equal sample sizes?
How does access to ancient DNA samples (or lack of ancient DNA samples) affect the signal of admixture in a PCA? What other demographic factors could lead us to false ideas about admixture in a PCA?
Under which conditions does projection of ancient DNA samples on a PCA based on modern DNA reference panel lead to misleading results?
How is a phylogenetic tree structure in general reflected in a shape of PCA?
If you’d like an inspiration, you can take a look at a work-in-progress chapter about simulating PCA (but beware that it’s still unfinished and not proofread!). I suggest working with the convenient PCA R package smartsnp.
Local ancestry inference (LAI), DATES dating, and IBD segments
In the chapter on simulating haplotypes you’ve learned about the slendr functions ts_tracts() and ts_ibd(), which make it possible to obtain perfect, exact, truth about admixture tracts and haplotype sharing from customized simulations.
You’ve also learned how easy it is to generate VCF files from these simulations. This opens up the possibility to generate genomic data from all sorts of models relevant for your research questions and use them for all sorts of applications briefly summarized in points 1.-3. at the beginning of this chapter.
If you have software for LAI (such as MOSAIC, FLARE, RFMix, etc.), admixture dating (DATES), or IBD inference (IBDSeq, IBIS, AncIBD), it’s now very easy for you to connect simulations with this kind of external software—the sky is the limit!