Skip to contents

Convert an H2Estimate object into the list format expected by standardize_sldsc_trait and meta_sldsc_random. This bridges the h2 estimation methods (LDER, gLDSC, HDL) into the sldsc_wrapper.R postprocessing pipeline.

Usage

h2estimate_to_sldsc_trait(h2_est)

Arguments

h2_est

An H2Estimate object with enrichment and tau_blocks.

Value

A named list matching the format of read_sldsc_trait:

categories

Character vector of annotation names

tau

Named numeric vector of per-annotation coefficients

tau_se

Named numeric vector of tau standard errors

enrichment

Named numeric vector of enrichment ratios

enrichment_se

Named numeric vector of enrichment SEs

enrichment_p

Named numeric vector of enrichment p-values

prop_h2

Named numeric vector of proportion of h2

prop_snps

Named numeric vector of proportion of SNPs

h2g

Numeric scalar, global h2 estimate

tau_blocks

Matrix (n_blocks x n_categories) for jackknife

n_blocks

Integer, number of jackknife blocks