Convert H2Estimate to S-LDSC Trait Format
Source:R/h2EstimationWrappers.R
h2EstimateToSldscTrait.RdConvert an H2Estimate object into the list format
expected by standardizeSldscTrait and
metaSldscRandom. This bridges the h2 estimation methods
(LDER, gLDSC, HDL) into the sldscWrapper.R postprocessing pipeline.
Value
A named list matching the format of readSldscTrait:
- categories
Character vector of annotation names
- tau
Named numeric vector of per-annotation coefficients
- tauSe
Named numeric vector of tau standard errors
- enrichment
Named numeric vector of enrichment ratios
- enrichmentSe
Named numeric vector of enrichment SEs
- enrichmentP
Named numeric vector of enrichment p-values
- propH2
Named numeric vector of proportion of h2
- propSnps
Named numeric vector of proportion of SNPs
- h2g
Numeric scalar, global h2 estimate
- tauBlocks
Matrix (nBlocks x nCategories) for jackknife
- nBlocks
Integer, number of jackknife blocks
Examples
data(h2EstimateExample)
h2EstimateToSldscTrait(h2EstimateExample)
#> $categories
#> [1] "annot1" "annot2"
#>
#> $tau
#> annot1 annot2
#> 1e-07 2e-07
#>
#> $tauSe
#> annot1 annot2
#> 5e-08 6e-08
#>
#> $enrichment
#> annot1 annot2
#> 2 3
#>
#> $enrichmentSe
#> annot1 annot2
#> 0.5 0.7
#>
#> $enrichmentP
#> annot1 annot2
#> 0.010 0.001
#>
#> $propH2
#> annot1 annot2
#> 0.3 0.5
#>
#> $propSnps
#> annot1 annot2
#> 0.15 0.17
#>
#> $h2g
#> [1] 0.3
#>
#> $tauBlocks
#> annot1 annot2
#> [1,] 0.120139084 -0.04891095
#> [2,] -1.812376850 -0.84323377
#> [3,] 0.151582984 -2.07527077
#> [4,] -1.119221005 -0.36076315
#> [5,] 0.001908206 -0.63768966
#> [6,] 1.188518494 -0.36627803
#> [7,] -0.505343855 2.35536390
#> [8,] -0.099234393 1.09337723
#> [9,] 0.305353199 0.28584100
#> [10,] 0.198409703 0.99365778
#>
#> $nBlocks
#> [1] 10
#>