Tutorial: Demographic Inference

Ekaterina (Katya) Noskova

29 June 2023

About myself

Junior researcher
UniFR
PhD student
ITMO University

Education

2016 - BSc, Applied Mathematics, St. Petersburg, Russia.
2018 - MSc, Algorithmic Bioinformatics, St. Petersburg, Russia.
Present - PhD, Computer Science, St. Petersburg, Russia.

Current research

Currently live in: Zürich, Switzerland

Junior Researcher, Prof. Wegmann's group,
University of Fribourg, Fribourg, Switzerland.

PopSim consortium

Demographic History

Demographic History

Demographic History

 Visualization

drawn by demes [Gower et al. 2022]

Demographic Inference

Demographic Inference

Starting Tutorial

Starting Tutorial

  • Open the website for the tutorial that was sent by email
    • Login: congen2023-user
    • Password: congen2023-password
  • Go to:
    GADMA_workshops/ConGen2023_tutorial_demographic_inference,
    select and duplicate: Ekaterina_Noskova_tutorial.ipynb,
    open your copy

All those materials (except data) are available in the repository: https://github.com/noscode/GADMA_workshops

Data

  • The link to data was sent by email
    • File clouded_leopard.vcf should be copied to data/ directory
    • File example.ped should be copied to outputs/gone_analysis/ directory
    • File example.map should be copied to outputs/gone_analysis/ directory
  • File clouded_leopard.vcf is the main data file, files example.ped and example.map were built from it (how to do it is described in the tutorial's .ipynb file).

Alelle Frequency Spectrum

Allele Frequency Spectrum

Derived allele is a new allele formed by mutation.

Allele frequency spectrum (AFS) of P populations is the joint distribution of the derived allele frequencies of a given set of loci (SNP’s) across P populations.

Allele Frequency Spectrum Example

Reference: ATACGTC
1 population 2 population
1 individual ATCCGAC ACACTTC
2 individual ACACGTC ACACGTT
3 individual GCACGTC
Position 1 2 3 4 5 6 7
Der. allele G C C - T A T
Freq. in 1 pop. 1 2 1 - 0 1 0
Freq. in 2 pop. 0 2 0 - 1 0 1
$$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize 1 \\ \scriptsize 0 \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize 0 & \scriptsize 1 & \scriptsize 2 \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=3}{1} \\ \scriptsize 0 \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=3}{0} & \scriptsize 1 & \scriptsize 2 \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=4}{2} \\ \scriptsize 1 \\ \scriptsize 0 \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize 0 & \scriptsize 1 & \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=4}{2} \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=5}{1} \\ \scriptsize 0 \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 2 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=5}{0} & \scriptsize 1 & \scriptsize 2 \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize 1 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=7}{0} \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 2 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize 0 & \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=7}{1} & \scriptsize 2 \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=8}{1} \\ \scriptsize 0 \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 3 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=8}{0} & \scriptsize 1 & \scriptsize 2 \end{matrix} \\ \end{matrix} $$ $$ A = \begin{matrix} \scriptsize 3 \\ \scriptsize 2 \\ \scriptsize 1 \\ \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=9}{0} \\ \\ \end{matrix} \begin{matrix} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 3 & 0 & 0 \\ 0 & 2 & 0 \end{pmatrix} \\ \begin{matrix} \scriptsize 0 & \scriptsize \htmlData{class=fragment highlight-current-blue, fragment-index=9}{1} & \scriptsize 2 \end{matrix} \\ \end{matrix} $$

Demographic Inference Tools

Demographic Inference Tools

GADMA — Global search Algorithm for Demographic Model Analysis

  • Several likelihood engines ($\partial a \partial i$, moments, momi2, momentsLD)
  • Common interface
  • Effective global optimization

GADMA's useful feature: 

New Model Specification

GADMA's useful feature: 

New Model Specification

New model in GADMA that is specified only by the number of epochs.

Available up to three populations

Flexible Dynamics

New model in GADMA has flexible dynamics of population size change.

Population dynamic can be:

  • Constant (sudden change)
  • Linear
  • Exponential

Additional controls

Thank you!

Slides:
ekaterina.e.noskova@gmail.com                       enoskova.me