Learn R Programming

pleioh2g (version 0.1.1)

Cal_rg_h2g_alltraits: Compute rg + h2g

Description

This function is used to compute rg + h2g using LDSC.

Usage

Cal_rg_h2g_alltraits(
  phenotype,
  munged_sumstats,
  ld_path,
  wld_path,
  sample_prev = NULL,
  population_prev = NULL
)

Value

A named list containing LDSC-based heritability and genetic correlation estimates across all input phenotypes. The list includes the following elements:

  • h2: Matrix of SNP-heritability estimates on the observed scale (rows = 1, columns = input phenotypes).

  • h2Z: Matrix of corresponding heritability Z-scores.

  • liah2: Matrix of heritability estimates on the liability scale.

  • rg: Symmetric matrix of pairwise genetic correlations between traits.

  • rgz: Matrix of Z-scores for the genetic correlation estimates.

  • gcov: Symmetric matrix of genetic covariances between traits.

Each element corresponds to one LDSC-derived summary statistic, with trait names used as both row and column names.

Arguments

phenotype

Vector of the phenotype name

munged_sumstats

All LDSC-munged GWAS .stat.gz

ld_path

Path to directory containing ld score files.

wld_path

Path to directory containing weight files.

sample_prev

Vector of sample prevalence, in the same order of input GWAS summary statistics.

population_prev

Vector of population prevalence, in the same order of input GWAS summary statistics.