Description Usage Arguments Details Value Author(s) Examples
View source: R/visualizations.r
Genotype accumulation curves are useful for determining 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.
1 2 3 4 5 6 7 8 9 10 
gen 
a 
sample 
an 
maxloci 
the maximum number of loci to sample. By default,

quiet 
if 
thresh 
a number from 0 to 1. This will draw a line at that fraction of multilocus genotypes, rounded. Defaults to 1, which will draw a line at the maximum number of observable genotypes. 
plot 
if 
drop 
if 
dropna 
if 
Internally, this function works by converting the data into a
loci
object, which represents genotypes as a data
frame of factors. Random samples are taken of 1 to n1 columns of the
matrix and the number of unique rows are counted to determine the number of
multilocus genotypes in that random sample. This function does not take
into account any definitions of MLGs via mlg.filter
or
mll.custom
.
(invisibly by deafuls) a matrix of integers showing the results of each randomization. Columns represent the number of loci sampled and rows represent an independent sample.
Zhian N. Kamvar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  data(nancycats)
nan_geno < genotype_curve(nancycats)
## Not run:
# Marker Type Comparison 
# 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)
# Adding a trendline 
# Trendlines: you can add a smoothed trendline with geom_smooth()
library("ggplot2")
p < last_plot()
p + geom_smooth()
# Producing Figures for Publication 
# This data set has been pre filtered
data(monpop)
mongeno < genotype_curve(monpop)
# Here, we add a curve and a title for publication
p < last_plot()
mytitle < expression(paste("Genotype Accumulation Curve for ",
italic("M. fructicola")))
p + geom_smooth() +
theme_bw() +
theme(text = element_text(size = 12, family = "serif")) +
theme(title = element_text(size = 14)) +
ggtitle(mytitle)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.