pred_geno_val: Predict genotypic values using genomewide markers

View source: R/prediction.R

pred_geno_valR Documentation

Predict genotypic values using genomewide markers

Description

Predict genotypic values using genomewide markers

Usage

pred_geno_val(
  genome,
  training.pop,
  candidate.pop,
  method = c("RRBLUP", "BRR", "BayesA", "BL", "BayesB", "BayesC"),
  n.iter = 1500,
  burn.in = 500,
  thin = 5,
  save.at = ""
)

Arguments

genome

An object of class genome.

training.pop

An object of class pop with the elements geno and pheno_val. This is used as the training population. If marker effects are present, they are used.

candidate.pop

An object of class pop with the element geno. Genotypic values are predicted for individuals in this object.

method

The statistical method to predict marker effects. If "RRBLUP", the mixed.solve function is used. Otherwise, the BGLR function is used.

n.iter, burn.in, thin

Number of iterations, number of burn-ins, and thinning, respectively. See BGLR.

save.at

See BGLR.

Details

The training.pop must have phenotypic values associated with each entry. The mean phenotype is used as training data in the model. Genotypic data (excluding QTL) are used to predict marker effects, which are then used to predict the genotypic value of the individuals in the candidate.pop.

Value

The candidate.pop with predicted genotypic values.

Examples


# 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 of eight founders
founder_pop <- sim_founders(genome, n.str = 8)
founder_pop <- sim_phenoval(pop = founder_pop, h2 = 0.5)

ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = 2)

# Extract the founder names
parents <- indnames(founder_pop)

# Generate a crossing block with 5 crosses
cb <- sim_crossing_block(parents = parents, n.crosses = 5)

# Simulate the populations according to the crossing block
pop <- sim_family_cb(genome = genome, pedigree = ped, founder.pop = founder_pop, 
                     crossing.block = cb)
                     
# Use the founders as a training population for the progeny
pop <- pred_geno_val(genome = genome, training.pop = founder_pop, candidate.pop = pop)

## Alternatively, predict marker effects first, then predict genotypic values
## This is faster.
training.pop <- pred_mar_eff(genome = genome, training.pop = founder_pop)
pop <- pred_geno_val(genome = genome, training.pop = founder_pop, candidate.pop = pop)
                     

neyhartj/pbsim documentation built on Nov. 11, 2023, 4:07 p.m.