Create Sets Similar to SuSiE Output from fSuSiE Object
Source:R/fineMappingWrappers.R
fsusieGetCs.RdThis function constructs a list that mimics the structure of SuSiE output sets from a fSuSiE object. It includes credible sets (cs) with their names, a purity dataframe, coverage information, and the requested coverage level.
Arguments
- fsusieObj
A fSuSiE object containing the results from a fSuSiE analysis. expected to at least have 'cs' and 'alpha' components.
- X
Numeric genotype matrix used to compute credible-set purity.
- requestedCoverage
A numeric value specifying the desired coverage level for the credible sets. This is purely for record purpose so should be manually ensured that it correctly reflect the actual coverage used. Defaults to 0.95.
Value
A list containing named credible sets (cs), a dataframe of purity
metrics (a cs label column plus minAbsCorr, meanAbsCorr,
medianAbsCorr), an index of credible sets
(cs_index), coverage values for each set, and the requested coverage level.
Similar to the SuSiE set output
Examples
data(fsusieFineMappingExample)
fit <- getSusieFit(fsusieFineMappingExample)
fsusieGetCs(fit)
#> $cs
#> $cs$L1
#> chr22:15529191:A:G
#> 10
#>
#> $cs$L2
#> chr22:15528491:A:G
#> 3
#>
#>
#> $purity
#> # A tibble: 2 × 4
#> cs minAbsCorr meanAbsCorr medianAbsCorr
#> <chr> <dbl> <dbl> <dbl>
#> 1 L1 1 1 1
#> 2 L2 1 1 1
#>
#> $cs_index
#> [1] 1 2
#>
#> $coverage
#> [1] 1 1
#>
#> $requested_coverage
#> [1] 0.95
#>