Skip to contents

Extends standard LDSC to multiple annotation categories, estimating per-annotation contributions to genetic covariance and heritability.

Usage

s_ldsc(
  traits,
  sample.prev = NULL,
  population.prev = NULL,
  ld,
  wld,
  frq,
  trait.names = NULL,
  n.blocks = 200,
  ldsc.log = NULL,
  exclude_cont = TRUE
)

Arguments

traits

Character vector of paths to .sumstats.gz files

sample.prev

Numeric vector of sample prevalences (NULL for continuous traits)

population.prev

Numeric vector of population prevalences (NULL for continuous)

ld

Path to annotation LD score directory

wld

Path to weight LD score directory

frq

Path to frequency file directory

trait.names

Character vector of trait names (defaults to V1, V2, ...)

n.blocks

Number of jackknife blocks (default 200)

ldsc.log

Log file path (ignored in gsemr)

exclude_cont

Exclude continuous annotations (default TRUE)

Value

A list with per-annotation S and V matrices

Examples

if (FALSE) { # \dontrun{
# Stratified LDSC requires annotation-specific LD, weight, and freq files.
result <- s_ldsc(
  traits = c("T1.sumstats.gz", "T2.sumstats.gz"),
  ld = "baseline_LD/",
  wld = "weights/",
  frq = "frq/",
  trait.names = c("V1", "V2")
)
# Feed into `enrich()` for annotation enrichment tests.
} # }