Skip to content

Latest commit

 

History

History
138 lines (66 loc) · 3.27 KB

beagle.md

File metadata and controls

138 lines (66 loc) · 3.27 KB

Beagle software

Beagle is a software package for phasing genotypes and for imputing ungenotyped markers (missing genotypes.)

Check Java installation

java -version

if not installed type:

conda activate ngs1
conda install java-jdk

Download Beagle software

wget -c https://faculty.washington.edu/browning/beagle/beagle.28Sep18.793.jar

Download the Data

wget -c http://faculty.washington.edu/browning/beagle/test.28Sep18.793.vcf.gz

Description: sample from the 1000 Genome project


Software Parameters

Data Parameters

param Description
gt Input VCF file for the study samples (required)
ref bref3 or VCF file with phased genotypes
out output file prefix (required)
map PLINK map file with cM units
chrom [chrom] or [chrom]:[start]-[end]
excludesamples file with 1 sample ID per line
excludemarkers file with 1 marker ID per line

Imputation parameters

Param Description Default
impute impute ungenotyped markers (true/false) True
imp-states model states for imputation 1600
imp-segment min haplotype segment length (cM) 6.0
imp-clusters max cM in a marker cluster 0.005
imp-ap print posterior allele probabilities false
imp-gp print posterior genotype probabilities false

General parameters

param description default
ne effective population size 1000000
err allele mismatch rate 1.0E-4
window window length in cM 40.0
overlap window overlap in cM 4.0
seed random seed -99999
nthreads number of threads machine-dependent
step IBS step length (cM 0.1
nsteps number of IBS steps 7

Example

Data Preparation

Create two test files

# Creating test files: ref.28Sep18.793.vcf.gz target.28Sep18.793.vcf.gz

# Cut the first 180 individuals (Reference)
zcat test.28Sep18.793.vcf.gz | cut -f1-190 | tr '/' '|' | gzip > ref.28Sep18.793.vcf.gz

# Cut the last 10 individuals (Target)
zcat test.28Sep18.793.vcf.gz | cut -f1-9,191-200 | gzip > target.28Sep18.793.vcf.gz

Data analysis

Running test with gt argument

java -jar beagle.28Sep18.793.jar gt=test.28Sep18.793.vcf.gz out=out.gt

Running the analysis with ref & gt arguments

java -jar beagle.28Sep18.793.jar ref=ref.28Sep18.793.vcf.gz gt=target.28Sep18.793.vcf.gz out=out.ref

Generating bref3 file

java -jar bref3.28Sep18.793.jar ref.28Sep18.793.vcf.gz > ref.28Sep18.793.bref3

Running the analysis using the bref3 file

java -jar beagle.28Sep18.793.jar ref=ref.28Sep18.793.bref3 gt=target.28Sep18.793.vcf.gz out=out.bref3