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

博文

【5.21更新】自编程序包AAfun的一些功能(之二)

已有 3256 次阅读 2014-5-14 10:58 |个人分类:ASReml|系统分类:科研笔记

AAfun程序包,最近又做了更新,对应的例子脚本AAfun.R也更新了,请感兴趣的朋友到网盘http://yzhlin-asreml.ys168.com/  上下载。此博客今后只增加更新的记录,不再上传更新的程序包AAfun。


更新记录:

5.21更新:增加ir2r.sp()功能;spd.plot()增加了参数na。

5.19更新:增加mc.se()功能。



功能三、spd.plot(),用于绘制空间分析的数据。

1
2
3
4
5
6
7
8
9
10
library(AAfun)
### function 3 spd.plot() ###
##  spd.plot(): plot spatial data
data(barley)
## select varialbe order: row, col, and aim trait
aim.trait<-subset(barley,select=c(Row,Column,yield))
spd.plot(aim.trait)

运行结果如下:


功能四、group.plot(),用于绘制多重比较的结果。

1
2
3
4
5
6
7
8
9
### function 4 group.plot()###
## group.plot(): Plot multicomparison result
data(sweetpotato)
model<-aov(yield~virus,data=sweetpotato)
comparison<- LSD.test(model,"virus",alpha=0.01)
group.plot(comparison,"virus")
group.plot(comparison,x.lbls="virus",y.lbls="yield(Kg)")

运行结果如下:


功能五、dial.combn()用于双列杂交的杂交组合和家系编码。

1
2
3
4
5
### function 5 dial.combn()###
##  dial.combn(): generate the recipro and family code from a diallel mating
dial.combn("G",3)
dial.combn("G",N=3) # genotype code, diallel mate parent number

运行结果如下:

1
2
3
4
5
6
7
8
9
10
11
> dial.combn("G",3)
 Male Female Recipro  Fam
1   G1     G1    G1G1 F001
2   G2     G1    G2G1 F002
3   G3     G1    G3G1 F003
4   G1     G2    G1G2 F002
5   G2     G2    G2G2 F004
6   G3     G2    G3G2 F005
7   G1     G3    G1G3 F003
8   G2     G3    G2G3 F005
9   G3     G3    G3G3 F006

功能六、mc.ped()用于谱系文件格式的转换。

1
2
3
4
5
6
7
8
9
10
11
12
13
### function 6 mc.ped() ###
##  mc.ped(): change Pedigree format from asreml to MCMCglmm
data(PrSpa)
df<-PrSpa
### creat an asreml-format pedigree
ped<-df[,c(1,4)]
names(ped)[2]<-"Mum"
ped$Dad<-NA
### transform to MCMCglmm-format pedigree
ped2<-mc.ped(ped)


功能七、mc.se()用于计算MCMCglmm包所计算参数(遗传力、遗传相关、方差分量等)的标准误。具体的用法和例子,请见更新版的AAfun.R。


程序包AAfun的下载地址:

1. 网盘下载  http://yzhlin-asreml.ys168.com/


2. 本地下载:

AAfun_1.0.zip


3. AAfun的例子脚本

AAfun.R


欢迎各位网友试用,也欢迎有关程序包AAfun的任意意见。




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

上一篇:自编程序包AAfun的一些功能(之一)
下一篇:AAfun程序包中mc.se()的改进
收藏 IP: 219.137.64.*| 热度|

1 柳海涛

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

数据加载中...
扫一扫,分享此博文

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

GMT+8, 2024-9-27 07:43

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部