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
You can install the development version of ldscr from GitHub with:
# install.packages("devtools")
devtools::install_github("mglev1n/ldscr")
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"
)