# Category Archives: Programming exercises

## Population genetics course resources: Demostrating the uses of coalescent simulations

A problem set making use of the coalescent simulations the students wrote for a previous exercise (see here). They use the code to calculate p-values for the observed number of segregating sites, this could be done under the HKA test … Continue reading

Posted in popgen teaching, Programming exercises, teaching | 1 Comment

## Population genetics course resources: Modeling a serial bottleneck out of Africa.

The decreasing level heterozygosity as a function of distance from Africa in human populations is one of the pieces of evidence for the (mainly) out-of-Africa model, see here for a review. This observation is consistent with a serial population bottleneck … Continue reading

Posted in popgen teaching, Programming exercises, teaching | Leave a comment

## Population genetics course resources: Coding up the coalescent time distribution.

A homework exercise coding up a coalescent model in a constant population of size N. There’s a variety of ways this could be done, the code is setup to guide a person through one of those. The code is applied … Continue reading

Posted in popgen teaching, Programming exercises, teaching | 1 Comment

## Population genetics course resources: Exercise coding a wright-fisher model of selection and drift

A homework exercise coding a wright-fisher model of selection and drift. There’s a variety of ways this could be done, the code is setup to guide a person through one of those. If you do use these scripts and figures, … Continue reading

Posted in popgen teaching, Programming exercises, teaching | Leave a comment

## Population genetics course resources: Code to simulate individuals for F statistics analysis

This code simulates inbred individuals with a particular FIS or a first generation admixed individual. The code simulates four individuals used to create the simulated individuals used in the homework exercise on F statistics. The code needs the file combined.YRICEU.out, … Continue reading

Posted in popgen teaching, Programming exercises, teaching | Leave a comment

## Population genetics course resources: F statistics

Some code to demonstrate FST, FIT, and FIS as a homework assignment in R using HapMap data from YRI Africans and CEU Europeans, and simulated individuals. The file combined.YRICEU.out contains ~10,000 SNPs (less a few, due to removing some monomorphic … Continue reading

Posted in popgen teaching, Programming exercises, teaching | 1 Comment

## Population genetics course resources: Hardy-Weinberg Eq.

Using data from the Hapmap to illustrate Hardy Weinberg equilibrium. The code and the data are below. The original inspiration for these comes from John Novembre, who made a similar plot for one of his classes. I took 10,000 SNPs … Continue reading

Posted in popgen teaching, Programming exercises, teaching | 10 Comments