Description Usage Arguments Value Examples
run_loocv
returns a data frame with predicted values.
1 2 3 |
Pheno |
A matrix with phenotypic BLUES. |
ETA |
A list with ETA-objects for BGLR. |
hybrid |
Boolean. Indicates whether prediction is done for hybrids. |
father_idx |
NULL. A numeric or integer indicating the position of the
parental ID in |
mother_idx |
NULL. A numeric or integer indicating the position of the
maternal ID in |
split_char |
Character, which splits paternal and maternals IDs in
|
trait |
Character vector with the name of the trait in |
iter |
Integer with the number of BGLR iterations. |
speed_tst |
Boolean. Indicates whether a speed test (TRUE) or actual predictions (FALSE) shall be run. |
run |
Integer specifying the current run corresponding to the predicted
genotype in |
verbose |
Boolean. Shall BGLR output be printed to the console? |
out_loc |
Path to the directory where temporary BGLR-output will be stored. |
Predicted values based on leave-one-out cross validation (LOOCV).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data("hybrid_nms", "mrna", "imp_snps", "Pheno")
geno <- vapply(strsplit(hybrid_nms, split = "_"), FUN = "[[", 1,
FUN.VALUE = character(1))
x <- imp_snps[rownames(imp_snps) %in% geno, ]
y <- mrna[rownames(mrna) %in% geno, ]
eta <- impute_eta(x = x, y = y, as_kernel = TRUE, is_pedigree = FALSE,
geno = geno, bglr_model = "BRR")
eta[] <- lapply(seq_along(eta), FUN = function(i) {
dat <- eta[[i]]
x <- dat[["X"]]
rownames(x) <- hybrid_nms
dat[["X"]] <- x
dat
})
dir.create("./bglr_out")
run_loocv(Pheno = Pheno, ETA = eta, hybrid = TRUE, father_idx = 2,
mother_idx = 1, split_char = "_", trait = "gtm", iter = 2500L,
speed_tst = FALSE, run = 1L, verbose = FALSE,
out_loc = "./bglr_out/")
unlink("./bglr_out", recursive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.