Running and Verifying Beagle
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to go to the /path/to/BEAGLE directory:
cd /path/to/BEAGLE
- Run the following commands to create a script file and edit it:
- Create a test.sh script file.
vi test.sh
- Press i to enter the insert mode and add the following content to the file:
#!/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
java -Xmx [ GB ] g -jar beagle.jar [ arguments ]
- In the preceding command, [GB] indicates the upper limit of the memory pool and [arguments] indicates the arguments separated by spaces.
- [arguments] must include the two parameters:
- gt = [file] : specifies a VCF file that contains genotype data for the study sample.
- out = [character string] : prefix of the output file name.
- For details about more parameters, see the official document at http://faculty.washington.edu/browning/beagle/beagle_5.1_08Nov19.pdf.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a test.sh script file.
- Run the following command to grant the execute permission on the script:
chmod a+x test.sh
- Run the following command to execute the script:
./test.sh
The following is an example of the command output. The command output is also saved to the .log file.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
Parent topic: Beagle 5.1 Porting Guide (CentOS 7.6)