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: f93fe35

    Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

    Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use 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/P475full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
        Untracked:  docs/P475full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
        Untracked:  docs/P75full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
        Untracked:  docs/P75full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
        Untracked:  docs/figure/test.Rmd/
        Untracked:  output/dscoutProblem475.rds
        Untracked:  output/dscoutProblem75.rds
    
    Unstaged changes:
        Deleted:    output/P475full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
        Deleted:    output/P475full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
        Deleted:    output/P75full_data_1_get_sumstats_1_dap_z_1_plot_dap_1.plot_file.pdf
        Deleted:    output/P75full_data_1_get_sumstats_1_finemap_1_plot_finemap_1.plot_file.pdf
    
    
    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.
Expand here to see past versions:
    File Version Author Date Message
    Rmd f93fe35 zouyuxin 2019-02-15 wflow_publish(“analysis/Problem475.Rmd”)
    html ecd4dbd zouyuxin 2019-02-15 Build site.
    Rmd 433aa95 zouyuxin 2019-02-15 wflow_publish(“analysis/Problem475.Rmd”)
    html 46a3b92 zouyuxin 2019-02-15 Build site.
    Rmd a53d903 zouyuxin 2019-02-15 wflow_publish(“analysis/Problem475.Rmd”)
    html de16487 zouyuxin 2019-02-14 Build site.
    Rmd b7955b3 zouyuxin 2019-02-14 wflow_publish(“analysis/Problem475.Rmd”)


The simulated data has 5 true effects. The PVE is 0.8.

library(kableExtra)
library(knitr)
library(susieR)
library(png)
data = readRDS('data/sim_gaussian_475.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)

Expand here to see past versions of unnamed-chunk-1-1.png:
Version Author Date
de16487 zouyuxin 2019-02-14

The true signals are at 164, 474, 850, 855, 892.

dscout = readRDS('output/dscoutProblem475.rds')
fit_susie = readRDS('~/Documents/GitHub/dsc-finemap/output/susie_z_Problem475/susie_z/full_data_1_get_sumstats_1_susie_z_1.rds')
Using SuSiE z, it captures 2 causal SNPs. The PIP plot is
SuSiE z PIP

SuSiE z PIP

Expand here to see past versions of susie_z-1.png:
Version Author Date
de16487 zouyuxin 2019-02-14

The model from DAP-G finds 6 credible sets, 3 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 28 SNPs, 3 of them are true signals. 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.

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.

Expand here to see past versions of unnamed-chunk-4-1.png:
Version Author Date
46a3b92 zouyuxin 2019-02-15

Comparing the PIP for the true signal:

susie_pip = as.numeric(dscout[1, 11:15])
dap_pip = as.numeric(dscout[3, 23:27])
finemap_pip = as.numeric(dscout[4, 32:36])
tmp = rbind(susie_pip, dap_pip, finemap_pip)
row.names(tmp) = c('susie z', 'dap', 'finemap')
colnames(tmp) = paste0('Signal ', 1:5)
tmp %>% kable() %>% kable_styling()
Signal 1 Signal 2 Signal 3 Signal 4 Signal 5
susie z 1.000000 0.000000 0.1332687 0 0e+00
dap 0.999044 0.999044 0.8398070 0 0e+00
finemap 1.000000 0.766100 0.1730000 0 3e-04

Session information

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