Last updated: 2024-09-26

Checks: 6 1

Knit directory: multigroup_ctwas_analysis/

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


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

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(20231112) 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 e6f2526. 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:    .Rhistory
    Ignored:    results/

Unstaged changes:
    Modified:   analysis/LDL_predictdb_sQTL.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/LDL_predictdb_sQTL.Rmd) and HTML (docs/LDL_predictdb_sQTL.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 e6f2526 XSun 2024-09-25 update
html e6f2526 XSun 2024-09-25 update

Introduction

We run susie_rss from susieR to compare with the ctwas finemapping function here.

We run with uniform prior.

Results

Run with ctwas processed zscores

Using SNP only

standard susie (PIP_CS) ctwas finemapping (PIP_CS)
PIP_rs6062496(sQTL) PIP_rs6089961 PIP_rs202143810 othersnps PIP_rs6062496(sQTL) PIP_rs6089961 PIP_rs202143810 othersnps
L
1 1_1 1_1
2 1_1 1_2 1_1 1_2
3 1_3 1_2 rs112662625 0.89_1;rs113365193 0.06_1 1_1 1_3 1_2
4 1_1 1_2 1_1 1_2
5 1_3 1_2 rs112662625 0.90_1;rs113365193 0.06_1 1_1 1_3 1_2
6 1_1 1_2 1_1 1_2 rs35201382 0.14_1
7 1_3 1_2 rs112662625 0.90_1;rs113365193 0.06_1 1_1 1_3 1_2 rs35201382 0.13_3
8 1_1 1_2 rs35201382 0.22_1 1_1 1_2 rs35201382 0.30_1
9 1_5 1_2 rs35201382 0.21_5, rs112662625 0.90_1;rs113365193 0.07_1 1_1 1_3 1_2 rs35201382 0.29_3
10 1_5 1_2 rs35201382 0.2_5, rs367993153 0.91_1, rs1295810 0.08_1 1_1 1_2 rs35201382 0.27_1, rs1295810 0.94_9, rs367993153 0.03_9
load("/project/xinhe/xsun/multi_group_ctwas/8.deciding_weights/data/R2_topsnp.rdata")
DT::datatable(R2,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','R2 for the SNPs above'),options = list(pageLength = 10) )

Using SNP + intron of TNFRSF6B

standard susie (PIP_CS) ctwas finemapping (PIP_CS)
L PIP_rs6062496(sQTL) PIP_rs6089961 PIP_rs202143810 othersnps PIP_rs6062496(sQTL) PIP_rs6089961 PIP_rs202143810 othersnps
1 rs6062496_0.5_1; TNFRSF6B_0.5_1 rs6062496_0.5_1; TNFRSF6B_0.5_1
2 1_1 1_2 1_1 1_2
3 1_3 1_2 rs112662625 0.89_1;rs113365193 0.06_1 rs6062496_0.5_1; TNFRSF6B_0.5_1 1_3 1_2
4 1_1 1_2 1_1 1_2
5 1_3 1_2 rs112662625 0.90_1;rs113365193 0.06_1 rs6062496_0.5_1; TNFRSF6B_0.5_1 1_3 1_2
6 1_1 1_2 1_1 1_2 rs35201382 0.14_1
7 1_3 1_2 rs112662625 0.90_1;rs113365193 0.06_1 rs6062496_0.5_1; TNFRSF6B_0.5_1 1_3 1_2 rs35201382 0.13_3
8 1_1 1_2 rs35201382 0.22_1 1_1 1_2 rs35201382 0.30_1
9 1_5 1_2 rs35201382 0.21_5, rs112662625 0.90_1;rs113365193 0.07_1 rs6062496_0.5_1; TNFRSF6B_0.5_1 1_3 1_2 rs35201382 0.29_3
10 1_5 1_2 rs35201382 0.2_5, rs367993153 0.91_1, rs1295810 0.08_1 1_1 1_2 rs35201382 0.27_1, rs1295810 0.94_9, rs367993153 0.03_9

Run with raw zscores

For standard susie, if we run with raw zscores computed from the origin vcf file:

L=1~10, rs6062496 is the only SNP with PIP > 0.8 & in CS. The PIP for this SNP is 1. For the other two SNPs, rs6089961 and rs202143810, the highest PIP is 0.002.

Compare the z_scores

load("/project/xinhe/xsun/multi_group_ctwas/8.deciding_weights/data/z_snp_merge.rdata")
z_snp_merge$z_computefromvcf <- z_snp_merge$ES_raw/z_snp_merge$SE_raw

DT::datatable(z_snp_merge,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','z_snp'),options = list(pageLength = 10) )
plot(z_snp_merge$z_ctwasprocess,z_snp_merge$z_computefromvcf)

Version Author Date
e6f2526 XSun 2024-09-25
index <- which(z_snp_merge$z_computefromvcf != -z_snp_merge$z_ctwasprocess)
DT::datatable(z_snp_merge[index,],caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','The outlier SNPs'),options = list(pageLength = 10) )

sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /software/openblas-0.3.13-el7-x86_64/lib/libopenblas_haswellp-r0.3.13.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.12       highr_0.9         pillar_1.9.0      compiler_4.2.0   
 [5] bslib_0.3.1       later_1.3.0       jquerylib_0.1.4   git2r_0.30.1     
 [9] workflowr_1.7.0   tools_4.2.0       digest_0.6.29     jsonlite_1.8.0   
[13] evaluate_0.15     lifecycle_1.0.4   tibble_3.2.1      pkgconfig_2.0.3  
[17] rlang_1.1.2       cli_3.6.1         rstudioapi_0.13   crosstalk_1.2.0  
[21] yaml_2.3.5        xfun_0.41         fastmap_1.1.0     stringr_1.5.1    
[25] knitr_1.39        fs_1.5.2          vctrs_0.6.5       sass_0.4.1       
[29] htmlwidgets_1.5.4 rprojroot_2.0.3   DT_0.22           glue_1.6.2       
[33] R6_2.5.1          fansi_1.0.3       rmarkdown_2.25    magrittr_2.0.3   
[37] whisker_0.4       promises_1.2.0.1  htmltools_0.5.2   httpuv_1.6.5     
[41] utf8_1.2.2        stringi_1.7.6