Last updated: 2022-07-11

Checks: 7 0

Knit directory: prelim/

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.


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(20220706) 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 c326a56. 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:


Untracked files:
    Untracked:  notes/other/

Unstaged changes:
    Deleted:    notes/questions_not_selected.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 (notes/question_5.Rmd) and HTML (docs/question_5.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 c326a56 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html f89d5bb chenh19 2022-07-11 Build site.
Rmd 09d97b4 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 974f411 chenh19 2022-07-11 Build site.
Rmd af26c63 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html c79bfc8 chenh19 2022-07-11 Build site.
Rmd a691a00 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html d890860 chenh19 2022-07-11 Build site.
html b27e5d9 chenh19 2022-07-11 Build site.
html 437e0e7 chenh19 2022-07-11 Build site.
html 88a8949 chenh19 2022-07-11 Build site.
html 022e3a1 chenh19 2022-07-11 Build site.
Rmd 43ac28f chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 721ff36 chenh19 2022-07-11 Build site.
Rmd 672794a chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 39f6719 chenh19 2022-07-11 Build site.
Rmd dbe2464 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 07c9680 chenh19 2022-07-11 Build site.
Rmd a2e28d3 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 8702450 chenh19 2022-07-11 Build site.
Rmd 3eb54dd chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html edbcc83 chenh19 2022-07-11 Build site.
Rmd 876ca2c chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html f4d068f chenh19 2022-07-11 Build site.
html a8634c8 chenh19 2022-07-11 Build site.
Rmd 32a7c96 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html cfc7302 chenh19 2022-07-11 Build site.
html 9115b50 chenh19 2022-07-11 Build site.
Rmd 9780342 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html e86892a chenh19 2022-07-11 Build site.
Rmd f297073 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html e7e3d68 chenh19 2022-07-11 Build site.
html 3fda0cf chenh19 2022-07-11 Build site.
html 6ef9396 chenh19 2022-07-11 Build site.
html 5d6ee07 chenh19 2022-07-11 Build site.
html ae0bd9e chenh19 2022-07-11 Build site.
Rmd 4d8d522 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html 68f6e74 chenh19 2022-07-11 Build site.
html 8f0cb9e chenh19 2022-07-11 Build site.
html 810be77 chenh19 2022-07-11 Build site.
html 18c6944 chenh19 2022-07-11 Build site.
html 6b5fb0b chenh19 2022-07-11 Build site.
Rmd 523e857 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html e682056 chenh19 2022-07-11 Build site.
html 8592037 chenh19 2022-07-11 Build site.
html 0162d2c chenh19 2022-07-11 Build site.
html 97f4f1f chenh19 2022-07-11 Build site.
html e3db667 chenh19 2022-07-11 Build site.
html 6c75f69 chenh19 2022-07-11 Build site.
html 0f9057d chenh19 2022-07-11 Build site.
html 47a3a3e chenh19 2022-07-11 Build site.
html ed969cb chenh19 2022-07-11 Build site.
html 1688cdc chenh19 2022-07-11 Build site.
html bb66deb chenh19 2022-07-11 Build site.
Rmd dabb598 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html ffc33d2 chenh19 2022-07-11 Build site.
html 9f9287c chenh19 2022-07-11 Build site.
html 1b4d4cc chenh19 2022-07-11 Build site.
html 78a1596 chenh19 2022-07-11 Build site.
html 43c67df chenh19 2022-07-11 Build site.
Rmd 15fad34 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")
html ddddfaf chenh19 2022-07-11 Build site.
html f97a781 chenh19 2022-07-11 Build site.
Rmd 0a0d690 chenh19 2022-07-11 wflow_publish("./notes/*.Rmd")

Materials

Questions

GWAS have successfully identified a large number of variants associated with a range of complex diseases. In most cases, however, the causal variants and their target genes remain unknown. A common strategy is to leverage expression QTL (eQTL) data to help narrow down causal variants and genes.

  1. Suppose a GWAS variant associated with the disease trait of interest is also associated with the expression of a gene X in some tissue. Can we conclude that X is a causal gene of the disease?

  2. A strategy to better integrate eQTL and GWAS data is colocalization analysis. Read the paper presenting the method coloc (ref-1). Given association data of two traits in one region, coloc tests if there is a common causal variant in the region for both traits. State the five hypothesis coloc is evaluating. Suppose we are given the prior probability a SNP is associated with trait 1, \(p_1\), with trait 2, \(p_2\), and with both traits \(p_{12}\). Let \(S\) be a configuration: it is a pair of binary vector of whether a SNP is causal to trait 1 and trait 2 (see Figure 1 for example). What is the prior probability of \(S\) when \(S\) belongs to each of the five hypothesis?

  3. The evidence of SNP association of a trait can be expressed as Bayes factor (BF), which compares two models, the SNP is associated with the trait vs. not associated. Suppose we know BF of each SNP in the region with respect to the two traits. Derive the posterior probability of colocalization in terms of the BFs of SNPs.

  4. It was found that results of coloc are sensitive to prior parameters. A program Enloc (ref-2) is designed to address this problem. Explain its main ideas.

  5. A naive approach to colocalization is: perform fine-mapping of both traits separately, and this allows one to assess how often a SNP is a causal variant to both traits. It would be the product of Posterior Inclusion Probabilities (PIPs) of the SNP with respect to the two traits. Explain the shortcoming of this approach, in light of Enloc.

  6. The key parameter of Enloc is called \(\alpha_1\). Define the parameter, and explain why it is important in your own language.

  7. Explain how Enloc is related to coloc, and why it may provide some advantages.

Answers

a)

b)

c)

d)

e)

f)

g)


sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3     rstudioapi_0.13  whisker_0.4      knitr_1.39      
 [5] magrittr_2.0.3   workflowr_1.7.0  R6_2.5.1         rlang_1.0.2     
 [9] fastmap_1.1.0    fansi_1.0.3      stringr_1.4.0    tools_4.2.1     
[13] xfun_0.31        utf8_1.2.2       cli_3.3.0        git2r_0.30.1    
[17] jquerylib_0.1.4  htmltools_0.5.2  ellipsis_0.3.2   rprojroot_2.0.3 
[21] yaml_2.3.5       digest_0.6.29    tibble_3.1.7     lifecycle_1.0.1 
[25] crayon_1.5.1     later_1.3.0      sass_0.4.1       vctrs_0.4.1     
[29] fs_1.5.2         promises_1.2.0.1 glue_1.6.2       evaluate_0.15   
[33] rmarkdown_2.14   stringi_1.7.6    bslib_0.3.1      compiler_4.2.1  
[37] pillar_1.7.0     jsonlite_1.8.0   httpuv_1.6.5     pkgconfig_2.0.3