diff --git a/docs/_variables.yml b/docs/_variables.yml new file mode 100644 index 00000000..9ee32a89 --- /dev/null +++ b/docs/_variables.yml @@ -0,0 +1,6 @@ +exercises: + simulation: + baseurl: https://percyfal.github.io/pgip-jlite/lab + howto: exercises/simulation/index.html#sec-exercise-simulation-howto + coalescent: exercises/simulation/index.html#sec-exercise-simulation-coalescent + msprime: exercises/simulation/index.html#sec-exercise-simulation-msprime diff --git a/docs/about.qmd b/docs/about.qmd index 3ce2201c..2f7e8c87 100644 --- a/docs/about.qmd +++ b/docs/about.qmd @@ -32,6 +32,14 @@ format: [Jason Hill](https://nbis.se/about/staff/jason-hill) ::: +::: {.organisers-child} + +![](assets/profile/andre-soares.png) + +[André Soares](https://nbis.se/about/staff/andre-soares) + +::: + ::: ## Venue diff --git a/docs/assets/profile/andre-soares.png b/docs/assets/profile/andre-soares.png new file mode 100644 index 00000000..55843635 Binary files /dev/null and b/docs/assets/profile/andre-soares.png differ diff --git a/docs/exercises/index.qmd b/docs/exercises/index.qmd index fa4b8fde..4fb7dcc0 100644 --- a/docs/exercises/index.qmd +++ b/docs/exercises/index.qmd @@ -5,10 +5,10 @@ description: "List of all exercises" listing: type: grid grid-columns: 4 - fields: [image, title, subtitle, author] + fields: [title, subtitle, author] sort: false contents: - - test/test.ipynb + - simulation/index.qmd date: "" toc: false sidebar: false diff --git a/docs/exercises/simulation/index.qmd b/docs/exercises/simulation/index.qmd new file mode 100644 index 00000000..ddc8d57b --- /dev/null +++ b/docs/exercises/simulation/index.qmd @@ -0,0 +1,31 @@ +--- +title: "Introduction to simulation" +author: + - "Per Unneberg" +format: html +--- + +::: {.callout-note} + +{{< meta date >}}: The simulation exercises are currently hosted at +[{{< var exercises.simulation.baseurl >}}/index.html]({{< var +exercises.simulation.baseurl >}}/index.html). The repository will +shortly be moved to the NBIS github organization. + +::: + +## Instructions {#sec-exercise-simulation-howto} + +Start by going through the [HOWTO]({{< var +exercises.simulation.baseurl >}}?path=HOWTO.ipynb) + +## 1. Introduction to the coalescent {#sec-exercise-simulation-coalescent} + +Work through the [introduction to the coalescent]({{< var +exercises.simulation.baseurl >}}?path=coalescent.ipynb) workbook. + +## 2. Introduction to msprime {#sec-exercise-simulation-msprime} + +Work through the [introduction to msprime]({{< var +exercises.simulation.baseurl >}}?path=simulation_with_msprime.ipynb) +workbook. diff --git a/docs/program.qmd b/docs/program.qmd index a5e1896c..98c536d4 100644 --- a/docs/program.qmd +++ b/docs/program.qmd @@ -3,22 +3,79 @@ title: "Program" toc: false date: "" sidebar: false +engine: knitr format: html: number-sections: false --- -Course program: +The aim of this workshop is to provide an introduction to commonly +used methods in population genomics. As the focus of the course is on +hands-on work, the topics have been designed to cover the fundamental +analyses that are common in many population genomics studies. The +course consists of lectures and exercises, with a focus on the +practical aspects of analyses. Whereas lectures introduce some +background theory, their primary aim is to set the stage for +accompanying exercises. -- introduction to the coalescent and simulations -- variant calling and variant filtering -- describing genetic diversity -- population structure and admixture -- selection scans +## Covered topics + +- Foundations of population genetics +- Introduction to simulation and the coalescent +- Basics of variant calling +- Variant filtering and sequence masks +- Characterization and intepretation of DNA sequence variation +- Calculation and interpretation of summary statistics from variation + data +- Investigating population structure with admixture modelling and + principal component analyses +- Demographic modelling using sequentially Markovian coalescent models and linkage disequlibrium +- Selection scans + +## Learning objectives + +Upon completion of this course, you will be able to: + +- describe the different forces of evolution and how they influence + genetic variation +- understand and interpret genealogical trees and how they relate to + genetic variation data +- describe the basics of the coalescent +- perform simple coalescent simulations with msprime +- run simple SLiM forward simulation models +- describe and run the steps of a variant calling pipeline, including + quality control of raw reads, read mapping, and variant calling +- know how and when to filter raw variant calls using manual coverage + filters +- describe and calculate nucleotide diversity from variation data +- analyze population structure with admixture modelling and + dimensionality reduction methods +- perform demographic modelling with sequential Markovian coalescent + models +- describe methods that identify regions undergoing adaptation and + selection +- run selection scans, score identified regions and interpret findings + in the context of genome annotations + +## Requirements + +- Basic knowledge in R or Python +- Basic knowledge of variant calling, or the equivalent of NBIS course + "Introduction to Bioinformatics using NGS data" +- Basic knowledge of population genetics +- Basic understanding of frequentist statistics +- A computer + +Desirable: + +- Experience with analysis of NGS and other omic data ## Preparation -### Readings +### Suggested readings + +Although not required, it is recommended to briefly go through the +following papers (in particular @fuller_PopulationGeneticsCoral_2020): - @fuller_PopulationGeneticsCoral_2020 - @johri_RecommendationsImprovingStatistical_2022 @@ -34,3 +91,83 @@ the exercises. You can apply for an account Look at , in particular for information on how to connect to and work on uppmax. + +### Software installation + +::: {.callout-important} + +Instructions will be updated when a full list of required programs are +available. + +::: + +In case there are issues with UPPMAX we ask you to prepare a local +backup compute environment on your computer. We will use the +[conda](https://docs.conda.io/en/latest/) package manager to install +necessary requirements from the package repositories +[bioconda](https://bioconda.github.io/) and +[conda-forge](https://conda-forge.org/). + +#### 1. Install conda + +To start using conda, follow the [quick command line install +instructions](https://docs.conda.io/en/latest/miniconda.html#quick-command-line-install) +to install the minimal conda installer +[miniconda](https://docs.conda.io/en/latest/miniconda.html). + +#### 2. Configure conda + +Configure conda to access the package repositories (see also [bioconda +usage](https://bioconda.github.io/#usage)). This will modify your +`~/.condarc` file: + +```{bash} +#| label: conda-configuration +#| echo: true +#| eval: false +conda config --add channels defaults +conda config --add channels bioconda +conda config --add channels conda-forge +conda config --set channel_priority strict +``` + +::: {.callout-important} + +Please note that the order of these commands is important! + +::: + +#### 3. Create an isolated course environment + +It is suggested you create and change to a isolated environment `pgip` +dedicated to the course: + +```{bash } +#| label: create-conda-pgip +#| echo: true +#| eval: false +conda create -n pgip python=3.10 r-base +conda activate pgip +``` + +To deactivate an environment you issue the command `conda deactivate`. + +#### 4. Install packages + +You can install packages as follows (remember to activate `pgip`!): + +```{bash } +#| label: conda-install-packages +#| echo: true +#| eval: false +conda install bcftools angsd mosdepth +``` + +::: {.callout-tip} + +If installation is slow, you can try the +[mamba](https://mamba.readthedocs.io/en/latest/mamba-installation.html) installer. + +::: + +
diff --git a/docs/schedule.qmd b/docs/schedule.qmd index 72765cc4..ef917ca5 100644 --- a/docs/schedule.qmd +++ b/docs/schedule.qmd @@ -1,7 +1,6 @@ --- title: "Schedule" toc: false -date: "" sidebar: false format: html: @@ -16,7 +15,7 @@ format:
-[**2023-08-23: Note that the schedule is tentative and subject to change!**]{.largest} +[**{{< meta date >}}: Note that the schedule is tentative and subject to change!**]{.largest}
@@ -24,56 +23,59 @@ format: ::: {.contents-table .column-body-outset} -| Topic | Time | Author | Links | -|------------------------------------------|-------------|------------|----------------------------------------------------------------------------------------------------------| -| [**6-Nov-2023 (Mon)**]{.highlight} | | | | -| Coffee and welcome | 08:30-09:00 | | | -| Introduction to PGIP | 09:00-09:30 | JH, NO, PU | | -| Population genomics in practice | 09:30-10:00 | PU | [Slides](slides/pgip/index.html) | -| Coffee break | 10:00-10:30 | | | -| Population genetics foundations | 10:30-12:00 | PU | [Slides](slides/foundations/index.html) | -| Lunch | 12:00-13:00 | | | -| Introduction to simulation | 13:00-15:00 | PU | [Slides](slides/simulation/index.html), [Exercise](https://percyfal.github.io/pgip-jlite/lab/index.html) | -| Coffee break | 15:00-15:30 | | | -| Introduction to simulation | 15:30-17:00 | PU | [Slides](slides/simulation/index.html), [Exercise](https://percyfal.github.io/pgip-jlite/lab/index.html) | -| [**7-Nov-2023 (Tue)**]{.highlight} | | | | -| Recap day 1 | 09:00-09:30 | PU | | -| Variant calling and filtering | 09:30-10:00 | PU | Slides, Exercise | -| Coffee break | 10:00-10:30 | | | -| Variant calling and filtering, continued | 10:30-12:00 | PU | Slides, Exercise | -| Lunch | 12:00-13:00 | | | -| Genetic diversity | 13:00-15:00 | PU | Slides, Exercise | -| Coffee break | 15:00-15:30 | | | -| TBA | 15:30-17:00 | | | -| [**8-Nov-2023 (Wed)**]{.highlight} | | | | -| Recap day 2 | 09:00-09:30 | PU | | -| PCA | 09:30-10:00 | | | -| Coffee break | 10:00-10:30 | | | -| Fst | 10:30-12:00 | | | -| Lunch | 12:00-13:00 | | | -| Admixture | 13:00-15:00 | | | -| Coffee break | 15:00-15:30 | | | -| f-statistics | 15:30-17:00 | | | -| | | | | -| [**9-Nov-2023 (Thu)**]{.highlight} | | | | -| Recap day 3 | 09:00-09:30 | | | -| Demography | 09:30-10:00 | | | -| Coffee break | 10:00-10:30 | | | -| Demography and psmc | 10:30-12:00 | | | -| Lunch | 12:00-13:00 | | | -| Selection | 13:00-15:00 | | | -| Coffee break | 15:00-15:30 | | | -| Selection | 15:30-17:00 | | | -| | | | | -| [**10-Nov-2023 (Fri)**]{.highlight} | | | | -| Recap | 09:00-10:00 | JH, NO, PU | | -| Coffee break | 10:00-10:30 | | | -| Guest lecture | 10:30-11:30 | | | -| Recap continued | 11:30-12:00 | JH, NO, PU | | -| Lunch | 12:00-13:00 | | | -| Guest lecture | 13:00-14:00 | | | -| Recap continued | 14:00-15:00 | JH, NO, PU | | -| Project discussion | 15:00-17:00 | | | +| Topic | Time | Author | Links | +|------------------------------------------|-------------|----------------|---------------------------------------------------------| +| [**6-Nov-2023 (Mon)**]{.highlight} | | | | +| Coffee and welcome | 08:30-09:00 | | | +| Introduction to PGIP | 09:00-09:30 | AS, JH, NO, PU | | +| Population genomics in practice | 09:30-10:00 | PU | [Slides](slides/pgip/index.html) | +| Coffee break | 10:00-10:30 | | | +| Population genetics foundations | 10:30-12:00 | PU | [Slides](slides/foundations/index.html) | +| Lunch | 12:00-13:00 | | | +| Introduction to the coalescent | 13:00-15:00 | PU | [Slides](slides/simulation/index.html) | +| | | | [Instructions]({{< var exercises.simulation.howto >}}) | +| | | | [Exercise]({{< var exercises.simulation.coalescent >}}) | +| Coffee break | 15:00-15:30 | | | +| Introduction to msprime | 15:30-17:00 | PU | [Slides](slides/simulation/index.html) | +| | | | [Exercise]({{< var exercises.simulation.msprime >}}) | +| [**7-Nov-2023 (Tue)**]{.highlight} | | | | +| Recap day 1 | 09:00-09:30 | PU | | +| Variant calling and filtering | 09:30-10:00 | PU | Slides, Exercise | +| Coffee break | 10:00-10:30 | | | +| Variant calling and filtering, continued | 10:30-12:00 | PU | Slides, Exercise | +| Lunch | 12:00-13:00 | | | +| Genetic diversity | 13:00-15:00 | PU | Slides, Exercise | +| Coffee break | 15:00-15:30 | | | +| TBA | 15:30-17:00 | | | +| [**8-Nov-2023 (Wed)**]{.highlight} | | | | +| Recap day 2 | 09:00-09:30 | PU | | +| PCA | 09:30-10:00 | | | +| Coffee break | 10:00-10:30 | | | +| Fst | 10:30-12:00 | | | +| Lunch | 12:00-13:00 | | | +| Admixture | 13:00-15:00 | | | +| Coffee break | 15:00-15:30 | | | +| f-statistics | 15:30-17:00 | | | +| | | | | +| [**9-Nov-2023 (Thu)**]{.highlight} | | | | +| Recap day 3 | 09:00-09:30 | | | +| Demography | 09:30-10:00 | | | +| Coffee break | 10:00-10:30 | | | +| Demography and psmc | 10:30-12:00 | | | +| Lunch | 12:00-13:00 | | | +| Selection | 13:00-15:00 | | | +| Coffee break | 15:00-15:30 | | | +| Selection | 15:30-17:00 | | | +| | | | | +| [**10-Nov-2023 (Fri)**]{.highlight} | | | | +| Recap | 09:00-10:00 | JH, NO, PU | | +| Coffee break | 10:00-10:30 | | | +| Guest lecture | 10:30-11:30 | | | +| Recap continued | 11:30-12:00 | JH, NO, PU | | +| Lunch | 12:00-13:00 | | | +| Guest lecture | 13:00-14:00 | | | +| Recap continued | 14:00-15:00 | JH, NO, PU | | +| Project discussion | 15:00-17:00 | | | ::: diff --git a/docs/slides/foundations/index.qmd b/docs/slides/foundations/index.qmd index 9dfc395e..73a20302 100644 --- a/docs/slides/foundations/index.qmd +++ b/docs/slides/foundations/index.qmd @@ -1199,7 +1199,7 @@ followed by success). This is the [geometric distribution](https://en.wikipedia.org/wiki/Geometric_distribution) $Ge(p)$, with parameter $p=\frac{1}{2N}$, and expected value $\frac{1}{p}={2N}$. That is, the **expected time for two chromosomes -to find a common ancester (i.e., coalesce) is $2N$ generations**. +to find a common ancestor (i.e., coalesce) is $2N$ generations**. ::: diff --git a/docs/slides/index.qmd b/docs/slides/index.qmd index cb2337ac..90777d0c 100644 --- a/docs/slides/index.qmd +++ b/docs/slides/index.qmd @@ -5,12 +5,12 @@ description: "List of all presentations" listing: type: grid grid-columns: 4 - fields: [image, title, subtitle, author] + fields: [title, subtitle, author] sort: false contents: - - introduction/index.qmd - pgip/index.qmd - foundations/index.qmd + - simultation/index.qmd date: "" toc: false sidebar: false