| rgeno {updog} | R Documentation |
Simulate individual genotypes from one of the supported flexdog models.
Description
This will simulate genotypes of a sample of individuals drawn from one of the populations supported by
flexdog. See the details of flexdog for the models allowed. These genotype
distributions are described in detail in Gerard and Ferrão (2020).
Usage
rgeno(
n,
ploidy,
model = c("hw", "bb", "norm", "f1", "s1", "flex", "uniform"),
allele_freq = NULL,
od = NULL,
p1geno = NULL,
p2geno = NULL,
pivec = NULL,
mu = NULL,
sigma = NULL
)
Arguments
n |
The number of observations. |
ploidy |
The ploidy of the species. |
model |
What form should the prior take? See Details in |
allele_freq |
If |
od |
If |
p1geno |
Either the first parent's genotype if |
p2geno |
The second parent's genotype if |
pivec |
A vector of probabilities. If |
mu |
If |
sigma |
If |
Details
List of non-NULL arguments:
model = "flex":pivecmodel = "hw":allele_freqmodel = "f1":p1genoandp2genomodel = "s1":p1genomodel = "uniform":no non-
NULLargumentsmodel = "bb":allele_freqandodmodel == "norm":muandsigma
Value
A vector of length n with the genotypes of the sampled individuals.
Author(s)
David Gerard
References
Gerard, D., Ferrão, L. F. V., Garcia, A. A. F., & Stephens, M. (2018). Genotyping Polyploids from Messy Sequencing Data. Genetics, 210(3), 789-807. doi:10.1534/genetics.118.301468.
Gerard, David, and Luís Felipe Ventorim Ferrão. "Priors for genotyping polyploids." Bioinformatics 36, no. 6 (2020): 1795-1800. doi:10.1093/bioinformatics/btz852.
Examples
## F1 Population where parent 1 has 1 copy of the referenc allele
## and parent 2 has 4 copies of the reference allele.
ploidy <- 6
rgeno(n = 10, ploidy = ploidy, model = "f1", p1geno = 1, p2geno = 4)
## A population in Hardy-Weinberge equilibrium with an
## allele frequency of 0.75
rgeno(n = 10, ploidy = ploidy, model = "hw", allele_freq = 0.75)