Calculate population genetic statistics for multi-species databases like the DIPnet database
HTML R Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
sims_for_structure_paper finish up FST and PHIST plots Apr 14, 2018
stylesheets Create master branch via GitHub Oct 7, 2016
.gitignore .DS_Store banished! Jun 9, 2015
AMOVA_figures.Rmd Transfer my AMOVA code to new markdown file Nov 4, 2015
Acanthurus_olivaceus_MGaither.csv added a function Oct 4, 2017
Arlequin_Crosscheck.R Add scripts Fabox and Arlequin cross-checking Jun 30, 2015
DIPNet_Species_Class.csv Remove T. costata from analysis, calculate effect size as requested b… Jul 18, 2018
DIPnet_Stats_Functions.R Add AIC to summarize.amova Mar 8, 2018
DIPnet_Stats_Script.R futzing with Cynthia's script. Moved "drops" out of the DIPnet script… Jan 10, 2017
DIPnet_structure_sample_PhiST_030918.Rdata Plotting IBD Mar 10, 2018
GDM_Loop.R Update GDM loop to write out results in a table Apr 5, 2017
GDM_Loop2.R Few more fixes Jul 13, 2017
GDM_for_DIPnet.R futzing with Cynthia's script. Moved "drops" out of the DIPnet script… Jan 10, 2017
NA plots of ibd Dec 6, 2017 To map a species range from a downloaded OBIS csv Jul 16, 2015 minor changes Jul 17, 2015
SSDtotal_calcs.R Adding a snippet for sorting haplotypes based on the information (SSD… May 26, 2015
VeronBarriers.csv still working on dbRDA_Loop.R Apr 27, 2017
analysis_notebook.Rmd Estimating p-values, counting zeros Jul 20, 2018
analysis_notebook.nb.html Estimating p-values, counting zeros Jul 20, 2018
best_hypothesis.csv Add best hypotheses file Jan 31, 2018
config_example.R Augment statistics reported from the AMOVA_summary function Oct 14, 2015
coverage_function_40percentSCtrigger.R Commit for a new branch on coverage Jun 8, 2015
coverage_function_UniqueHaplotypesTrigger.R Coverage: effects of recomputing select sets of gsl haplotypes by tra… May 24, 2015
coverage_script.R Commit for a new branch on coverage Jun 8, 2015
dbRDA.R Updates to dbRDA_Loop.R Apr 26, 2017
dbRDA_Loop.R Multi-regional RDA Jul 13, 2017
dbRDA_multibarrier_Loop.R Fixing up multibarrier dbRDA - make it skip models that have more pre… Jul 15, 2017 To map sampled locations for a IPDB dataset Jul 16, 2015
geome-db-output.fasta added a function Oct 4, 2017
index.html Create master branch via GitHub Oct 7, 2016
ipdb2RegionSumaries__ET.R small annotation changes Aug 31, 2016
license.txt adding a GPLv2 license May 29, 2015
mdfasta2fasta.R add a quick script to convert mdfasta to fasta in batch Jul 5, 2015
multiple_co-inertia_analysis.Rmd small annotation changes Aug 31, 2016
multiple_co-inertia_analysis.html added a small note Nov 24, 2016
overwater_distance_measurement.R Now working on overwater distance calculations Jan 17, 2017
overwater_ipdb.R Preparing to share with Eric T. Jul 18, 2017
params.json Create master branch via GitHub Oct 7, 2016
popgenDB.Rproj initial commit Apr 20, 2015

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:

  1. Genetic diversity statistics

    1. Unique Haplotype Number
    2. Haplotype Diversity
    3. Shannon-Wiener Diversity
    4. Effective number of haplotypes
    5. Local FST
    6. Nucleotide Diversity (per site and per locus)
    7. Watterson's ThetaS
    8. Tajima's D
    9. Coverage (Chao and Jost 2012)
    10. Coverage standardized haplotype diversity
  2. Genetic structure statistics

    1. Nei's Fst
    2. Nei's Gst
    3. Hedrick's G'st
    4. Jost's D
    5. Weir & Cockerham's Theta
    6. Excoffier et al. PhiST
    7. Chi-Square Test of Population Differentiation
    8. Nei's Da
  3. Hierarchical Structure using AMOVA (up to 3 levels currently supported)

May want to break these functions down into component parts (the looping and stats individually for example) to make the package more flexible.