PCA, STRUCTURE, LAI, DATES, IBD
Here are a couple of ideas for projects you could also work on to practice simulations and modeling. Similarly to mini projects 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. But, this is a workshop, and we can definitely come up with ideas to tackle these together.
Robustness of STRUCTURE / ADMIXTURE
STRUCTURE, ADMIXTURE, and other genetic clustering methods are extremely popular across the field of population genomics. However, it has been shown that very different models can produce exactly the same STRUCTURE / ADMIXTURE clustering patterns (see Figure 2 in that study, and an accompanying post on this paper). As a result, we have to be quite careful with the interpretation of the results.
Here are a few suggestions on what you could do in this study depending on your level of familiarity and prior experience:
1. Have you used one of these genetic clustering methods?
Write a slendr model corresponding to the demographic history you’ve inferred, then try to experiment with its parameters or topological structure in a way following the approach the authors took in this study. How robust is your inference when you repeat it on these simulated models?
2. Are you thinking about using one of these genetic clustering methods?
Write a simulation script for each of the three model topologies in the figure linked above. Follow the methodology of the paper and try to replicate their results, including modifying the three models to convince yourself of the conclusions.
Tip: How to convert data
Note that slendr doesn’t produce PLINK files yet, but we do have ts_vcf() and ts_eigenstrat() conversion functions (see this exercise from our workshop for a quick overview). You can use these functions to produce outputs from your simulations converted from the original tree sequence, then do the necessary PLINK conversion to be able to run ADMIXTURE or STRUCTURE.
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!