yzhlinscau的个人博客分享 http://blog.sciencenet.cn/u/yzhlinscau

博文

AFEchidna示例15 --update的妙用1

已有 1748 次阅读 2021-10-5 19:50 |个人分类:Echidna|系统分类:科研笔记

update()用于更新运行新模型,其可简化程序代码,AFEchidna包里的update()要比传统的功能更为强大。


示例1,在某个性状分析基础上,进一步进行单性状的批量分析:


// A simple case

res11<-echidna(fixed=h3~1+Rep,

               random=~Fam,

               residual=NULL,

               es0.file="fm.es0")


假设上述模型各项为最优项,现基于此,再扩展至其它更多性状:


// A simple case

res11.bth <- update(res11,

                    trait=~h1+h2+h3,

                    batch=T)


上述运行结果,可以直接获取方差分量和计算遗传参数:


// A simple case

> Var(res11.bth)


V1-Residual; V2-Fam

Converge: 1 means True; 0 means FALSE.


        V1      V2  V1.se  V2.se Converge maxit

h1   52.80  12.062  2.693  3.020        1     5

h2  746.91  45.493 38.125 18.895        1     4

h3 1818.30 104.040 92.805 44.645        1     4

> pin(res11.bth,mulp=c(h2~V2*4/(V2+V1),

+                  Vp~V2+V1),signif=T)


results as following: 


pin formula: 

h2 ~ V2 * 4/(V2 + V1)

Vp ~ V2 + V1


terms:  V1-h2; V2-Vp


      V1       V2   SE1    SE2 Siglevel1 Siglevel2

h1 0.744   64.858 0.157  3.926       ***       ***

h2  0.23    792.4 0.092 40.099        **       ***

h3 0.216 1922.343  0.09 97.014        **       ***

---------------

Sig.level: 0'***' 0.001 '**' 0.01 '*' 0.05 'Not signif' 1


> IC(res11.bth)

    DF parNO     LogL     AIC     BIC

h1 822     2 -2093.60 4191.19 4200.62

h2 822     2 -3160.22 6324.45 6333.87

h3 822     2 -3525.12 7054.24 7063.66


而传统单性状的批量分析代码为:


// A simple case

res21<-echidna(trait=~h1+h2+h3,

               fixed=~1+Rep,

               random=~Fam,

               residual=~units,

               batch=TRUE,

               es0.file='fm.es0')


相比之下,update()代码大大简化了,只需加上参数trait和batch:


// A simple case

res11.bth <- update(res11,

                    trait=~h1+h2+h3,

                    batch=T)


AFEchidna包免费对外开放,仅用于学术研究,不可用于商业研究,否则造成的后果自负。


感兴趣者,可通过博文AFEchidna包的在线安装进行AFEchidna的在线安装。


参考文献:

Zhang WH, Wei RY, Liu Y, Lin YZ. AFEchidna is a R package for genetic evaluation of plant and animal breeding datasets. BioRxiv. DOI: 10.1101/2021.06.24.449740.


代码显示更合理,请见链接:https://blog.csdn.net/yzhlinscau/article/details/120617342




https://wap.sciencenet.cn/blog-1114360-1306865.html

上一篇:遗传增益(genetic gain)如何计算标准误?
下一篇:AFEchidna示例16 -- 如何计算各种遗传参数及其标准误差
收藏 IP: 14.146.94.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-28 16:49

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部