下载地址:http://dmu.agrsci.dk/
64为电脑安装DMUv6-R5-2-EM64T.msi, 32为电脑安装DMUv6-R5-2.msi
3.1 保存测试数据
#dir.create("d:/ddmu-test")setwd("d:/ddmu-test/")library(devtools)
install_github("dengfei2013/learnasreml")library(learnasreml)
data("animalmodel.dat")
data("animalmodel.ped")
dat = animalmodel.dat
ped = animalmodel.ped
dmuped = ped
dmuped$Birth = 2018library(data.table)# write.table(dat,"animal-model.txt",row.names = F,col.names = F)fwrite(dat,"animal-model.txt",sep = " ",col.names = F)
fwrite(dmuped,"animal-ped.txt",sep = " ",col.names = F)
3.2 查看数据
3.3 将下面内容保存为:Uni_animal.DIR
$COMMENT
Estimate variance components for BWT
Model
y: BWT
fixed: BYEAR + SEX
random: ANIMAL
$ANALYSE 1 1 0 0
$DATA ASCII (4,2,0) d:/dmu-test/animal-model.txt
$VARIABLE
ANIMAL MOTHER BYEAR SEX
BWT TARSUS
$MODEL
1
0
1 0 3 3 4 1
1
0
0
$VAR_STR 1 PED 2 ASCII d:/dmu-test/animal-ped.txt
$PRIOR
1 1 1 0.3
2 1 1 0.7
注意, 先建立txt, 然后将其重命名为:Uni_animal.DIR, 这里DIR是后缀, 而不是默认的txt
我的默认的安装路径如下:C:\Program Files (x86)\QGG-AU\DMUv6\R5.2-EM64T\bin
将这些文件copy到你的数据文件夹下.
数据文件夹里面的内容有:
3.5 打开cmd
3.6 执行命令
run_dmuai.bat Uni_animal
3.7 查看结果
能够运行DMU的示例文件, 只是第一步, 随后你可以看看示例数据是什么结构, 怎么调整自己的数据, 怎么调整DIR文件, 加油, 祝你好运.