Description Usage Arguments Value Author(s) References See Also Examples
This function generates G matrices using different methods
1 |
marker.file |
The marker file, first column is id then SNPs, SNPs must be 0,1,2. |
ped.file |
The pedigree file, contains id, sire(or female) and dam (or male). |
aped.rowNames |
The rowNames of pedigree inverse matrix. |
path |
The path of all datasets for GBLUP. |
Goptions |
G matrices for different methods,1(default) using frequencies,2 using regression. |
marker.file |
marker.file="Genotype.csv" |
ped.file |
ped.file="pedigree.csv" |
path |
path="G:\Users\yzhlin\GBLUP" |
Goptions |
Goptions=1, or 2 |
Yuanzhen Lin <yzhlinscau@163.com>
1. VanRaden PM. Efficient methods to compute genomic predictions. J Dairy Sci,2008, 91: 4414-4423. 2. Yuanzhen Lin. R & ASReml-R Statistics. China Forestry Publishing House. 2016
Website for instant update: yzhlin-asreml.ys168.com
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 | library(asreml)
library(AAfun)
#### for demo examples
data(G.data)
data(G.pedigree)
data(G.marker)
gpedinv=asreml.Ainverse(G.pedigree)$ginv
gpnames=attributes(gpedinv)$rowNames
Ginv1=Ginv(marker.file=G.marker,ped.file=G.pedigree,aped.rowNames=gpnames,Goptions=1)
gblup<-asreml(t1~1+Site,random=~ giv(ID), ## ped(ID)
ginverse=list(ID=Ginv1),data=G.data)
summary(gblup)$varcomp
c<-coef(gblup)$random
#### for user
df<-asreml.read.table("data.csv",T,",")
aped<-asreml.read.table("pedigree.csv",T,",")
apedinv=asreml.Ainverse(aped)$ginv
apnames=attributes(apedinv)$rowNames
path="G:/Users/yzhlin/Desktop/GBLUP"
Ginv1=Ginv(marker.file="Genotype.csv",ped.file="pedigree.csv",
aped.rowNames=apnames,path=path,Goptions=1)
## GBLUP
df.asr<-asreml(t1~1+Site,random=~ giv(ID),
ginverse=list(ID=Ginv1),data=df)
## ABLUP
df2.asr<-asreml(t1~1+Site,random=~ ped(ID),
ginverse=list(ID=apedinv),data=df)
summary(df.asr)$varcomp
summary(df2.asr)$varcomp
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.