subsample.gen | R Documentation |
Resampling routine to correct for unequal sampling / calculate allelic richness in comparison of allelic richness between two populations~
subsample.gen(genotypes, nboots = 1000, nsamps, loci, verbose = FALSE)
genotypes |
Genind object of genotypes (adegenet package) for the reference popoulation. |
nboots |
Number of bootstrap resamples. Default=1000. |
nsamps |
Number of samples to use in each subsample - equal to the sample size in the compared population. |
loci |
Subset of loci. Vector of generic locus names in the genotypes object c("L01","L03",...) common in both the reference and the compared populations. |
verbose |
If |
Data frame with parameter means over all subsamples. A: allelic diversity SEA: standard error of A He: expected deterozygosity SEHe: standard error of expected heterozygosity Ho: observed deterozygosity SEHo: standard error of observed heterozygosity
SLOW! Be patient. Produces a lot of text as I don't know how to stop the summary function of adegenet package to print out every iteration.
Tomaž Skrbinšek tomaz.skrbinsek@gmail.com
Skrbinšek T, Jelenčič M, Waits LP, Potočnik H, Kos I, Trontelj P(2012) Using a reference population yardstick to calibrate and compare genetic diversity reported in different studies: an example from the brown bear. Heredity, In press.
Leberg PL (2002) Estimating allelic richness: Effects of sample size and bottlenecks. Molecular Ecology, 11, 2445-2449.
runall
, genind
# For examples, see vignette
vignette("resamplediversity")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.