subsample.gen: Correct for unequal sampling / calculate allelic richness

View source: R/functions.R

subsample.genR Documentation

Correct for unequal sampling / calculate allelic richness

Description

Resampling routine to correct for unequal sampling / calculate allelic richness in comparison of allelic richness between two populations~

Usage

subsample.gen(genotypes, nboots = 1000, nsamps, loci, verbose = FALSE)

Arguments

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 TRUE, print summary for each iteration. Can be very verbose.

Value

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

Note

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.

Author(s)

Tomaž Skrbinšek tomaz.skrbinsek@gmail.com

References

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.

See Also

runall, genind

Examples

# For examples, see vignette
vignette("resamplediversity")

romunov/resamplediversity documentation built on July 31, 2023, 2:23 a.m.