Last updated: 2024-08-29
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 2053ed2. 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/multi_group_compare_predictdb_munro_updated.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/multi_group_compare_predictdb_munro_updated.Rmd
)
and HTML
(docs/multi_group_compare_predictdb_munro_updated.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 | 184fb61 | XSun | 2024-08-26 | update |
Rmd | b0ae84b | XSun | 2024-08-19 | update |
html | b0ae84b | XSun | 2024-08-19 | update |
Rmd | 2818106 | XSun | 2024-08-09 | update |
html | 2818106 | XSun | 2024-08-09 | update |
We compare the results from Munro weights & predictdb weights here. We are figuring out how the number of high PIP genes compare with PredictDB results with the same tissues?
PredictDB:
all the PredictDB are converted from FUSION weights
PredictDB (eqtl, sqtl)
mem: 150g 5cores
Version | Author | Date |
---|---|---|
2818106 | XSun | 2024-08-09 |
2024-08-29 15:46:41 INFO::Annotating ctwas finemapping result ...
2024-08-29 15:46:51 INFO::add gene_name and gene_type
2024-08-29 15:46:55 INFO::split PIPs for traits mapped to multiple genes
2024-08-29 15:46:55 INFO::use gene mid positions
2024-08-29 15:46:55 INFO::add SNP positions
Version | Author | Date |
---|---|---|
2818106 | XSun | 2024-08-09 |
2024-08-29 15:47:16 INFO::Annotating ctwas finemapping result ...
2024-08-29 15:47:20 INFO::add gene_name and gene_type
2024-08-29 15:47:21 INFO::use gene mid positions
2024-08-29 15:47:21 INFO::add SNP positions
If we filter by combined pip >0.8 in both settings, we have
[1] "# of Unique munro genes = 18"
[1] "# of Unique munro genes included in predictdb data = 12"
Version | Author | Date |
---|---|---|
2818106 | XSun | 2024-08-09 |
2024-08-29 15:47:42 INFO::Annotating ctwas finemapping result ...
2024-08-29 15:47:47 INFO::add gene_name and gene_type
2024-08-29 15:47:47 INFO::split PIPs for traits mapped to multiple genes
2024-08-29 15:47:47 INFO::use gene mid positions
2024-08-29 15:47:47 INFO::add SNP positions
Version | Author | Date |
---|---|---|
2818106 | XSun | 2024-08-09 |
2024-08-29 15:48:05 INFO::Annotating ctwas finemapping result ...
2024-08-29 15:48:08 INFO::add gene_name and gene_type
2024-08-29 15:48:09 INFO::use gene mid positions
2024-08-29 15:48:09 INFO::add SNP positions
If we filter by combined pip >0.8 in both settings, we have
There’s no overlapped genes at combined_pip > 0.8.
We noticed that, when using Munro’s weights, we have GNA12 as the top1 IBD risk gene, which has been reported by literature. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10323775/
But when using predictdb weights, we missed this gene.
We are trying to figure out why GNA12 was missed by predictdb weights.
In predictdb eQTL model, there are 2 SNPs,
weight
rs208345 0.0925621
rs2533879 -0.1090777
In Munro eQTL model, there are 5 SNPs,
weight
rs755179 0.01220240
rs798544 -0.04916490
rs798502 -0.06499180
rs208345 0.03188710
rs12540595 -0.00183916
We extracted the EUR LD R2 from 1000G using https://ldlink.nih.gov/?tab=ldmatrix
We noticed that, the 2 SNPs in predictdb weights are either in Munro weights (rs208345) or in LD with the Munro eQTLs (rs2533879).
rs755179 | rs798544 | rs798502 | rs208345 | rs12540595 | |
---|---|---|---|---|---|
rs208345 | 0.004 | 0.049 | 0.051 | 1.0 | 0.001 |
rs2533879 | 0.002 | 0.8 | 0.929 | 0.051 | 0.004 |
We also noticed that, 2 (rs798502,rs798544) of the 5 Munro eQTLs are in LD with each other
rs755179 | rs798544 | rs798502 | rs208345 | rs12540595 | |
---|---|---|---|---|---|
rs755179 | 1.0 | 0.003 | 0.003 | 0.004 | 0.0 |
rs798544 | 0.003 | 1.0 | 0.838 | 0.049 | 0.005 |
rs798502 | 0.003 | 0.838 | 1.0 | 0.051 | 0.005 |
rs208345 | 0.004 | 0.049 | 0.051 | 1.0 | 0.001 |
rs12540595 | 0.0 | 0.005 | 0.005 | 0.001 | 1.0 |
We checked the z scores for these SNPs,
id A1 A2 z
4216443 rs755179 T C 0.4172662
4217471 rs798544 C T 4.7883212
4217631 rs798502 A C 5.2463768
4217679 rs208345 A G -2.0923913
4218004 rs2533879 G A 4.7518248
4219465 rs12540595 G A -1.7364341
The z-scores for GNA12 are:
predictdb: -4.461474
Munro: -6.736242
[1] "# of Unique munro genes = 18"
[1] "# of Unique munro genes included in predictdb data = 12"
finemap_res_predictdb_overlapped <- finemap_res_predictdb[finemap_res_predictdb$gene_name %in% overlapped_gene_all$genename,]
finemap_res_munro_overlapped <- finemap_res_munro[finemap_res_munro$gene_name %in% overlapped_gene_all$genename,]
finemap_res_predictdb_overlapped_eqtl <- finemap_res_predictdb_overlapped[finemap_res_predictdb_overlapped$type =="eQTL",]
overlapped_eqtl_predictdb <- finemap_res_predictdb_overlapped_eqtl[,c("gene_name","z","susie_pip")]
finemap_res_munro_overlapped_eqtl <- finemap_res_munro_overlapped[finemap_res_munro_overlapped$type =="eQTL",]
overlapped_eqtl_munro <- finemap_res_munro_overlapped_eqtl[,c("gene_name","z","susie_pip")]
merge_eqtl <- merge(overlapped_eqtl_predictdb, overlapped_eqtl_munro, by="gene_name")
colnames(merge_eqtl) <- c("gene_name","z_predictdb", "pip_predictdb","z_munro", "pip_munro")
merge_eqtl <- data.frame(lapply(merge_eqtl, function(x) {
if(is.numeric(x)) format(round(x, 4), nsmall = 4)
else x
}))
DT::datatable(merge_eqtl,caption = htmltools::tags$caption( style = 'caption-side: topleft; text-align = left; color:black;','Z-scores and PIPs computed from eQTL, for the overlapped genes'),options = list(pageLength = 5) )
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] stats4 stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] cowplot_1.1.1 ggrepel_0.9.1
[3] locuszoomr_0.2.1 logging_0.10-108
[5] EnsDb.Hsapiens.v86_2.99.0 ensembldb_2.20.2
[7] AnnotationFilter_1.20.0 GenomicFeatures_1.48.3
[9] AnnotationDbi_1.58.0 Biobase_2.56.0
[11] GenomicRanges_1.48.0 GenomeInfoDb_1.39.9
[13] IRanges_2.30.0 S4Vectors_0.34.0
[15] BiocGenerics_0.42.0 gridExtra_2.3
[17] forcats_0.5.1 stringr_1.5.1
[19] dplyr_1.1.4 purrr_1.0.2
[21] readr_2.1.2 tidyr_1.3.0
[23] tibble_3.2.1 ggplot2_3.5.1
[25] tidyverse_1.3.1 data.table_1.14.2
[27] ctwas_0.4.7
loaded via a namespace (and not attached):
[1] colorspace_2.0-3 rjson_0.2.21
[3] ellipsis_0.3.2 rprojroot_2.0.3
[5] XVector_0.36.0 fs_1.5.2
[7] rstudioapi_0.13 farver_2.1.0
[9] DT_0.22 bit64_4.0.5
[11] lubridate_1.8.0 fansi_1.0.3
[13] xml2_1.3.3 codetools_0.2-18
[15] cachem_1.0.6 knitr_1.39
[17] jsonlite_1.8.0 workflowr_1.7.0
[19] Rsamtools_2.12.0 broom_0.8.0
[21] dbplyr_2.1.1 png_0.1-7
[23] compiler_4.2.0 httr_1.4.3
[25] backports_1.4.1 assertthat_0.2.1
[27] Matrix_1.5-3 fastmap_1.1.0
[29] lazyeval_0.2.2 cli_3.6.1
[31] later_1.3.0 htmltools_0.5.2
[33] prettyunits_1.1.1 tools_4.2.0
[35] gtable_0.3.0 glue_1.6.2
[37] GenomeInfoDbData_1.2.8 rappdirs_0.3.3
[39] Rcpp_1.0.12 cellranger_1.1.0
[41] jquerylib_0.1.4 vctrs_0.6.5
[43] Biostrings_2.64.0 rtracklayer_1.56.0
[45] crosstalk_1.2.0 xfun_0.41
[47] rvest_1.0.2 lifecycle_1.0.4
[49] irlba_2.3.5 restfulr_0.0.14
[51] XML_3.99-0.14 zlibbioc_1.42.0
[53] zoo_1.8-10 scales_1.3.0
[55] gggrid_0.2-0 hms_1.1.1
[57] promises_1.2.0.1 MatrixGenerics_1.8.0
[59] ProtGenerics_1.28.0 parallel_4.2.0
[61] SummarizedExperiment_1.26.1 LDlinkR_1.2.3
[63] yaml_2.3.5 curl_4.3.2
[65] memoise_2.0.1 sass_0.4.1
[67] biomaRt_2.54.1 stringi_1.7.6
[69] RSQLite_2.3.1 highr_0.9
[71] BiocIO_1.6.0 filelock_1.0.2
[73] BiocParallel_1.30.3 rlang_1.1.2
[75] pkgconfig_2.0.3 matrixStats_0.62.0
[77] bitops_1.0-7 evaluate_0.15
[79] lattice_0.20-45 labeling_0.4.2
[81] GenomicAlignments_1.32.0 htmlwidgets_1.5.4
[83] bit_4.0.4 tidyselect_1.2.0
[85] magrittr_2.0.3 R6_2.5.1
[87] generics_0.1.2 DelayedArray_0.22.0
[89] DBI_1.2.2 withr_2.5.0
[91] haven_2.5.0 pgenlibr_0.3.3
[93] pillar_1.9.0 whisker_0.4
[95] KEGGREST_1.36.3 RCurl_1.98-1.7
[97] mixsqp_0.3-43 modelr_0.1.8
[99] crayon_1.5.1 utf8_1.2.2
[101] BiocFileCache_2.4.0 plotly_4.10.0
[103] tzdb_0.4.0 rmarkdown_2.25
[105] progress_1.2.2 readxl_1.4.0
[107] grid_4.2.0 blob_1.2.3
[109] git2r_0.30.1 reprex_2.0.1
[111] digest_0.6.29 httpuv_1.6.5
[113] munsell_0.5.0 viridisLite_0.4.0
[115] bslib_0.3.1