Last updated: 2020-06-09

workflowr checks: (Click a bullet for more information)
  • R Markdown file: uncommitted changes 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.

  • Environment: empty

    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.

  • Seed: set.seed(20190721)

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

  • Session information: recorded

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

  • Repository version: 62d8724

    Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

    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:    docs/.DS_Store
        Ignored:    docs/figure/.DS_Store
        Ignored:    docs/figure/pLI_shet_robospan_probospan.Rmd/.DS_Store
        Ignored:    draft/
        Ignored:    output/
    
    Untracked files:
        Untracked:  Robocov_submit/
        Untracked:  analysis/covid19_genes_robocov.Rmd
        Untracked:  code/gtex_process_robocov_input.R
        Untracked:  data/ACE2_expression.rda
        Untracked:  data/GTEx_Analysis_2017-06-05_v8_RNASeQCv1.1.9_gene_tpm.gct
        Untracked:  data/GTEx_Analysis_v8_Annotations_SampleAttributesDD.xlsx
        Untracked:  data/GTEx_data_process.R
        Untracked:  data/TMPRSS2_expression.rda
        Untracked:  docs/figure/covid19_genes_robocov.Rmd/
    
    Unstaged changes:
        Modified:   analysis/corspan_robospan_probospan.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.
Expand here to see past versions:
    File Version Author Date Message
    Rmd c6c31f2 Kushal K Dey 2020-03-08 workflow project
    html c6c31f2 Kushal K Dey 2020-03-08 workflow project


Here we present S-LDSC results for Corspan, Robospan and pRobospan gene prioritizations.

library(data.table)
library(ggplot2)
Warning: package 'ggplot2' was built under R version 3.5.2
library(latex2exp)
require(gridExtra)
Loading required package: gridExtra
library(xtable)
Warning: package 'xtable' was built under R version 3.5.2
scaleFUN <- function(x) sprintf("%.1f", x)

tau-star

tau1 = c(0.04, 0.038)
taus1 = c(0.024, 0.02)
tau2 = c(0.086, 0.12)
taus2 = c(0.024, 0.03)
tau3 = c(0.096, 0.11)
taus3 = c(0.028, 0.034)

annots_pre = c("5kb", "100kb")
annots = factor(rep(annots_pre, 3), levels = annots_pre)

model = factor(c(rep("Corspan",2), rep("Robospan",2), rep("pRobospan", 2)),
               levels = c("Corspan", "Robospan", "pRobospan"))

df = data.frame(tau = c(tau1, tau2, tau3),
                tau_sd = c(taus1, taus2, taus3),
                class_annots = model,
                model = model,
                annots = annots)

colors2 =  rep("black", 18)
colors2[1:5] = "gray60"
colors2[6:10] = "red"
colors2[11:15] = "blue"

p3 = ggplot(df, aes(x=annots, y=tau, fill=df$model)) +
  geom_bar(position="dodge", stat="identity", colour = "black", size = 1.3) +
  geom_errorbar(aes(ymin=tau-1.96*tau_sd, ymax=tau+1.96*tau_sd),
                width=.5,
                position = position_dodge(.9)) +
  guides(fill=guide_legend(title="")) +
  labs(x = "", y = TeX('$\\tau^ *$')) +
  theme(axis.title.x = element_text(size=1)) +
  scale_fill_manual(values=c("gray60", "red", "blue")) +
  scale_color_manual(values=c("gray60", "red", "blue")) +
  theme(axis.text.x = element_text(angle = 70, hjust = 1, size = 30,
                                   color="black"), legend.position="top") +
    scale_alpha_continuous(range(0,1), guide = FALSE)  +
    ggtitle(TeX('$\\tau^ *$, meta-analyzed across 11 Blood + Autoimmune traits')) + 
    theme(plot.title = element_text(size = 35, face = "bold", hjust = 0.5)) +
    theme(legend.text=element_text(size=35)) +
    theme(axis.title.y = element_text(size = 40)) + theme(axis.text.y = element_text(size = 40)) + 
    theme(panel.background = element_blank(), axis.line = element_line(colour = "black")) 
p3 
Warning: Use of `df$model` is discouraged. Use `model` instead.

Warning: Use of `df$model` is discouraged. Use `model` instead.

Expand here to see past versions of unnamed-chunk-2-1.png:
Version Author Date
c6c31f2 Kushal K Dey 2020-03-08

Enrichments

tau1 = c(2.4, 2.1)
taus1 = c(0.15, 0.1)
tau2 = c(2.7, 2.3)
taus2 = c(0.16, 0.12)
tau3 = c(3.2, 2.4)
taus3 = c(0.22, 0.12)

annots_pre = c( "5kb", "100kb")
annots = factor(rep(annots_pre, 3), levels = annots_pre)

model = factor(c(rep("Corspan",2), rep("Robospan",2), rep("pRobospan", 2)),
               levels = c("Corspan", "Robospan", "pRobospan"))

df = data.frame(tau = c(tau1, tau2, tau3),
                tau_sd = c(taus1, taus2, taus3),
                class_annots = model,
                model = model,
                annots = annots)

colors2 =  rep("black", 18)
colors2[1:5] = "gray60"
colors2[6:10] = "red"
colors2[11:15] = "blue"

p3 = ggplot(df, aes(x=annots, y=tau, fill=df$model)) +
  geom_bar(position="dodge", stat="identity", colour = "black", size = 1.3) +
  geom_errorbar(aes(ymin=tau-1.96*tau_sd, ymax=tau+1.96*tau_sd),
                width=.5,
                position = position_dodge(.9)) +
  guides(fill=guide_legend(title="")) +
  labs(x = "", y = TeX('Enrichment')) +
  theme(axis.title.x = element_text(size=1)) +
  scale_fill_manual(values=c("gray60", "red", "blue")) +
  scale_color_manual(values=c("gray60", "red", "blue")) +
  theme(axis.text.x = element_text(angle = 70, hjust = 1, size = 30,
                                   color="black"), legend.position="top") +
    scale_alpha_continuous(range(0,1), guide = FALSE)  +
    ggtitle(TeX('ENR, meta-analyzed across 11 Blood + Autoimmune traits')) + 
    theme(plot.title = element_text(size = 35, face = "bold", hjust = 0.5)) +
    theme(legend.text=element_text(size=35)) +
    theme(axis.title.y = element_text(size = 40)) + theme(axis.text.y = element_text(size = 40)) + 
    theme(panel.background = element_blank(), axis.line = element_line(colour = "black")) +
    geom_hline(yintercept=1,  color = "black", linetype = "dashed")
p3 
Warning: Use of `df$model` is discouraged. Use `model` instead.

Warning: Use of `df$model` is discouraged. Use `model` instead.

Expand here to see past versions of unnamed-chunk-3-1.png:
Version Author Date
c6c31f2 Kushal K Dey 2020-03-08

Session information

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] xtable_1.8-4      gridExtra_2.3     latex2exp_0.4.0   ggplot2_3.3.0    
[5] data.table_1.11.8

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.1        compiler_3.5.1    pillar_1.3.1     
 [4] git2r_0.23.0      workflowr_1.1.1   R.methodsS3_1.7.1
 [7] R.utils_2.7.0     tools_3.5.1       digest_0.6.19    
[10] evaluate_0.12     tibble_2.1.1      gtable_0.3.0     
[13] pkgconfig_2.0.2   rlang_0.4.2       yaml_2.2.0       
[16] withr_2.1.2       stringr_1.4.0     dplyr_0.8.0.1    
[19] knitr_1.20        rprojroot_1.3-2   grid_3.5.1       
[22] tidyselect_0.2.5  glue_1.3.1        R6_2.4.0         
[25] rmarkdown_1.10    purrr_0.3.2       magrittr_1.5     
[28] whisker_0.3-2     backports_1.1.4   scales_1.0.0     
[31] htmltools_0.3.6   assertthat_0.2.1  colorspace_1.4-1 
[34] labeling_0.3      stringi_1.4.3     munsell_0.5.0    
[37] crayon_1.3.4      R.oo_1.22.0      

This reproducible R Markdown analysis was created with workflowr 1.1.1