GA.Dscore: Search For A Subset With The Highest D-score

View source: R/GA.Dscore.R

GA.DscoreR Documentation

Search For A Subset With The Highest D-score

Description

Search for an optimal subset of the candidate individuals such that it achieves the highest D-score by genetic algorithm (GA).

Usage

GA.Dscore(
  K,
  size,
  keep = c(),
  n0 = size,
  mut = 3,
  cri = 10000,
  console = FALSE
)

Arguments

K

matrix. An n*n matrix denotes the genomic relationship matrix of the n candidate individuals, where n > 4.

size

integer. An integer denotes the size of the subset, note that 3 < size < n.

keep

vector. A vector indicates those candidate individuals which will be retained in the subset before the search. The length of keep must be less than size.

n0

integer. An integer indicates the number of chromosomes (solutions) in the genetic algorithm, note that n0 > 3.

mut

integer. An integer indicates the number of mutations in the genetic algorithm, note that mut < size.

cri

integer. An integer indicates the stopping criterion, note that cri < 1e+06. The genetic algorithm will stop if the number of iterations reaches cri.

console

logical. A logical variable, if console is set to be TRUE, the searching process will be shown in the R console.

Value

subset

The optimal subset with the highest D-score.

D.score

The D.score of the optimal subset.

time

The number of iterations.

References

Chung PY, Liao CT. 2020. Identification of superior parental lines for biparental crossing via genomic prediction. PLoS ONE 15(12):e0243159.

Ou JH, Liao CT. 2019. Training set determination for genomic selection. Theor Appl Genet. 132:2781-2792.

Examples

# generate simulated data
geno.test <- matrix(sample(c(1, -1), 600, replace = TRUE), 20, 30)
K.test <- geno.test%*%t(geno.test)/ncol(geno.test)

# run with no specified individual
result1 <- GA.Dscore(K.test, 6, cri = 1000, console = TRUE)
result1

# run with some specified individuals
result2 <- GA.Dscore(K.test, 6, keep = c(1, 5, 10), cri = 1000, console = TRUE)
result2

IPLGP documentation built on Sept. 11, 2024, 7:35 p.m.

Related to GA.Dscore in IPLGP...