Population Genetic Statistics for the DIPnet dataset
Added April 20, 2015 by Eric Crandall
These scripts are intended for use with the DIPnet dataset that will be finished on May 1, 2015. We plan to convert these scripts eventually into an R package that will talk with the DIPnet database as stored in the FIMS framework to calculate multispecies population genetic statistics. The way it currently works is that all the functions are stored in DIPnet_Stats_Functions.R
and a script for driving those functions is in DIPnet_Stats_Script.R
.
You'll want to change the paths in config_example.R
to values that point to local versions of the DIPnet DB and spatial DB and then save that file as config.R
. Similarly, you can create an empty directory "/output" save whatever results you get to it. These files won't be synced (pushed or pulled) with GitHub because they are included in the .gitignore file.
There are major functions for looping over the whole database and calculating:
-
Genetic diversity statistics
- Unique Haplotype Number
- Haplotype Diversity
- Shannon-Wiener Diversity
- Effective number of haplotypes
- Local FST
- Nucleotide Diversity (per site and per locus)
- Watterson's ThetaS
- Tajima's D
- Coverage (Chao and Jost 2012)
- Coverage standardized haplotype diversity
-
Genetic structure statistics
- Nei's Fst
- Nei's Gst
- Hedrick's G'st
- Jost's D
- Weir & Cockerham's Theta
- Excoffier et al. PhiST
- Chi-Square Test of Population Differentiation
- Nei's Da
Hierarchical Structure using AMOVA (up to 3 levels currently supported)