Skip to content

Example of HDL with an imputed reference panel

zhenin edited this page Jun 7, 2020 · 10 revisions

In this example, we will illustrate the use of HDL with an imputed reference panel. The example files gwas1.imputed.example and gwas2.imputed.example can be downloaded here. You can choose either .rds or .txt files.

Data description

Estimating genetic correlation using HDL with an array reference panel

The syntax for the imputed reference panel is the same as the syntax for the array reference panel, which is described in instruction of syntax. Computation should take 15-20 minutes without parallelism. With 4 cores, it takes around 5 minutes.

Command line user

Rscript /Path/to/HDL/HDL.run.R \
gwas1.df=/Path/to/gwas1/gwas1.imputed.example.rds \
gwas2.df=/Path/to/gwas2/gwas2.imputed.example.rds \
LD.path=/Path/to/reference/UKB_imputed_SVD_eigen99_extraction \
output.file=/Path/to/output/test.Rout

R user

gwas1.df <- readRDS("/Path/to/gwas1/gwas1.imputed.example.rds")
gwas2.df <- readRDS("/Path/to/gwas2/gwas2.imputed.example.rds")
LD.path <- "/Path/to/reference/UKB_imputed_SVD_eigen99_extraction"
res.HDL <- HDL.rg(gwas1.df, gwas2.df, LD.path)
res.HDL

HDL results

For how to read HDL output, please refer to the instruction on the wiki. Comparing with the HDL results based on array reference panel, imputed-panel-based HDL provides more accurate results with lower standard error.

Function arguments:
gwas1.df=/Path/to/gwas1/gwas1.imputed.example.rds
gwas2.df=/Path/to/gwas2/gwas2.imputed.example.rds
LD.path=/Path/to/reference/UKB_imputed_SVD_eigen99_extraction
output.file=/Path/to/output/test.Rout

HDL: High-definition likelihood inference of genetic correlations (HDL)
Version 1.3.2 (2020-06-06) installed
Author: Zheng Ning, Xia Shen
Maintainer: Zheng Ning <zheng.ning@ki.se>
Tutorial: https://github.com/zhenin/HDL
Use citation("HDL") to know how to cite this work.

Analysis starts on Sat Jun  6 22:28:56 2020 
1029876 out of 1029876 (100%) SNPs in reference panel are available in GWAS 1.
1029876 out of 1029876 (100%) SNPs in reference panel are available in GWAS 2.

Integrating piecewise results
Continuing computing standard error with jackknife


Heritability of phenotype 1:  0.1241 (0.0054) 
Heritability of phenotype 2:  0.01 (9e-04) 
Genetic Covariance:  -0.0067 (0.0011) 
Genetic Correlation:  -0.1899 (0.0358) 
P:  1.17e-07 

Analysis finished at Sat Jun  6 22:40:45 2020
The results were saved to /Path/to/output/test.Rout