Learn R Programming

poppr (version 1.1.5)

genotype_curve: Produce a genotype accumulation curve

Description

GA curves are useful for determinining the minimum number of loci necessary to discriminate between individuals in a population. This function will randomly sample loci without replacement and count the number of multilocus genotypes observed.

Usage

genotype_curve(gen, sample = 100, quiet = FALSE, thresh = 0.9)

Arguments

gen
a genclone or genind object.
sample
an integer defining the number of times loci will be resampled.
quiet
if FALSE, a progress bar will be displayed. If TRUE, nothing is printed to screen as the function runs.
thresh
a number from 0 to 1. This will draw a line at this fraction of multilocus genotypes.

Value

  • a matrix of integers showing the results of each randomization. Columns represent the number of loci sampled and rows represent an independent sample.

Examples

Run this code
data(nancycats)
nan_geno <- genotype_curve(nancycats)
# With AFLP data, it is often necessary to include more markers for resolution
data(Aeut)
Ageno <- genotype_curve(Aeut)

# Many microsatellite data sets have hypervariable markers
data(microbov)
mgeno <- geotype_curve(microbov)

# This data set has been pre filtered
data(monpop)
mongeno <- genotype_curve(monpop)

Run the code above in your browser using DataLab