This function is used to compute rg + h2g using LDSC.
Cal_rg_h2g_alltraits(
phenotype,
munged_sumstats,
ld_path,
wld_path,
sample_prev = NULL,
population_prev = NULL
)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.
Vector of the phenotype name
All LDSC-munged GWAS .stat.gz
Path to directory containing ld score files.
Path to directory containing weight files.
Vector of sample prevalence, in the same order of input GWAS summary statistics.
Vector of population prevalence, in the same order of input GWAS summary statistics.