getOptParentalProportions: getOptParentalProportions

Description Usage Arguments Value Author(s) References Examples

View source: R/getOptParentalProportions.R

Description

Parental proportions to balance gains and inbreeding

Usage

1
getOptParentalProportions(Amat, gebvs, lambda, ul)

Arguments

Amat

Additive genomic relationship matrix for a set of individuals

gebvs

Estimated breeding values in a vector, listed in the same order as they were in Amat

lambda

relative importance of inbreeding. 0<= lambda <= 1.

ul

maximum proportion assigned to a single genotype. 0<= ul <= 1.

Value

A data frame with parental proportions and values of "lambda", "Gain","Inbreeding","G/I ratio".

Author(s)

Deniz Akdemir, Julio Isidro Sanch\'ez, Hanna Haikka, Itaraju Baracuhy Brum

References

Akdemir, Deniz, and Julio I. Sanchez. ”Efficient Breeding by Genomic Mating.” Frontiers in Genetics 7 (2016).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
library(GenomicMating)
set.seed(12345)
N=20
nmarkers=100
Markers<-c()
for (i in 1:N){
  Markers<-rbind(Markers,rbinom(nmarkers, 2,.1)-1)
}


markereffects<-rep(0,nmarkers)
markereffects[sample(1:nmarkers,nmarkers/2)]<-rnorm(nmarkers/2)
Markers[1:5,1:5]
#library(parallel)
K=Amat.pieces(rbind(Markers), pieces=5) 

rownames(Markers)<-paste("l", 1:nrow(Markers),sep="_")

rownames(K)<-colnames(K)<-c(rownames(Markers))

which.max(Markers%*%markereffects)

colnames(Markers)<-1:nmarkers



oprop<-getOptParentalProportions(Amat=K,
gebvs=Markers%*%markereffects, lambda=.8, ul=1)

pout<-plotOPFrontier(Amat=K,
gebvs=Markers%*%markereffects, ul=1, identify=FALSE)
round(oprop,3)

uhat<-Markers%*%markereffects

gsselected<-which(uhat>quantile(uhat,.9))
gsgain<-mean(uhat[gsselected])

onesvec<-matrix(1,nrow=length(uhat),ncol=1)

onesvec[-gsselected]<-0
onesvec<-onesvec/sum(onesvec)
gsinbreed<-t(onesvec)%*%K%*%onesvec
gsgain
gsinbreed
round(oprop,3)
t(oprop[1:(length(oprop)-4)])%*%K%*%oprop[1:(length(oprop)-4)]
points(gsgain,gsinbreed, pch="*")
text(x=gsgain-.05,y=gsinbreed-.05, "GSSOL", cex=.5)

GenomicMating documentation built on July 2, 2018, 1:03 a.m.