运行和验证
操作步骤
- 使用PuTTY工具,以root用户登录服务器。
- 执行以下命令进入“/path/to/BEAGLE”目录。
cd /path/to/BEAGLE
- 执行以下命令创建并编辑脚本文件。
- 创建“test.sh”脚本文件。
vi test.sh
- 按“i”进入编辑模式,将以下内容添加到脚本中。
#!/bin/sh echo echo "*** Creating test files: ref.27Apr20.b81.vcf.gz target.27Apr20.b81.vcf.gz ***" echo zcat test.27Apr20.b81.vcf.gz | cut -f1-190 | tr '/' '|' | gzip > ref.27Apr20.b81.vcf.gz zcat test.27Apr20.b81.vcf.gz | cut -f1-9,191-200 | gzip > target.27Apr20.b81.vcf.gz echo echo "*** Running test analysis with \"gt=\" argument ***" echo java -jar beagle.27Apr20.b81.jar gt=test.27Apr20.b81.vcf.gz out=out.gt echo echo "*** Running test analysis with \"ref=\" and \"gt=\" arguments ***" echo java -jar beagle.27Apr20.b81.jar ref=ref.27Apr20.b81.vcf.gz gt=target.27Apr20.b81.vcf.gz out=out.ref echo echo "*** Making \"bref3\" file ***" echo java -jar bref3.27Apr20.b81.jar ref.27Apr20.b81.vcf.gz > ref.27Apr20.b81.bref3 echo echo "*** Running test analysis with \"bref3\" file ***" echo java -jar beagle.27Apr20.b81.jar ref=ref.27Apr20.b81.bref3 gt=target.27Apr20.b81.vcf.gz out=out.bref3
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 创建“test.sh”脚本文件。
- 执行以下命令为脚本添加可执行权限。
chmod a+x test.sh
- 执行以下命令运行脚本。
./test.sh
运行完成后输出的结果示例如下所示,该结果也会保存至生成的“.log”日志文件中。Cumulative Statistics: Study markers: 1,356 Haplotype phasing time: 1 second Total time: 1 second End time: 10:33 AM CST on 09 May 2020 beagle.27Apr20.b81.jar finished