Beagle is a software package for phasing genotypes and for imputing ungenotyped markers (missing genotypes.)
java -version
if not installed type:
conda activate ngs1
conda install java-jdk
wget -c https://faculty.washington.edu/browning/beagle/beagle.28Sep18.793.jar
wget -c http://faculty.washington.edu/browning/beagle/test.28Sep18.793.vcf.gz
Description: sample from the 1000 Genome project
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 |
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 |
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 |
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
java -jar beagle.28Sep18.793.jar gt=test.28Sep18.793.vcf.gz out=out.gt
java -jar beagle.28Sep18.793.jar ref=ref.28Sep18.793.vcf.gz gt=target.28Sep18.793.vcf.gz out=out.ref
java -jar bref3.28Sep18.793.jar ref.28Sep18.793.vcf.gz > ref.28Sep18.793.bref3
java -jar beagle.28Sep18.793.jar ref=ref.28Sep18.793.bref3 gt=target.28Sep18.793.vcf.gz out=out.bref3