The goal of ldscr is to provide functionality to estimate genetic heritability and cross-trait genetic correlations from GWAS summary statistics using LD score regression within R. Details of LD score regression for estimation of heritabliity and genetic correlations have been previously published.1,2 This package adapts code and functionality originally implemented in GenomicSEM.3
Installation
You can install the development version of ldscr from GitHub with:
# install.packages("devtools")
devtools::install_github("mglev1n/ldscr")
Usage
ldsc_h2()
can be used to estimate heritability. Sample GWAS data is provided in sumstats_munged_example()
. Users can utilize built-in LD reference data, or provide their own.
library(ldscr)
df <- sumstats_munged_example(example = "BMI")
h2_res <- ldsc_h2(munged_sumstats = df, ancestry = "EUR")
ldsc_rg()
can be used to estimate cross-trait genetic correlations between two or more traits.
rg_res <- ldsc_rg(
munged_sumstats = list(
"APOB" = sumstats_munged_example(example = "APOB"),
"LDL" = sumstats_munged_example(example = "LDL")
),
ancestry = "EUR"
)
References
1.
Bulik-Sullivan, B. et al. An atlas of genetic correlations across human diseases and traits. Nature Genetics 47, 1236–1241 (2015).
2.
Bulik-Sullivan, B. K. et al. LD Score regression distinguishes confounding from polygenicity in genome-wide association studies. Nature Genetics 47, 291–295 (2015).
3.
Grotzinger, A. D. et al. Genomic structural equation modelling provides insights into the multivariate genetic architecture of complex traits. Nature Human Behaviour 3, 513–525 (2019).