You will need to have run the first two recipes and should have the hapmap10_auto_noofs_2.gp and hapmap10_auto_noofs_2.pops files downloaded. We will also use the metadata file that we downloaded in the first recipe. For the type of comparison that we will perform here, it's important to assure that there is little relatedness among sampled individuals, so we want to remove the offspring at the very least. For efficiency, we will use only chromosome 2, subsampled at 10 percent.
For this code to work, you will need to install Genepop from http://kimura.univ-montp2.fr/~rousset/Genepop.htm or, with Anaconda Python, use conda install -c bioconda genepop. We will use the interface provided by Biopython to execute Genepop and parse ...