susie_get_cs_attainable()
is a post-hoc credible-set filter for the case when neither a genotype
matrix nor an LD reference is available, so the usual
min_abs_corr purity filter in susie_get_cs()
cannot be used. It uses only the fitted alpha matrix. For
each effect, it computes an attainable coverage, an idea
introduced by SparsePro (Zhang et
al. 2023), by zeroing every entry of alpha that is not
the column maximum and then summing the rows, which gives the coverage
that effect could attain if it did not have to share probability mass
with other effects. A second filter caps the entropy of each effect’s
attainable mass, dropping effects whose mass is spread too thinly across
many variables.
Fit SuSiE with a fixed prior so noise effects are not shrunken away:
fitted <- susie(X, y, L = 20,
estimate_prior_variance = FALSE,
scaled_prior_variance = 0.05,
verbose = FALSE)With the genotype matrix available, susie_get_cs()
filters by purity:
Without X or Xcorr, several poorly
localized effects slip through:
sets_noLD <- suppressMessages(susie_get_cs(fitted, coverage = 0.95))
length(sets_noLD$cs)
# [1] 6
sapply(sets_noLD$cs, length)
# L1 L2 L3 L6 L8 L20
# 2 1 923 923 923 923susie_get_cs_attainable() recovers the purity-filtered
result without using X:
sets_attain <- susie_get_cs_attainable(fitted, coverage = 0.95)
# WARNING: Neither X nor Xcorr was provided; purity filtering is skipped and min_abs_corr will have no effect. Pass X or Xcorr to enable the purity filter.
length(sets_attain$cs)
# [1] 2The two filters select the same effects:
Zhang, W., Najafabadi, H., Li, Y. (2023). SparsePro: An efficient fine-mapping method integrating summary statistics and functional annotations. PLOS Genetics 19, e1011104. doi:10.1371/journal.pgen.1011104.
sessionInfo()
# R version 4.6.0 (2026-04-24)
# Platform: x86_64-pc-linux-gnu
# Running under: Ubuntu 24.04.4 LTS
#
# Matrix products: default
# BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
# LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#
# locale:
# [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
# [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
# [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
# [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
# [9] LC_ADDRESS=C LC_TELEPHONE=C
# [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#
# time zone: Etc/UTC
# tzcode source: system (glibc)
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] Matrix_1.7-5 L0Learn_2.1.0 susieR_0.16.4 rmarkdown_2.31
#
# loaded via a namespace (and not attached):
# [1] gtable_0.3.6 jsonlite_2.0.0 compiler_4.6.0
# [4] crayon_1.5.3 Rcpp_1.1.1-1.1 stringr_1.6.0
# [7] jquerylib_0.1.4 scales_1.4.0 yaml_2.3.12
# [10] fastmap_1.2.0 lattice_0.22-9 plyr_1.8.9
# [13] ggplot2_4.0.3 R6_2.6.1 labeling_0.4.3
# [16] mixsqp_0.3-54 knitr_1.51 MASS_7.3-65
# [19] maketools_1.3.2 zigg_0.0.2 bslib_0.11.0
# [22] RColorBrewer_1.1-3 rlang_1.2.0 stringi_1.8.7
# [25] cachem_1.1.0 reshape_0.8.10 xfun_0.58
# [28] sass_0.4.10 sys_3.4.3 S7_0.2.2
# [31] RcppParallel_5.1.11-2 otel_0.2.0 cli_3.6.6
# [34] withr_3.0.2 magrittr_2.0.5 digest_0.6.39
# [37] grid_4.6.0 irlba_2.3.7 lifecycle_1.0.5
# [40] vctrs_0.7.3 Rfast_2.1.5.2 evaluate_1.0.5
# [43] glue_1.8.1 farver_2.1.2 buildtools_1.0.0
# [46] reshape2_1.4.5 matrixStats_1.5.0 tools_4.6.0
# [49] htmltools_0.5.9