1. Design of functions
The following four R functions were designed for SNP datasets, such as those produced by reduced-representation technologies (DArT, RAD or ddRAD; Kilian et al. 2012; Baird et al. 2008; Davey & Blaxter 2010; Peterson et al. 2012). The functions require the data to be imported toR as a genlight object (adegenet ; Jombart & Ahmed 2011) so that individual genotypes for each locus are scored as ‘0’ (homozygous reference), ‘1’ (heterozygous), and ‘2’ (homozygous alternate). The functions make use of the information stored in genlight object’s ‘ind.metrics’ and are available at github.com/drobledoruiz/conservation_genomics.