crossValWithGs3: K-fold cross-validation

Description Usage Arguments Value Author(s) See Also

Description

Perform K-fold cross-validation with GS3, and report metrics as advised in Daetwyler et al. (2013). Files are saved in the current directory.

Usage

1
2
3
crossValWithGs3(genos, dat, config, task.id = "GS3", binary.trait = FALSE,
  ped.file = "", afs = NULL, rep.id = 1, nb.folds = 10, seed = NULL,
  remove.files = "some", nb.cores = 1, cl = NULL, verbose = 1)

Arguments

genos

matrix of SNP genotypes

dat

data frame with phenotypes

config

list containing the configuration for GS3

task.id

character containing the task identifier used as prefix for the output files (for each fold, its index will be added)

binary.trait

logical

ped.file

path to the file containing the pedigree (if not used, use NA or "" instead of NULL)

afs

vector of allele frequencies which names are SNP identifiers (column names of genos); if NULL, will be estimated from genos; used to compute the variance of additive genotypic values from the variance of additive SNP effects (see Vitezica et al, 2013), then used to compute narrow-sense heritability

rep.id

identifier of the current replicate

nb.folds

number of folds

seed

if not NULL, this seed for the pseudo-random number generator will be used to shuffle genotypes before partitioning per fold

remove.files

remove files per fold (none/some/all); use "some" in real-life applications in order to keep estimates of SNP effects per fold, thereby allowing to perform genomic prediction afterwards by averaging them

nb.cores

number of cores to launch folds in parallel (via mclapply, on Unix-like computers, or parLapply on Windows); you can also use detectCores

cl

object returned by makeCluster, necessary only if nb.cores > 1 and the computer runs Windows; if NULL in such cases, will be created silently

verbose

verbosity level (0/1/2); there will be a progress bar only for verbose=1

Value

data frame

Author(s)

Helene Muranty, Timothee Flutre

See Also

crossValRepWithGs3, getDefaultConfig, writeConfigForGs3, execGs3, getPartitionGenos


INRA/rgs3 documentation built on May 20, 2019, 5:24 p.m.