View source: R/family_genetic_variance.R
pred_genvar | R Documentation |
Uses the expected genetic variance formula and marker effects to predict the genetic variance and correlation in potential crosses.
pred_genvar(
genome,
pedigree,
training.pop,
founder.pop,
crossing.block,
method = c("RRBLUP", "BRR", "BayesA", "BL", "BayesB", "BayesC"),
n.iter = 1500,
burn.in = 500,
thin = 5,
save.at = ""
)
genome |
An object of class |
pedigree |
A |
training.pop |
An object of class |
founder.pop |
An object of class |
crossing.block |
A crossing block detailing the crosses to make. Must be a
|
method |
The statistical method to predict marker effects. If |
n.iter, burn.in, thin |
Number of iterations, number of burn-ins, and thinning, respectively. See
|
save.at |
See |
# Simulate a genome
n.mar <- c(505, 505, 505)
len <- c(120, 130, 140)
genome <- sim_genome(len, n.mar)
# Simulate a quantitative trait influenced by 50 QTL
qtl.model <- matrix(NA, 50, 4)
genome <- sim_gen_model(genome = genome, qtl.model = qtl.model,
add.dist = "geometric", max.qtl = 50)
# Simulate the genotypes for 8 founders
founder.pop <- sim_founders(genome = genome, n.str = 8)
training.pop <- sim_phenoval(founder.pop, h2 = 0.8)
# Generate a crossing block with 5 crosses
cb <- sim_crossing_block(parents = indnames(founder.pop), n.crosses = 5)
# Create a pedigree with 100 individuals selfed to the F_3 generation
ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = 2)
pred_genvar(genome = genome, pedigree = ped, training.pop = training.pop,
founder.pop = founder.pop, crossing.block = cb)
## If two traits are present, the genetic correlation is calculated
# Simulate two quantitative traits influenced by 50 pleiotropic QTL
qtl.model <- replicate(2, matrix(NA, 50, 4), simplify = FALSE)
genome <- sim_multi_gen_model(genome = genome, qtl.model = qtl.model, corr = 0.99,
prob.corr = cbind(0, 1), add.dist = "normal")
# Simulate the genotypes for 8 founders
founder.pop <- sim_founders(genome = genome, n.str = 8)
training.pop <- sim_phenoval(founder.pop, h2 = 0.8)
pred_genvar(genome = genome, pedigree = ped, training.pop = training.pop,
founder.pop = founder.pop, crossing.block = cb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.