Last updated: 2019-02-15
workflowr checks: (Click a bullet for more information) ✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
✔ Seed:
set.seed(20190115)
The command set.seed(20190115) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
✔ Repository version: d9e11bf
wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: .sos/
Ignored: data/.DS_Store
Ignored: output/.DS_Store
Untracked files:
Untracked: docs/figure/test.Rmd/
Untracked: output/P475full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
Untracked: output/P475full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
Untracked: output/P75full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
Untracked: output/P75full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
Untracked: output/dscoutProblem475.rds
Untracked: output/dscoutProblem75.rds
Unstaged changes:
Modified: analysis/Problem475.Rmd
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
The simulated data has 1 true effects. The PVE is 0.5.
library(kableExtra)
library(knitr)
library(susieR)
library(png)
data = readRDS('data/sim_gaussian_75.rds')
n = data$n
beta = numeric(data$p)
beta[data$beta_idx] = data$beta_val
z = data$ss$effect/data$ss$se
susie_plot(z, y = "z", b=beta)

| Version | Author | Date |
|---|---|---|
| 34cdf51 | zouyuxin | 2019-02-15 |
The true signals are at 386.
dscout = readRDS('output/dscoutProblem75.rds')
fit_susie = readRDS('~/Documents/GitHub/dsc-finemap/output/susie_z_Problem75/susie_z/full_data_1_get_sumstats_1_susie_z_1.rds')
Using SuSiE z, it captures the causal SNPs. The PIP plot is
SuSiE z PIP
| Version | Author | Date |
|---|---|---|
| 34cdf51 | zouyuxin | 2019-02-15 |
The model from DAP-G finds 8 credible sets, 1 of them contain true signals.
DAP result: A is the probability of different credible set. B is the PIP of the top 10 SNPs
The 95% confidence set from finemap contains 1000 SNPs, 1 of them are true signals. It prefers the model with 3 causal SNPs. Both finemap and dap have many false positives. finemap result
finemap result: A is the posterior of number of causals. B is the probability of different configuration. C is the PIP of the top 10 SNPs.
| Version | Author | Date |
|---|---|---|
| 34cdf51 | zouyuxin | 2019-02-15 |
Comparing the PIP for the true signal:
susie_pip = matrix(as.numeric(dscout[1, 11]), 1,1)
dap_pip = matrix(as.numeric(dscout[3, 19]), 1,1)
finemap_pip = matrix(as.numeric(dscout[4, 24]), 1,1)
tmp = rbind(susie_pip, dap_pip, finemap_pip)
row.names(tmp) = c('susie z', 'dap', 'finemap')
colnames(tmp) = paste0('Signal ', 1)
tmp %>% kable() %>% kable_styling()
| Signal 1 | |
|---|---|
| susie z | 0.4989211 |
| dap | 0.4994650 |
| finemap | 0.4999000 |
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.14.3
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] png_0.1-7 susieR_0.6.4.0438 knitr_1.20 kableExtra_1.0.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 highr_0.7 pillar_1.3.1
[4] compiler_3.5.1 git2r_0.24.0 workflowr_1.1.1
[7] R.methodsS3_1.7.1 R.utils_2.7.0 tools_3.5.1
[10] digest_0.6.18 evaluate_0.12 tibble_2.0.1
[13] viridisLite_0.3.0 lattice_0.20-38 pkgconfig_2.0.2
[16] rlang_0.3.1 Matrix_1.2-15 rstudioapi_0.9.0
[19] yaml_2.2.0 stringr_1.3.1 httr_1.4.0
[22] xml2_1.2.0 hms_0.4.2 rprojroot_1.3-2
[25] webshot_0.5.1 grid_3.5.1 glue_1.3.0
[28] R6_2.3.0 rmarkdown_1.11 readr_1.3.1
[31] magrittr_1.5 whisker_0.3-2 backports_1.1.3
[34] scales_1.0.0 htmltools_0.3.6 rvest_0.3.2
[37] colorspace_1.4-0 stringi_1.2.4 munsell_0.5.0
[40] crayon_1.3.4 R.oo_1.22.0
This reproducible R Markdown analysis was created with workflowr 1.1.1