Last updated: 2021-03-07

Checks: 7 0

Knit directory: mmbr-rss-dsc/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


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.

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.

The command set.seed(20200227) 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.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 0fb6f66. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

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:    data/.DS_Store
    Ignored:    output/.DS_Store

Untracked files:
    Untracked:  data/ENSG00000140265.12.Multi_Tissues.rds
    Untracked:  data/FastQTLSumStats.mash.FL_PC3.rds
    Untracked:  data/mmbr_ukb_simulation/
    Untracked:  data/mmbr_ukb_simulation_problem/
    Untracked:  output/GTExprofile_res.rds
    Untracked:  output/GTExprofile_resL1.rds
    Untracked:  output/GTExprofile_resL1_elbo.rds
    Untracked:  output/GTExprofile_resL3.rds
    Untracked:  output/GTExprofile_resL3_elbo.rds
    Untracked:  output/GTExprofile_res_elbo.rds
    Untracked:  output/GTExprofile_resapprox.rds
    Untracked:  output/GTExprofile_resapproxL1.rds
    Untracked:  output/GTExprofile_resapproxL1_elbo.rds
    Untracked:  output/GTExprofile_resapproxL3.rds
    Untracked:  output/GTExprofile_resapproxL3_elbo.rds
    Untracked:  output/GTExprofile_resapprox_elbo.rds
    Untracked:  output/GTExprofile_resapproxdiag.rds
    Untracked:  output/GTExprofile_resapproxdiagL1.rds
    Untracked:  output/GTExprofile_resapproxdiagL1_elbo.rds
    Untracked:  output/GTExprofile_resapproxdiagL3.rds
    Untracked:  output/GTExprofile_resapproxdiagL3_elbo.rds
    Untracked:  output/GTExprofile_resapproxdiag_elbo.rds
    Untracked:  output/GTExprofile_resdiag.rds
    Untracked:  output/mmbr_gtex_res.Rprof
    Untracked:  output/mmbr_gtex_res_approx.Rprof
    Untracked:  output/mmbr_gtex_res_approx_diag.Rprof
    Untracked:  output/mmbr_gtex_res_diag.Rprof
    Untracked:  output/mnm_missing_output.20200527.rds
    Untracked:  output/test
    Untracked:  output/tiny_data_211_cond2L2.gif
    Untracked:  output/tiny_data_211_cond2L2.pdf
    Untracked:  output/tiny_data_211_cond2L3.gif
    Untracked:  output/tiny_data_211_cond2L3.pdf
    Untracked:  output/tiny_data_211_cond2initL3.gif
    Untracked:  output/tiny_data_211_cond2initL3.pdf
    Untracked:  output/ukb_rss_20200107/

Unstaged changes:
    Modified:   analysis/mmbr_missing_rss_problem1.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.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/priors_ed.Rmd) and HTML (docs/priors_ed.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 0fb6f66 zouyuxin 2021-03-07 wflow_publish(“analysis/priors_ed.Rmd”)
html 6207fc4 zouyuxin 2021-03-07 Build site.
Rmd 0bf01d6 zouyuxin 2021-03-07 wflow_publish(“analysis/priors_ed.Rmd”)
html f66878a zouyuxin 2021-01-06 Build site.
Rmd 55392ee zouyuxin 2021-01-06 wflow_publish(“analysis/priors_ed.Rmd”)
html 5cde9b1 zouyuxin 2020-12-31 Build site.
Rmd 076ad09 zouyuxin 2020-12-31 wflow_publish(“analysis/priors_ed.Rmd”)
html 1e7d351 zouyuxin 2020-12-22 Build site.
Rmd 9291a06 zouyuxin 2020-12-22 wflow_publish(“analysis/priors_ed.Rmd”)

The result is from this notebook.

Artificial mixture

dat_a = readRDS('data/mmbr_ukb_simulation/artificial_mixture_ukb.FL_PC3.EDudr.rds')
names(dat_a)
[1] "U"      "w"      "loglik"
names(dat_a$w) = names(dat_a$U)
barplot(dat_a$w, las=2, cex.names = 0.7)

Version Author Date
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
1e7d351 zouyuxin 2020-12-22
tol = 1E-15
names(dat_a$U)[which(dat_a$w>tol)]
[1] "FLASH_3" "FLASH_4" "tFLASH"  "tPCA"    "XX"     

The component with strongest weight is tXX.

plot_sharing = function(X) {
clrs <- colorRampPalette(rev(c("#D73027","#FC8D59","#FEE090","#FFFFBF",
                               "#E0F3F8","#91BFDB","#4575B4")))(128)
# lat <- cov2cor(X)
lat <- X/max(diag(X))
lat[lower.tri(lat)] <- NA
n <- nrow(lat)
print(lattice::levelplot(lat[n:1,],col.regions = clrs,xlab = "",ylab = "",
                colorkey = TRUE,at = seq(-1,1,length.out = 128),
                scales = list(cex = 0.6,x = list(rot = 45))))
}
plot_sharing(dat_a$U$XX)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
1e7d351 zouyuxin 2020-12-22
plot_sharing(dat_a$U$tFLASH)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
1e7d351 zouyuxin 2020-12-22
plot_sharing(dat_a$U$FLASH_3)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
plot_sharing(dat_a$U$FLASH_4)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
1e7d351 zouyuxin 2020-12-22

UKB bloodcells mixture

dat_ukb = readRDS('data/mmbr_ukb_simulation/ukb_bloodcells_mixture.FL_PC3.EDudr.rds')
names(dat_ukb$w) = names(dat_ukb$U)
barplot(dat_ukb$w, las=2, cex.names = 0.7)

Version Author Date
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
names(dat_ukb$U)[which(dat_ukb$w>tol)]
 [1] "FLASH_1" "FLASH_3" "FLASH_4" "FLASH_5" "FLASH_6" "FLASH_8" "FLASH_9"
 [8] "tFLASH"  "PCA_2"   "tPCA"    "XX"     
plot_sharing(dat_ukb$U$XX)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
plot_sharing(dat_ukb$U$FLASH_8)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31
plot_sharing(dat_ukb$U$tFLASH)

Version Author Date
6207fc4 zouyuxin 2021-03-07
f66878a zouyuxin 2021-01-06
5cde9b1 zouyuxin 2020-12-31

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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] workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6      whisker_0.4     knitr_1.30      magrittr_2.0.1 
 [5] lattice_0.20-41 R6_2.5.0        rlang_0.4.10    stringr_1.4.0  
 [9] tools_4.0.3     grid_4.0.3      xfun_0.19       git2r_0.27.1   
[13] htmltools_0.5.0 ellipsis_0.3.1  yaml_2.2.1      digest_0.6.27  
[17] rprojroot_2.0.2 tibble_3.0.6    lifecycle_1.0.0 crayon_1.4.1   
[21] later_1.1.0.1   vctrs_0.3.6     promises_1.1.1  fs_1.5.0       
[25] glue_1.4.2      evaluate_0.14   rmarkdown_2.5   stringi_1.5.3  
[29] compiler_4.0.3  pillar_1.4.7    httpuv_1.5.4    pkgconfig_2.0.3