View source: R/mppop_predict.R
mppop.predict | R Documentation |
This function returns predictions of the genotypic mean, genetic variance, usefulness criterion (superior progeny mean) in a set of multi-parent populations using marker effects and a genetic map. If more than two traits are specified, the function will also return predictions of the genetic correlation in the population and the correlated response to selection.
mppop.predict(
G.in,
y.in,
map.in,
crossing.table,
parents,
tail.p = 0.1,
self.gen = Inf,
DH = FALSE,
model = c("rrBLUP", "BayesC"),
n.core = 1
)
mppop_predict2(
M,
y.in,
marker.effects,
map.in,
crossing.table,
tail.p = 0.1,
self.gen = Inf,
DH = FALSE,
model = c("rrBLUP", "BayesC"),
n.core = 1
)
G.in |
See |
y.in |
A data frame of phenotypic means. The first column should include the entry name and
subsequent columns should include phenotypic values. Ignored if |
map.in |
See |
crossing.table |
See |
parents |
See |
tail.p |
See |
self.gen |
The number of selfing generations in the potential cross. Can be an integer or |
DH |
Indicator if doubled-haploids are to be induced after the number of selfing generations indicated by
|
model |
See |
n.core |
Number of cores for parallelization; only works on a Linux or Mac OS operating system. |
M |
A Matrix of marker genotypes of dimensions |
marker.effects |
A data frame of marker effects. The first column should include the marker name and subsequent columns should include the marker effects. |
mppop_predict2()
:
# Load data
data("phenos")
data("genos")
data("map")
# Create 10, 4-way parent combinations
crosses <- as.data.frame(
matrix(data = sample(row.names(genos), 40), nrow = 10, byrow = TRUE,
dimnames = list(NULL, paste0("parent", 1:4))),
stringsAsFactors = FALSE)
# Format the genotype data
G_in <- as.data.frame(cbind( c("", row.names(genos)), rbind(colnames(genos), genos)) )
# Run predictions
pred_out <- mppop.predict(G.in = G_in, y.in = phenos, map.in = map,
crossing.table = crosses, self.gen = 6)
# Load data
data("phenos")
data("genos")
data("map")
# Create 25, 4-way parent combinations
crosses <- as.data.frame(
matrix(data = sample(row.names(genos), 25 * 4), nrow = 25, byrow = TRUE,
dimnames = list(NULL, paste0("parent", 1:4))),
stringsAsFactors = FALSE)
# Run predictions
pred_out <- mppop_predict2(M = genos, y.in = phenos, map.in = map,
crossing.table = crosses, self.gen = 6)
# Many more possible crosses - this takes a while
## Not run:
crosses <- as.data.frame(t(combn(x = sample(row.names(genos), 20), m = 4)), stringsAsFactors = FALSE)
pred_out <- mppop_predict2(M = genos, y.in = phenos, map.in = map,
crossing.table = crosses, self.gen = 6)
## End(Not run)
## Pass marker effects instead of phenotypes
# First calculate marker effects
phenos2 <- as.matrix(phenos[,-1]); row.names(phenos2) <- phenos[,1]
phenos2 <- phenos2[row.names(genos),]
mar_eff <- apply(X = phenos2, MARGIN = 2, FUN = function(y) mixed.solve(y = y, Z = genos)$u)
marker_effects <- data.frame(marker = row.names(mar_eff), mar_eff, stringsAsFactors = FALSE)
pred_out <- mppop_predict2(M = genos, marker.effects = marker_effects, map.in = map,
crossing.table = crosses, self.gen = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.