pred_mar_eff: Predict marker effects in a training population

View source: R/prediction.R

pred_mar_effR Documentation

Predict marker effects in a training population

Description

Predict marker effects in a training population

Usage

pred_mar_eff(
  genome,
  training.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.

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.

Value

The training.pop with predicted marker effects.

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
# Predict marker effects
training.pop <- pred_mar_eff(genome = genome, training.pop = founder_pop)
                     

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