Last updated: 2024-12-12

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 6b46378. 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

Unstaged changes:
    Modified:   analysis/data.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/data.Rmd) and HTML (docs/data.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 6b46378 XSun 2024-12-11 update
html 6b46378 XSun 2024-12-11 update
Rmd afa8021 XSun 2024-11-22 update
html afa8021 XSun 2024-11-22 update
Rmd ec8887f XSun 2024-11-21 update
html ec8887f XSun 2024-11-21 update
Rmd c420007 XSun 2024-11-21 update
html c420007 XSun 2024-11-21 update
Rmd bb59ace XSun 2023-12-05 updadate
html bb59ace XSun 2023-12-05 updadate
Rmd ddf474a Xiaotong Sun 2023-11-13 update
html ddf474a Xiaotong Sun 2023-11-13 update

GWAS

Round 1

Sample size Ancestry ID Year ref link
IBD (same with ctwas paper) 59,957 Mixed ebi-a-GCST004131 2017 PMID: 28067908 https://gwas.mrcieu.ac.uk/datasets/ebi-a-GCST004131/
SBP (same with ctwas paper) 317,754 European ukb-a-360 2017 Rapid GWAS Project. In: http://www.nealelab.is/uk-biobank (accessed in 2021). https://gwas.mrcieu.ac.uk/datasets/ukb-a-360/
LDL (same with ctwas paper) 343,621 European ukb-d-30780_irnt 2018 same with above https://gwas.mrcieu.ac.uk/datasets/ukb-d-30780_irnt/
SCZ 127,906 European ieu-b-5102 2022 PMID: 35396580 https://gwas.mrcieu.ac.uk/datasets/ieu-b-5102/
AFib 1,030,836 European ebi-a-GCST006414 2018 PMID: 30061737 https://gwas.mrcieu.ac.uk/datasets/ebi-a-GCST006414/
Asthma 361,194 European ukb-d-J10_ASTHMA 2018 http://www.nealelab.is/uk-biobank/ (cite this website) https://gwas.mrcieu.ac.uk/datasets/ukb-d-J10_ASTHMA/
WBC 563,946 European ieu-b-30 2020 PMID: 32888494 https://gwas.mrcieu.ac.uk/datasets/ieu-b-30/

Extended 1

Munro’s traits (GTEx)

https://zenodo.org/records/3629742#.XjCh9OF7m90

gtex <- data.table::fread("/project/xinhe/xsun/multi_group_ctwas/data/gwas/gwas_metadata_gtex.txt")

#gwas_selected_gtex <- readxl::read_excel("/project/xinhe/xsun/multi_group_ctwas/data/gwas/gwas_selected.xlsx",sheet = 4)

gwas_ukb <- gtex[gtex$Consortium == "UK Biobank",]
gwas_ukb_show <- gwas_ukb[,c("Category","new_Phenotype","new_abbreviation","Sample_Size","Cases","Tag")]
gwas_ukb_show <- gwas_ukb_show[order(gwas_ukb_show$Category),]
DT::datatable(gwas_ukb_show,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',"Munro's GWAS (GTEx, only UKB are shown)"),options = list(pageLength = 10) )
gwas_noukb <- gtex[gtex$Consortium != "UK Biobank",]
gwas_noukb <- gwas_noukb[,c("Category","new_Phenotype","new_abbreviation","Sample_Size","Cases","Tag")]
gwas_noukb_show <- gwas_noukb[order(gwas_noukb$Category),]
DT::datatable(gwas_noukb_show,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',"Munro's GWAS (GTEx, non-UKB are shown)"),options = list(pageLength = 10) )

Pan-UKB

https://www.medrxiv.org/content/10.1101/2024.03.13.24303864v2.full.pdf

https://pan.ukbb.broadinstitute.org/downloads/index.html

https://docs.google.com/spreadsheets/d/1AeeADtT0U1AukliiNyiVzVRdLYPkTbruQSk38DeutU8/edit?gid=1450719288#gid=1450719288

load("/project/xinhe/xsun/multi_group_ctwas/data/gwas/panukb.rdata")

gwas_selected_panukb <- readxl::read_excel("/project/xinhe/xsun/multi_group_ctwas/data/gwas/gwas_selected.xlsx",sheet = 3)

gwas_detail <- merge(gwas_selected_panukb, panukb_cut, by.x = "ID", by.y = "filename", all.x = TRUE)
gwas_detail <- gwas_detail[match(gwas_selected_panukb$traits,gwas_detail$traits),]
gwas_detail <- gwas_detail[c(setdiff(names(gwas_detail), "ID"), "ID")]

gwas_detail <- gwas_detail[,c("trait_category","sub_category","traits","abbreviation","trait_type","trait_efo_terms","description","category","pops","n_cases_EUR","n_controls_EUR","wget","ID")]
gwas_detail <- gwas_detail[complete.cases(gwas_detail$wget),]

DT::datatable(gwas_detail,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','GWAS selected from pan-ukb'),options = list(pageLength = 10) )
panukb_cut <- panukb_cut[,c("trait_type","trait_efo_terms","description","category","pops","n_cases_EUR","n_controls_EUR","wget")]
DT::datatable(panukb_cut,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','All GWAS from pan-ukb'),options = list(pageLength = 5) )
Warning in instance$preRenderHook(instance): It seems your data is too
big for client-side DataTables. You may consider server-side processing:
https://rstudio.github.io/DT/server.html

UKB+Finn

https://www.nature.com/articles/s41588-021-00931-x#Sec9

load("/project/xinhe/xsun/multi_group_ctwas/data/gwas/traits_ukb.rdata")

gwas_selected_ukbfin <- readxl::read_excel("/project/xinhe/xsun/multi_group_ctwas/data/gwas/gwas_selected.xlsx",sheet = 2)

gwas_detail <- merge(gwas_selected_ukbfin, gwas_catalog, by.x = "ID", by.y = "id", all.x = TRUE)
gwas_detail <- gwas_detail[match(gwas_selected_ukbfin$traits,gwas_detail$traits),]
gwas_detail <- gwas_detail[c(setdiff(names(gwas_detail), "ID"), "ID")]
DT::datatable(gwas_detail,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','GWAS selected from ukb+finn meta'),options = list(pageLength = 10) )

TGFM

gwas <- read.table("/project/xinhe/xsun/multi_group_ctwas/data/gwas/TGFM.txt",header = T,fill = T, sep = "\t")
DT::datatable(gwas,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;','GWAS used in TGFM paper'),options = list(pageLength = 10) )

Weights

PredictDB weights

storaged in /project2/xinhe/shared_data/multigroup_ctwas/weights/predictdb_nolnc/mashr_“$WEIGHT”_nolnc.db

LD ref

from UKBB

storaged in

hg38 /project2/mstephens/wcrouse/UKB_LDR_0.1/

hg37 /project2/mstephens/wcrouse/UKB_LDR_0.1_b37/

download: https://uchicago.box.com/s/jqocacd2fulskmhoqnasrknbt59x3xkn

Manhattan plots for the GWAS data


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       cellranger_1.1.0  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] data.table_1.14.2 R6_2.5.1          fansi_1.0.3       readxl_1.4.0     
[37] rmarkdown_2.25    magrittr_2.0.3    whisker_0.4       promises_1.2.0.1 
[41] htmltools_0.5.2   httpuv_1.6.5      utf8_1.2.2        stringi_1.7.6