Applied Population Genetics

Simulating Random Populations

The gstudio package has routines that can be used to simulate random populations. I’ve added these to facilitate more exploratory data analysis. Here is how you can use them.

Collab <- Slack + R

I just ran across an R package that allows you to integrate your R workflow into the Slack environment. Really cool. Below I show how to set it up and to post output of your analyses to slack channels for your team as well as to register notifications.


The program STRUCTURE is an ubiquitous feature of many population genetic studies these days—if it is appropriate is another question. Today, while covering model based clustering in population genetics, we ran into a problem where STRUCTURE was unable to run and the OS said it was Corrupted and should be thrown away. Jump below for our fix, it really is an easy one.

Cropping Rasters

It is often the case that the raster we are working with is not the exact size of the area from which our data are collected. It is a much easier situation if the raster is larger than the area than if you need to stitch together two raster Tiles to get all your data onto one extent. In my doctoral thesis work, the area of the southern Ozark mountains that my sites were in was not only straddling a boundary between existing rasters, it was also at the boundary of two UTM zones! What a pain.

Inbreeding (Positive Assortative Mating based on Genotype)

Here are the slides for the lecture on inbreeding.

Effective Population Size

How big is the data set you are analyzing? Apparently it depends on how you count…

Chapter 2: Hardy-Weinberg Equilibrium

Here are the online presentations for Chapter 2: Hardy Weinberg Equilibrium from the upcoming text, Applied Population Genetics. More information on this text can be found here.

A quick GGMap Tutorial

Chapter 1: Learning R

Here are the presentations for Chapter 1: Learning R from the upcoming text Applied Population Genetics. More information on this text can be found here.