Last updated: 2021-12-24

Checks: 6 1

Knit directory: cTWAS_analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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(20211220) 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.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
/project2/xinhe/shengqian/cTWAS/cTWAS_analysis/data/ data
/project2/xinhe/shengqian/cTWAS/cTWAS_analysis/code/ctwas_config.R code/ctwas_config.R

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 762fd7f. 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:  code/ctwas_config.R
    Untracked:  code/run_AF_analysis.sbatch
    Untracked:  code/run_AF_analysis.sh
    Untracked:  code/run_AF_ctwas_rss_LDR.R
    Untracked:  data/AF/
    Untracked:  data/mashr_Heart_Atrial_Appendage.db
    Untracked:  data/summary_known_genes_annotations.xlsx

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/Atrial_Fibrillation_Heart_Left_Ventricle.Rmd) and HTML (docs/Atrial_Fibrillation_Heart_Left_Ventricle.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 762fd7f sq-96 2021-12-24 update
html 1f785cf sq-96 2021-12-22 Build site.
html 82c68fd sq-96 2021-12-22 Build site.
html 9cf0e70 sq-96 2021-12-22 Build site.
html 77de9fb sq-96 2021-12-22 Build site.
html 6b46de7 sq-96 2021-12-22 Build site.
html e22d0c9 sq-96 2021-12-21 Build site.
Rmd a6c7890 sq-96 2021-12-21 Start my new project

qclist_all <- list()

qc_files <- paste0(results_dir, "/", list.files(results_dir, pattern="exprqc.Rd"))

for (i in 1:length(qc_files)){
  load(qc_files[i])
  chr <- unlist(strsplit(rev(unlist(strsplit(qc_files[i], "_")))[1], "[.]"))[1]
  qclist_all[[chr]] <- cbind(do.call(rbind, lapply(qclist,unlist)), as.numeric(substring(chr,4)))
}

qclist_all <- data.frame(do.call(rbind, qclist_all))
colnames(qclist_all)[ncol(qclist_all)] <- "chr"

rm(qclist, wgtlist, z_gene_chr)

#number of imputed weights
nrow(qclist_all)
[1] 10150
#number of imputed weights by chromosome
table(qclist_all$chr)

   1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16 
1003  711  570  412  451  607  495  367  384  411  592  556  186  332  344  494 
  17   18   19   20   21   22 
 639  150  783  300  110  253 
#proportion of imputed weights without missing variants
mean(qclist_all$nmiss==0)
[1] 0.6545813

Load ctwas results

Check convergence of parameters

library(ggplot2)
library(cowplot)

********************************************************
Note: As of version 1.0.0, cowplot does not change the
  default ggplot2 theme anymore. To recover the previous
  behavior, execute:
  theme_set(theme_cowplot())
********************************************************
load(paste0(results_dir, "/", analysis_id, "_ctwas.s2.susieIrssres.Rd"))
  
df <- data.frame(niter = rep(1:ncol(group_prior_rec), 2),
                 value = c(group_prior_rec[1,], group_prior_rec[2,]),
                 group = rep(c("Gene", "SNP"), each = ncol(group_prior_rec)))
df$group <- as.factor(df$group)

df$value[df$group=="SNP"] <- df$value[df$group=="SNP"]*thin #adjust parameter to account for thin argument

p_pi <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(pi)) +
  ggtitle("Prior mean") +
  theme_cowplot()

df <- data.frame(niter = rep(1:ncol(group_prior_var_rec), 2),
                 value = c(group_prior_var_rec[1,], group_prior_var_rec[2,]),
                 group = rep(c("Gene", "SNP"), each = ncol(group_prior_var_rec)))
df$group <- as.factor(df$group)
p_sigma2 <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(sigma^2)) +
  ggtitle("Prior variance") +
  theme_cowplot()

plot_grid(p_pi, p_sigma2)

#estimated group prior
estimated_group_prior <- group_prior_rec[,ncol(group_prior_rec)]
names(estimated_group_prior) <- c("gene", "snp")
estimated_group_prior["snp"] <- estimated_group_prior["snp"]*thin #adjust parameter to account for thin argument
print(estimated_group_prior)
        gene          snp 
0.0196935664 0.0002083061 
#estimated group prior variance
estimated_group_prior_var <- group_prior_var_rec[,ncol(group_prior_var_rec)]
names(estimated_group_prior_var) <- c("gene", "snp")
print(estimated_group_prior_var)
    gene      snp 
9.374271 8.577991 
#report sample size
print(sample_size)
[1] 1030836
#report group size
group_size <- c(nrow(ctwas_gene_res), n_snps)
print(group_size)
[1]   10150 6839050
#estimated group PVE
estimated_group_pve <- estimated_group_prior_var*estimated_group_prior*group_size/sample_size #check PVE calculation
names(estimated_group_pve) <- c("gene", "snp")
print(estimated_group_pve)
       gene         snp 
0.001817768 0.011854791 
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.01188393 0.13624409

Genes with highest PIPs

#distribution of PIPs
hist(ctwas_gene_res$susie_pip, xlim=c(0,1), main="Distribution of Gene PIPs")

#genes with PIP>0.8 or 20 highest PIPs
head(ctwas_gene_res[order(-ctwas_gene_res$susie_pip),report_cols], max(sum(ctwas_gene_res$susie_pip>0.8), 20))
       genename region_tag susie_pip        mu2          PVE         z num_eqtl
3169      PRRX1       1_84 0.9999999  153.79916 1.491985e-04 14.848088        2
3147      WIPF1      2_105 0.9993101 2124.21550 2.059251e-03  8.987351        2
2431    DNAJC12      10_44 0.9967458  850.85693 8.227187e-04 -5.328244        1
1214      GMCL1       2_46 0.9944249   60.60721 5.846645e-05 -8.434995        2
9840     NKX2-5      5_103 0.9942183   61.83714 5.964054e-05 -9.616279        2
10979     MSRB1       16_2 0.9667967   26.84161 2.517411e-05  5.929412        1
9417       PLEC       8_94 0.9666163   43.61991 4.090245e-05  3.093844        2
6663       JAM2       21_9 0.9633616   22.37976 2.091487e-05  4.569598        2
7794      KDM1B       6_14 0.9581444   64.33734 5.980046e-05 -9.000000        1
2987       GNB4      3_110 0.9537748   32.01351 2.962031e-05 -5.869048        1
11279      DPF3      14_34 0.9246749   30.95765 2.776946e-05  6.100000        1
2960       PCCB       3_84 0.9229236  849.82984 7.608659e-04 -5.382353        1
9960        PGP       16_2 0.9051693   28.48915 2.501611e-05  5.943820        1
1551    CCDC134      22_17 0.8683170   26.15261 2.202945e-05 -5.180556        1
12376 LINC01314      15_37 0.8300211   20.71969 1.668334e-05 -4.379164        4
4891        NPL       1_90 0.8251030   18.75569 1.501245e-05 -3.825175        1
5042      PSMB7       9_64 0.8211676   25.19921 2.007378e-05 -4.820896        1
8847    WASHC2C      10_31 0.8186904   19.80281 1.572740e-05 -3.972152        1
12133 LINC00964       8_82 0.8180590   22.20129 1.761867e-05  4.554265        2
3725       SSPN      12_18 0.7969230   42.42202 3.279579e-05 -6.791667        1

Genes with largest effect sizes

#plot PIP vs effect size
plot(ctwas_gene_res$susie_pip, ctwas_gene_res$mu2, xlab="PIP", ylab="mu^2", main="Gene PIPs vs Effect Size")

#genes with 20 largest effect sizes
head(ctwas_gene_res[order(-ctwas_gene_res$mu2),report_cols],20)
        genename region_tag    susie_pip       mu2          PVE         z
3147       WIPF1      2_105 0.9993100519 2124.2155 2.059251e-03  8.987351
929        BAZ2A      12_35 0.0000000000 1327.6344 0.000000e+00 -5.942857
10471     ZNF292       6_59 0.0000000000 1098.8945 0.000000e+00 -5.216216
4819         CGA       6_59 0.0000000000  912.8138 0.000000e+00  4.780822
7442      GPR155      2_105 0.0000000000  887.5060 0.000000e+00 -4.929575
2431     DNAJC12      10_44 0.9967457594  850.8569 8.227187e-04 -5.328244
2960        PCCB       3_84 0.9229235511  849.8298 7.608659e-04 -5.382353
6231       HERC4      10_44 0.0519716850  784.1117 3.953258e-05 -5.368895
7690     SLC35A1       6_59 0.0000000000  731.3839 0.000000e+00 -4.906053
4816        ORC3       6_59 0.0000000000  575.4343 0.000000e+00 -4.305556
11646 AC010894.3      2_105 0.0000000000  567.5177 0.000000e+00  2.807292
2445        WNT3      17_28 0.0012204211  558.1877 6.608462e-07 -5.270588
10151     ARL17A      17_28 0.0006810977  537.9069 3.554078e-07 -4.159800
10265       MAPT      17_28 0.0246154818  498.1750 1.189599e-05  5.606451
5236        MYPN      10_44 0.0557487640  467.4182 2.527850e-05  4.754237
11600    MKRN2OS        3_9 0.0000000000  326.2847 0.000000e+00 -2.927621
1450       SIRT1      10_44 0.0073685535  237.7219 1.699268e-06 -2.641975
856      PPP2R3A       3_84 0.0000000000  231.0518 0.000000e+00 -2.690141
8296        PDHB       3_40 0.0160173130  201.8814 3.136869e-06  2.296671
11694     ARL17B      17_28 0.0028320351  185.4496 5.094893e-07  3.095544
      num_eqtl
3147         2
929          1
10471        1
4819         1
7442         3
2431         1
2960         1
6231         2
7690         2
4816         1
11646        2
2445         1
10151        2
10265        2
5236         1
11600        2
1450         1
856          1
8296         2
11694        2

Genes with highest PVE

#genes with 20 highest pve
head(ctwas_gene_res[order(-ctwas_gene_res$PVE),report_cols],20)
      genename region_tag  susie_pip        mu2          PVE          z
3147     WIPF1      2_105 0.99931005 2124.21550 2.059251e-03   8.987351
2431   DNAJC12      10_44 0.99674576  850.85693 8.227187e-04  -5.328244
2960      PCCB       3_84 0.92292355  849.82984 7.608659e-04  -5.382353
3169     PRRX1       1_84 0.99999992  153.79916 1.491985e-04  14.848088
11458   ZSWIM8      10_49 0.72951933  109.78862 7.769705e-05 -11.216495
7794     KDM1B       6_14 0.95814438   64.33734 5.980046e-05  -9.000000
9840    NKX2-5      5_103 0.99421828   61.83714 5.964054e-05  -9.616279
1214     GMCL1       2_46 0.99442495   60.60721 5.846645e-05  -8.434995
9417      PLEC       8_94 0.96661634   43.61991 4.090245e-05   3.093844
6231     HERC4      10_44 0.05197169  784.11168 3.953258e-05  -5.368895
2927     NR3C1       5_84 0.79565655   45.98656 3.549498e-05  -8.392405
3725      SSPN      12_18 0.79692298   42.42202 3.279579e-05  -6.791667
2987      GNB4      3_110 0.95377479   32.01351 2.962031e-05  -5.869048
11279     DPF3      14_34 0.92467491   30.95765 2.776946e-05   6.100000
3396     CASQ2       1_72 0.64365572   44.46248 2.776244e-05   6.684932
2401     PITX3      10_65 0.70424642   39.87615 2.724258e-05  -6.793786
5236      MYPN      10_44 0.05574876  467.41822 2.527850e-05   4.754237
10979    MSRB1       16_2 0.96679672   26.84161 2.517411e-05   5.929412
9960       PGP       16_2 0.90516927   28.48915 2.501611e-05   5.943820
1551   CCDC134      22_17 0.86831704   26.15261 2.202945e-05  -5.180556
      num_eqtl
3147         2
2431         1
2960         1
3169         2
11458        1
7794         1
9840         2
1214         2
9417         2
6231         2
2927         1
3725         1
2987         1
11279        1
3396         1
2401         2
5236         1
10979        1
9960         1
1551         1

Genes with largest z scores

#genes with 20 largest z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
      genename region_tag    susie_pip        mu2          PVE          z
3169     PRRX1       1_84 9.999999e-01  153.79916 1.491985e-04  14.848088
7976   SYNPO2L      10_48 1.466304e-01  134.47936 1.912890e-05 -11.782609
11458   ZSWIM8      10_49 7.295193e-01  109.78862 7.769705e-05 -11.216495
7134    ZBTB7B       1_76 1.008001e-04  120.87046 1.181930e-08  10.638889
504      SYNE2      14_29 4.741777e-02   83.62062 3.846492e-06  10.029851
9840    NKX2-5      5_103 9.942183e-01   61.83714 5.964054e-05  -9.616279
7794     KDM1B       6_14 9.581444e-01   64.33734 5.980046e-05  -9.000000
3147     WIPF1      2_105 9.993101e-01 2124.21550 2.059251e-03   8.987351
3876       DEK       6_14 9.860627e-02   62.21941 5.951697e-06  -8.651764
1214     GMCL1       2_46 9.944249e-01   60.60721 5.846645e-05  -8.434995
7445     DCST2       1_76 6.958988e-04   82.23437 5.551494e-08  -8.408993
2927     NR3C1       5_84 7.956566e-01   45.98656 3.549498e-05  -8.392405
9371     MYOZ1      10_48 4.594225e-02   72.94692 3.251095e-06   8.282302
5279      HCN4      15_35 1.027118e-03  142.65541 1.421409e-07   7.582677
554       MXD1       2_46 5.931507e-02   49.69584 2.859536e-06   7.537313
2039     ASAH1       8_21 2.248119e-05   67.20598 1.465675e-09  -7.443420
2401     PITX3      10_65 7.042464e-01   39.87615 2.724258e-05  -6.793786
3725      SSPN      12_18 7.969230e-01   42.42202 3.279579e-05  -6.791667
7823      CFL2       14_9 2.408814e-02  112.05711 2.618504e-06  -6.728039
5803    ADAM15       1_76 7.026909e-04   51.73422 3.526571e-08  -6.717647
      num_eqtl
3169         2
7976         1
11458        1
7134         1
504          1
9840         2
7794         1
3147         2
3876         3
1214         2
7445         2
2927         1
9371         2
5279         1
554          1
2039         2
2401         2
3725         1
7823         2
5803         1

Comparing z scores and PIPs

#set nominal signifiance threshold for z scores
alpha <- 0.05

#bonferroni adjusted threshold for z scores
sig_thresh <- qnorm(1-(alpha/nrow(ctwas_gene_res)/2), lower=T)

#Q-Q plot for z scores
obs_z <- ctwas_gene_res$z[order(ctwas_gene_res$z)]
exp_z <- qnorm((1:nrow(ctwas_gene_res))/nrow(ctwas_gene_res))

plot(exp_z, obs_z, xlab="Expected z", ylab="Observed z", main="Gene z score Q-Q plot")
abline(a=0,b=1)

#plot z score vs PIP
plot(abs(ctwas_gene_res$z), ctwas_gene_res$susie_pip, xlab="abs(z)", ylab="PIP")
abline(v=sig_thresh, col="red", lty=2)

#proportion of significant z scores
mean(abs(ctwas_gene_res$z) > sig_thresh)
[1] 0.007783251
#genes with most significant z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
      genename region_tag    susie_pip        mu2          PVE          z
3169     PRRX1       1_84 9.999999e-01  153.79916 1.491985e-04  14.848088
7976   SYNPO2L      10_48 1.466304e-01  134.47936 1.912890e-05 -11.782609
11458   ZSWIM8      10_49 7.295193e-01  109.78862 7.769705e-05 -11.216495
7134    ZBTB7B       1_76 1.008001e-04  120.87046 1.181930e-08  10.638889
504      SYNE2      14_29 4.741777e-02   83.62062 3.846492e-06  10.029851
9840    NKX2-5      5_103 9.942183e-01   61.83714 5.964054e-05  -9.616279
7794     KDM1B       6_14 9.581444e-01   64.33734 5.980046e-05  -9.000000
3147     WIPF1      2_105 9.993101e-01 2124.21550 2.059251e-03   8.987351
3876       DEK       6_14 9.860627e-02   62.21941 5.951697e-06  -8.651764
1214     GMCL1       2_46 9.944249e-01   60.60721 5.846645e-05  -8.434995
7445     DCST2       1_76 6.958988e-04   82.23437 5.551494e-08  -8.408993
2927     NR3C1       5_84 7.956566e-01   45.98656 3.549498e-05  -8.392405
9371     MYOZ1      10_48 4.594225e-02   72.94692 3.251095e-06   8.282302
5279      HCN4      15_35 1.027118e-03  142.65541 1.421409e-07   7.582677
554       MXD1       2_46 5.931507e-02   49.69584 2.859536e-06   7.537313
2039     ASAH1       8_21 2.248119e-05   67.20598 1.465675e-09  -7.443420
2401     PITX3      10_65 7.042464e-01   39.87615 2.724258e-05  -6.793786
3725      SSPN      12_18 7.969230e-01   42.42202 3.279579e-05  -6.791667
7823      CFL2       14_9 2.408814e-02  112.05711 2.618504e-06  -6.728039
5803    ADAM15       1_76 7.026909e-04   51.73422 3.526571e-08  -6.717647
      num_eqtl
3169         2
7976         1
11458        1
7134         1
504          1
9840         2
7794         1
3147         2
3876         3
1214         2
7445         2
2927         1
9371         2
5279         1
554          1
2039         2
2401         2
3725         1
7823         2
5803         1

Locus plots for genes and SNPs

ctwas_gene_res_sortz <- ctwas_gene_res[order(-abs(ctwas_gene_res$z)),]
report_cols_region <- report_cols[!(report_cols %in% c("num_eqtl"))]

n_plots <- 5
for (region_tag_plot in head(unique(ctwas_gene_res_sortz$region_tag), n_plots)){
  ctwas_res_region <-  ctwas_res[ctwas_res$region_tag==region_tag_plot,]
  start <- min(ctwas_res_region$pos)
  end <- max(ctwas_res_region$pos)
  
  ctwas_res_region <- ctwas_res_region[order(ctwas_res_region$pos),]
  ctwas_res_region_gene <- ctwas_res_region[ctwas_res_region$type=="gene",]
  ctwas_res_region_snp <- ctwas_res_region[ctwas_res_region$type=="SNP",]
  
  #region name
  print(paste0("Region: ", region_tag_plot))
  
  #table of genes in region
  print(ctwas_res_region_gene[,report_cols_region])
  
  par(mfrow=c(4,1))
  
  #gene z scores
  plot(ctwas_res_region_gene$pos, abs(ctwas_res_region_gene$z), xlab="Position", ylab="abs(gene_z)", xlim=c(start,end),
   ylim=c(0,max(sig_thresh, abs(ctwas_res_region_gene$z))),
   main=paste0("Region: ", region_tag_plot))
  abline(h=sig_thresh,col="red",lty=2)
  
  #significance threshold for SNPs
  alpha_snp <- 5*10^(-8)
  sig_thresh_snp <- qnorm(1-alpha_snp/2, lower=T)
  
  #snp z scores
  plot(ctwas_res_region_snp$pos, abs(ctwas_res_region_snp$z), xlab="Position", ylab="abs(snp_z)",xlim=c(start,end),
   ylim=c(0,max(sig_thresh_snp, max(abs(ctwas_res_region_snp$z)))))
  abline(h=sig_thresh_snp,col="purple",lty=2)
  
  #gene pips
  plot(ctwas_res_region_gene$pos, ctwas_res_region_gene$susie_pip, xlab="Position", ylab="Gene PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
  
  #snp pips
  plot(ctwas_res_region_snp$pos, ctwas_res_region_snp$susie_pip, xlab="Position", ylab="SNP PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
}
[1] "Region: 1_84"
        genename region_tag   susie_pip        mu2          PVE          z
3169       PRRX1       1_84 0.999999920 153.799161 1.491985e-04 14.8480881
12761 RP1-79C4.4       1_84 0.024341023  13.845716 3.269374e-07 -1.9030834
1412        FMO2       1_84 0.009387442   4.595372 4.184835e-08  0.1428671
195         FMO1       1_84 0.018074710  10.899980 1.911206e-07 -1.3032787
933         FMO4       1_84 0.009987054   5.516273 5.344334e-08  0.8144330
3311      PRRC2C       1_84 0.015542432   9.494343 1.431510e-07 -1.3333333
362         MYOC       1_84 0.026303197  14.058670 3.587263e-07 -1.5409457
174      METTL13       1_84 0.010143926   5.032091 4.951822e-08 -0.4696970
10837       DNM3       1_84 0.115781900  24.407332 2.741394e-06 -2.5074627
4893        PIGC       1_84 0.009503763   4.771745 4.399296e-08  0.2160346
9656    C1orf105       1_84 0.009994999   5.273780 5.113463e-08 -0.6575342
1413        SUCO       1_84 0.011032318   5.779488 6.185382e-08  0.3414128

[1] "Region: 10_48"
           genename region_tag  susie_pip        mu2          PVE           z
2387         SPOCK2      10_48 0.04579962   5.431342 2.413123e-07   0.5000000
7973        ANAPC16      10_48 0.04811514   5.677193 2.649878e-07   0.3992052
5231          ASCC1      10_48 0.04682667   5.378961 2.443443e-07   0.2097134
6238        DNAJB12      10_48 0.04202769   5.549508 2.262562e-07  -1.2142857
6754            MCU      10_48 0.04926449   5.721392 2.734300e-07   0.6527778
12844 RP11-344N10.5      10_48 0.04398047   5.964501 2.544746e-07   1.0986301
7977         NUDT13      10_48 0.04474438  28.765465 1.248591e-06  -3.9779412
11372        DNAJC9      10_48 0.04424273  32.169184 1.380678e-06  -4.4538462
9745         MRPS16      10_48 0.10807981  16.127655 1.690932e-06   1.0818247
5229          ANXA7      10_48 0.04278973  29.926635 1.242247e-06  -4.2137405
7982          USP54      10_48 0.04948664  29.476819 1.415074e-06  -4.7964072
12864 RP11-464F9.22      10_48 0.04878309  29.880579 1.414063e-06   4.8562874
9371          MYOZ1      10_48 0.04594225  72.946922 3.251095e-06   8.2823023
7976        SYNPO2L      10_48 0.14663037 134.479362 1.912890e-05 -11.7826087

[1] "Region: 10_49"
            genename region_tag   susie_pip        mu2          PVE           z
12792 RP11-574K11.29      10_49 0.022990638  19.165704 4.274509e-07  -3.2007683
9287          SEC24C      10_49 0.030788946  46.259307 1.381670e-06   6.4776119
10671          FUT11      10_49 0.034603540  47.907740 1.608187e-06  -6.5522388
11458         ZSWIM8      10_49 0.729519326 109.788618 7.769705e-05 -11.2164948
3705            PLAU      10_49 0.008878220   5.750547 4.952739e-08  -0.9189189
11550       C10orf55      10_49 0.009058826  11.033338 9.695925e-08   2.8208955
365              VCL      10_49 0.093489730  20.671759 1.874786e-06   1.5128205
10041          AP3M1      10_49 0.035279184  15.591795 5.336114e-07  -1.7388852
10442          DUPD1      10_49 0.008429365   5.258110 4.299668e-08  -1.1529412
1016          DUSP13      10_49 0.100284705  31.460222 3.060602e-06   4.1086957
7858           VDAC2      10_49 0.088251394  21.153236 1.810960e-06  -4.3582090
12696 RP11-399K21.11      10_49 0.012183813   8.284501 9.791742e-08  -0.1303262
11619     ZNF503-AS1      10_49 0.010899216  10.034096 1.060923e-07  -2.1217391
6232        C10orf11      10_49 0.008899518   5.580033 4.817411e-08  -0.8573335
12851 RP11-399K21.14      10_49 0.010355302   6.113393 6.141232e-08   0.3968750

[1] "Region: 1_76"
      genename region_tag    susie_pip        mu2          PVE           z
7136      SHC1       1_76 0.0001071838  12.588788 1.308951e-09 -0.59459459
7134    ZBTB7B       1_76 0.0001008001 120.870457 1.181930e-08 10.63888889
7445     DCST2       1_76 0.0006958988  82.234374 5.551494e-08 -8.40899309
5803    ADAM15       1_76 0.0007026909  51.734219 3.526571e-08 -6.71764706
5811     EFNA3       1_76 0.0001139320  11.158293 1.233258e-09 -2.27241379
8429     EFNA1       1_76 0.0002737294  18.665656 4.956500e-09 -2.17756382
8428   SLC50A1       1_76 0.0001322459  14.952603 1.918269e-09 -3.06101695
10106     MUC1       1_76 0.0002616261  20.816785 5.283299e-09 -0.97169811
9349       GBA       1_76 0.0001241545  12.959234 1.560818e-09  2.56378222
3200    SCAMP3       1_76 0.0003015954  23.555275 6.891652e-09 -3.32894737
5817      HCN3       1_76 0.0003432258  23.447311 7.806986e-09  3.28000000
7144      FDPS       1_76 0.0008565642  32.876662 2.731858e-08 -3.73684211
4539      DAP3       1_76 0.0003781219  21.621249 7.930910e-09 -2.27139816
7447    YY1AP1       1_76 0.0011961594  36.920267 4.284146e-08  3.84291511
4546     SYT11       1_76 0.0025684400  41.313747 1.029377e-07  3.94520548
5815      RIT1       1_76 0.0002398255  20.210033 4.701893e-09  2.59154930
4540  KIAA0907       1_76 0.0001730573   8.076786 1.355935e-09 -0.01612903
3203   ARHGEF2       1_76 0.0026299911  38.288470 9.768609e-08  3.13235294
3204   LAMTOR2       1_76 0.0010573388  20.725806 2.125867e-08  0.07593099
10541   SEMA4A       1_76 0.0001058235   6.575695 6.750474e-10 -2.12384196
7148  SLC25A44       1_76 0.0001316434   8.333213 1.064197e-09 -0.95882039
11980    BGLAP       1_76 0.0000970415   8.094425 7.619982e-10  1.39902385
7147     PAQR6       1_76 0.0005254314  17.491144 8.915479e-09 -0.74698795
11050     SMG5       1_76 0.0001231042  12.776433 1.525783e-09 -2.65753425
10969     GLMP       1_76 0.0001350938  14.151121 1.854542e-09 -2.78082192
7465      CCT3       1_76 0.0001282575  13.369857 1.663489e-09  2.71621622

[1] "Region: 14_29"
     genename region_tag  susie_pip       mu2          PVE           z
6610  PPP2R5E      14_29 0.06366122 10.876680 6.717099e-07  1.45827521
5433    WDR89      14_29 0.05798355  9.024694 5.076305e-07 -0.14146341
504     SYNE2      14_29 0.04741777 83.620616 3.846492e-06 10.02985075
1668   MTHFD1      14_29 0.03157326  4.544419 1.391900e-07  0.04166667
4040    ZBTB1      14_29 0.11881769 23.264806 2.681581e-06 -3.68656716
4039    HSPA2      14_29 0.03598029 10.071122 3.515224e-07 -2.34567901
4043  PLEKHG3      14_29 0.05661913 10.958167 6.018822e-07  1.73972603

SNPs with highest PIPs

#snps with PIP>0.8 or 20 highest PIPs
head(ctwas_snp_res[order(-ctwas_snp_res$susie_pip),report_cols_snps],
max(sum(ctwas_snp_res$susie_pip>0.8), 20))
                id region_tag susie_pip        mu2          PVE           z
28637   rs12404927       1_75 1.0000000 1404.55102 1.362536e-03  -1.5517241
28638    rs7536152       1_75 1.0000000 1439.64649 1.396582e-03  -6.4626866
28731   rs34515871       1_76 1.0000000  296.98405 2.881002e-04  17.0000000
32608   rs12142529       1_83 1.0000000  145.38857 1.410395e-04  12.0396040
32633  rs112797273       1_83 1.0000000  101.40197 9.836867e-05   9.4903846
183948   rs1906615       4_72 1.0000000 3299.17745 3.200487e-03  45.1604938
183953   rs7440714       4_72 1.0000000 1498.40640 1.453584e-03  -9.2183406
272791 rs111990232       6_59 1.0000000 1672.21316 1.622191e-03   0.5392670
472755  rs17287293      12_18 1.0000000  150.43066 1.459307e-04 -10.2947368
556238 rs140798119      15_35 1.0000000  282.62226 2.741680e-04   3.9950739
556241  rs74022964      15_35 1.0000000  340.33003 3.301495e-04  12.5777778
698783   rs4972703      2_105 1.0000000 3592.88497 3.485409e-03  -0.7842670
703489 rs114415025        3_9 1.0000000 2723.92507 2.642443e-03   1.2192513
728978 rs201862093       7_48 1.0000000 1114.36488 1.081030e-03  -0.8625000
765251  rs76106073      10_44 1.0000000  836.85538 8.118220e-04   0.6572238
768375  rs61937778      12_35 1.0000000 1898.73730 1.841939e-03  -1.3056995
28735    rs2878412       1_76 1.0000000  104.66388 1.015330e-04   5.4250000
423415  rs60469668      10_66 1.0000000  171.39264 1.662657e-04  16.9647059
28733   rs11576820       1_76 1.0000000  131.66128 1.277228e-04   8.0243902
592256  rs62056842      17_28 1.0000000  764.07813 7.412218e-04   1.1269036
733889  rs62643683       8_21 1.0000000  262.98617 2.551193e-04   0.8007519
183979 rs186546224       4_72 1.0000000  278.28019 2.699558e-04  -6.8398876
117614   rs7373492       3_28 1.0000000   57.12050 5.541183e-05  -7.6417323
323213  rs62469005       7_70 1.0000000  248.90606 2.414604e-04  -3.8636364
323204  rs28557111       7_70 0.9999995  268.50949 2.604773e-04  13.6818182
299063  rs12112152       7_15 0.9999995   45.05583 4.370803e-05   6.9358974
28738   rs10908445       1_76 0.9999993  192.70836 1.869436e-04 -13.1470588
576584   rs6499606      16_39 0.9999989  103.66865 1.005674e-04  12.6376812
785055   rs8005417       14_9 0.9999977  418.17010 4.056602e-04   0.9863946
323219  rs12669209       7_70 0.9999965  107.24435 1.040359e-04  -4.2937500
423413   rs7094488      10_66 0.9999961  105.12014 1.019752e-04  14.1060606
96493    rs1975584      2_118 0.9999837   71.18500 6.905447e-05   1.2311828
804323 rs140185678       16_2 0.9999825   44.60953 4.327434e-05   7.6100917
280210  rs11756438       6_79 0.9999688   47.48500 4.606312e-05  -8.2089552
117485 rs116202356       3_27 0.9999532   36.40320 3.531260e-05   6.0813559
176633   rs1458038       4_54 0.9998799   34.94748 3.389801e-05   6.0277778
661464    rs464901       22_3 0.9997751   44.32757 4.299190e-05  -7.0555556
121514  rs12330500       3_40 0.9996970  506.36533 4.910693e-04   0.5641026
397657   rs1886296       9_73 0.9995450   34.53850 3.349008e-05   5.9863014
734589      rs7508       8_21 0.9993753   79.71601 7.728312e-05   9.4800000
725018   rs3176326       6_29 0.9991706   50.71157 4.915381e-05  -7.3647059
117627  rs10428132       3_28 0.9991198   74.57949 7.228487e-05   9.2058824
586504  rs72811292      17_11 0.9982520   39.85061 3.859096e-05  -6.5233645
39384   rs12353975      1_102 0.9981456   35.67154 3.454031e-05  -4.3000000
184535   rs7700110       4_73 0.9978791   45.09924 4.365737e-05   7.0666667
117601   rs9824157       3_28 0.9976315   29.97394 2.900844e-05   3.8732394
734231    rs208757       8_21 0.9970887  239.59396 2.317502e-04   7.6629213
232614 rs199992924       5_68 0.9967799 1308.36140 1.265137e-03  -0.6309524
663223    rs133902       22_7 0.9963536   31.00376 2.996666e-05   6.1617647
232434    rs338623       5_68 0.9953355   66.77245 6.447290e-05  -7.9855072
40060    rs4951023      1_104 0.9951712   32.47858 3.135489e-05   5.5970149
39383    rs6427989      1_102 0.9941339   35.76701 3.449355e-05  -4.4142857
592472  rs75230966      17_28 0.9928717   43.15503 4.156569e-05   6.0582524
576592    rs876727      16_39 0.9925728   48.76988 4.695961e-05 -10.0000000
275859   rs9496567       6_67 0.9919760   26.48986 2.549126e-05   5.1125000
801039  rs12908004      15_37 0.9873706   57.56113 5.513405e-05   8.1333333
183968   rs4631108       4_72 0.9858853  278.72914 2.665748e-04 -17.6376812
576597  rs60602157      16_39 0.9858538   38.73318 3.704299e-05  10.4415584
526368  rs74968516       14_8 0.9857359   34.86384 3.333851e-05  -2.0924370
657485   rs7282237      21_16 0.9765780   24.87091 2.356183e-05  -4.7605634
534174   rs2738413      14_29 0.9761605  111.24337 1.053430e-04 -11.6119403
366949   rs7460121       8_88 0.9755516   24.08834 2.279647e-05   4.7500000
323211   rs4730742       7_70 0.9739413  148.25445 1.400719e-04  -5.3181818
576589   rs4788691      16_39 0.9737540   39.90042 3.769096e-05  -1.6900000
331163  rs35760656       7_93 0.9721535   35.73611 3.370176e-05  -6.3536585
284152    rs958747       6_89 0.9716551   24.32337 2.292695e-05  -4.9710145
2727      rs284278        1_7 0.9709039   35.05628 3.301813e-05  -6.0857143
280167  rs77435894       6_78 0.9646884   28.76469 2.691889e-05   6.1111111
785061   rs8011559       14_9 0.9644048  426.28574 3.988142e-04   5.6913580
561807  rs12898337      15_48 0.9627997   35.30067 3.297079e-05  -6.0579710
58545    rs7578482       2_15 0.9603813   32.19728 2.999669e-05   5.7435897
555608    rs745636      15_33 0.9584917   25.47962 2.369146e-05  -5.0740741
25981    rs4839174       1_69 0.9562825   33.83277 3.138588e-05   5.9459459
99263   rs35880620      2_125 0.9544729   39.72780 3.678482e-05  -6.2168675
610855  rs17794590      18_24 0.9544647   24.57014 2.274981e-05  -4.8242424
96468   rs11889306      2_118 0.9532842   45.60961 4.217831e-05   6.7391304
728771  rs74910854       7_48 0.9504108   30.92661 2.851373e-05   5.4878049
705484   rs9830653       3_84 0.9497164  834.68211 7.689985e-04  -0.9344262
784984  rs73241997       14_9 0.9463663  271.39025 2.491517e-04   7.8817204
183920   rs1823291       4_72 0.9443849  275.38267 2.522877e-04 -19.4520548
32655    rs7522387       1_83 0.9380199   59.33695 5.399427e-05   6.6375000
28693     rs906280       1_75 0.9352012   59.46409 5.394737e-05   7.9111111
492885  rs12425471      12_69 0.9315032   41.65186 3.763823e-05  -5.2500000
506242   rs1326122      13_21 0.9280182   24.16457 2.175434e-05   4.7543103
729019 rs112661041       7_48 0.9246584 1098.87113 9.856858e-04   4.6532258
280117     rs89107       6_78 0.9200337   47.40943 4.231350e-05  -9.5606061
372218   rs1594768        9_9 0.9191704   24.06779 2.146064e-05  -4.6911765
218017 rs114414434       5_30 0.9100084   25.52863 2.253634e-05  -4.9718310
416198  rs60632610      10_48 0.9078072  142.32178 1.253359e-04 -12.2395833
5627    rs10917072       1_15 0.9035741   33.32457 2.921048e-05   5.8235294
666612  rs11705586      22_15 0.9032885   25.71531 2.253350e-05   4.8988764
698793   rs1367220      2_105 0.9027873 3624.47361 3.174247e-03   7.2207792
239095   rs6894302       5_84 0.8962639   34.59893 3.008215e-05  -7.2933333
232607   rs4073838       5_68 0.8907151 1336.89003 1.155167e-03  -5.9545455
272788    rs371814       6_59 0.8887549 1684.18630 1.452053e-03   6.1911765
252811  rs73724866       6_13 0.8854526   93.92663 8.067974e-05 -10.4141414
556230    rs519946      15_34 0.8802637   34.42175 2.939383e-05   5.9242424
497493   rs6560886      12_82 0.8786081   28.83992 2.458101e-05   5.6666667
769560  rs71454237      12_43 0.8731783   45.03633 3.814840e-05  -7.3809524
28729   rs12128882       1_76 0.8660530   31.94687 2.684004e-05   1.0731707
469758  rs12821447      12_12 0.8604052   24.28342 2.026858e-05   4.5128205
622090  rs73919353       19_6 0.8573709   29.15094 2.424554e-05   5.4076433
455650    rs565449      11_54 0.8568684   28.25040 2.348276e-05  -5.2535211
67841     rs243080       2_40 0.8464105   23.94966 1.966486e-05  -4.5522388
245279  rs62377226      5_100 0.8419746   33.84803 2.764667e-05   5.8493151
583304  rs75329315       17_2 0.8321222   26.35764 2.127669e-05  -5.2460317
121517      rs6924       3_40 0.8238581  510.02479 4.076187e-04   4.2133333
498623   rs7321083       13_3 0.8169737   24.61195 1.950584e-05   4.8292683
304963 rs145593380       7_26 0.8132918   29.70683 2.343760e-05   5.3333333
151266    rs720389      3_114 0.8068588   23.55072 1.843368e-05   4.2898551

SNPs with largest effect sizes

#plot PIP vs effect size
#plot(ctwas_snp_res$susie_pip, ctwas_snp_res$mu2, xlab="PIP", ylab="mu^2", main="SNP PIPs vs Effect Size")

#SNPs with 50 largest effect sizes
head(ctwas_snp_res[order(-ctwas_snp_res$mu2),report_cols_snps],50)
                id region_tag    susie_pip      mu2          PVE         z
698793   rs1367220      2_105 9.027873e-01 3624.474 3.174247e-03  7.220779
698794   rs1367219      2_105 8.971134e-02 3615.477 3.146469e-04  7.103896
698789  rs10168156      2_105 2.265398e-01 3615.000 7.944439e-04  7.233766
698787   rs6713018      2_105 5.859132e-02 3613.822 2.054047e-04  7.168831
698778   rs1864453      2_105 1.251599e-01 3612.780 4.386490e-04  7.207792
698770   rs2033315      2_105 5.844195e-02 3609.583 2.046408e-04  7.064935
698781   rs6707162      2_105 1.730083e-02 3603.368 6.047640e-05  7.090909
698782   rs6735680      2_105 1.150635e-02 3602.875 4.021584e-05  7.077922
698771   rs2033314      2_105 1.165286e-02 3602.717 4.072611e-05  7.155844
698773  rs28485554      2_105 2.399129e-03 3600.749 8.380248e-06  7.000000
698783   rs4972703      2_105 1.000000e+00 3592.885 3.485409e-03 -0.784267
698804  rs10803884      2_105 3.412607e-05 3550.073 1.175260e-07  7.285714
698812   rs6738901      2_105 6.033312e-05 3535.783 2.069435e-07 -7.272727
698797  rs12466643      2_105 1.495366e-05 3532.253 5.124007e-08  7.272727
698828  rs35368253      2_105 1.910799e-05 3515.570 6.516601e-08 -7.256410
698814  rs10197521      2_105 2.167801e-08 3505.736 7.372403e-11 -6.547619
698816  rs34661753      2_105 1.912728e-06 3466.123 6.431433e-09 -7.076923
698767   rs7590328      2_105 1.204450e-07 3454.423 4.036218e-10  6.784810
183948   rs1906615       4_72 1.000000e+00 3299.177 3.200487e-03 45.160494
698765   rs6433497      2_105 2.090339e-11 2907.446 5.895746e-14  6.345679
698766   rs2115874      2_105 2.801248e-11 2905.297 7.895008e-14  6.419753
698758   rs1430185      2_105 1.876388e-12 2842.067 5.173296e-15  6.185185
698745   rs1991601      2_105 5.335732e-13 2821.002 1.460185e-15  5.950617
703494  rs56204325        3_9 7.189264e-01 2763.521 1.927337e-03  7.865672
703475   rs1969154        3_9 3.789176e-01 2761.449 1.015061e-03  7.850746
703474   rs6799179        3_9 3.766987e-01 2761.418 1.009106e-03  7.850746
703484  rs12714880        3_9 1.905204e-01 2760.752 5.102457e-04  7.820896
703442   rs6763619        3_9 6.794745e-03 2742.502 1.807717e-05  7.776119
703441  rs13320486        3_9 6.774412e-03 2742.480 1.802293e-05  7.776119
703443   rs9883561        3_9 5.623830e-04 2740.038 1.494855e-06  7.676471
703469   rs9821066        3_9 3.249060e-05 2729.436 8.602823e-08  7.588235
703464   rs9872103        3_9 1.785730e-04 2728.262 4.726201e-07  7.686567
703465   rs9871991        3_9 3.800932e-04 2727.319 1.005626e-06  7.716418
703470   rs9877165        3_9 4.469283e-05 2727.313 1.182451e-07  7.626866
703476   rs1985428        3_9 3.173254e-05 2727.176 8.395150e-08  7.611940
703489 rs114415025        3_9 1.000000e+00 2723.925 2.642443e-03  1.219251
703461   rs6791647        3_9 2.233448e-05 2720.842 5.895080e-08  7.611940
703456   rs4447735        3_9 3.120521e-05 2720.726 8.236113e-08  7.626866
703462   rs6767504        3_9 7.609822e-06 2717.065 2.005788e-08  7.597015
703459   rs4321514        3_9 7.424475e-06 2716.792 1.956737e-08  7.597015
703457   rs4299468        3_9 7.118141e-06 2716.475 1.875783e-08  7.597015
703452   rs3901665        3_9 1.258296e-05 2715.352 3.314511e-08  7.626866
703488  rs56082700        3_9 0.000000e+00 2702.262 0.000000e+00  2.696970
703471   rs9822382        3_9 0.000000e+00 2678.591 0.000000e+00  4.277228
703447   rs9870070        3_9 0.000000e+00 2676.505 0.000000e+00  4.516129
703445   rs9850214        3_9 0.000000e+00 2676.317 0.000000e+00  4.483871
703448   rs9850227        3_9 0.000000e+00 2675.871 0.000000e+00  4.397849
703558   rs3732675        3_9 1.173251e-08 2674.016 3.043446e-11  7.735294
703446   rs9850480        3_9 0.000000e+00 2664.144 0.000000e+00  4.505376
703492  rs11706068        3_9 2.610084e-06 2600.801 6.585245e-09  7.970588

SNPs with highest PVE

#SNPs with 50 highest pve
head(ctwas_snp_res[order(-ctwas_snp_res$PVE),report_cols_snps],50)
                id region_tag  susie_pip       mu2          PVE           z
698783   rs4972703      2_105 1.00000000 3592.8850 0.0034854089  -0.7842670
183948   rs1906615       4_72 1.00000000 3299.1775 0.0032004872  45.1604938
698793   rs1367220      2_105 0.90278725 3624.4736 0.0031742475   7.2207792
703489 rs114415025        3_9 1.00000000 2723.9251 0.0026424427   1.2192513
703494  rs56204325        3_9 0.71892638 2763.5212 0.0019273369   7.8656716
768375  rs61937778      12_35 1.00000000 1898.7373 0.0018419393  -1.3056995
272791 rs111990232       6_59 1.00000000 1672.2132 0.0016221913   0.5392670
183953   rs7440714       4_72 1.00000000 1498.4064 0.0014535837  -9.2183406
272788    rs371814       6_59 0.88875486 1684.1863 0.0014520532   6.1911765
28638    rs7536152       1_75 1.00000000 1439.6465 0.0013965815  -6.4626866
703515   rs4642101        3_9 0.71504872 1969.7326 0.0013663229  10.2318841
28637   rs12404927       1_75 1.00000000 1404.5510 0.0013625359  -1.5517241
768315   rs2860482      12_35 0.72039239 1945.5816 0.0013596558  -7.1052632
232614 rs199992924       5_68 0.99677991 1308.3614 0.0012651366  -0.6309524
232607   rs4073838       5_68 0.89071507 1336.8900 0.0011551674  -5.9545455
768370   rs7313074      12_35 0.59547601 1953.4234 0.0011284208  -6.9868421
728978 rs201862093       7_48 1.00000000 1114.3649 0.0010810302  -0.8625000
703475   rs1969154        3_9 0.37891760 2761.4487 0.0010150611   7.8507463
703474   rs6799179        3_9 0.37669868 2761.4183 0.0010091059   7.8507463
729019 rs112661041       7_48 0.92465841 1098.8711 0.0009856858   4.6532258
765251  rs76106073      10_44 1.00000000  836.8554 0.0008118220   0.6572238
698789  rs10168156      2_105 0.22653976 3615.0005 0.0007944439   7.2337662
705484   rs9830653       3_84 0.94971640  834.6821 0.0007689985  -0.9344262
768373   rs4759256      12_35 0.40562812 1952.8889 0.0007684507  -6.9736842
592256  rs62056842      17_28 1.00000000  764.0781 0.0007412218   1.1269036
272792    rs384318       6_59 0.37973072 1682.6223 0.0006198303   6.1029412
728888  rs12154789       7_48 0.51476523 1098.6922 0.0005486504   4.4923077
703514   rs7650482        3_9 0.28023466 1973.5020 0.0005365002  10.1571429
703484  rs12714880        3_9 0.19052042 2760.7520 0.0005102457   7.8208955
121514  rs12330500       3_40 0.99969702  506.3653 0.0004910693   0.5641026
704796 rs199808025       3_84 0.56221627  819.6038 0.0004470106   0.3170732
698778   rs1864453      2_105 0.12515989 3612.7802 0.0004386490   7.2077922
272793   rs1145714       6_59 0.26668394 1679.0994 0.0004343939   6.1029412
121517      rs6924       3_40 0.82385812  510.0248 0.0004076187   4.2133333
785055   rs8005417       14_9 0.99999767  418.1701 0.0004056602   0.9863946
785061   rs8011559       14_9 0.96440477  426.2857 0.0003988142   5.6913580
232606   rs4235764       5_68 0.29404637 1335.1711 0.0003808581  -5.8787879
768310   rs7978685      12_35 0.19327209 1942.9081 0.0003642770  -7.0657895
556241  rs74022964      15_35 1.00000000  340.3300 0.0003301495  12.5777778
698794   rs1367219      2_105 0.08971134 3615.4774 0.0003146469   7.1038961
232609   rs4235768       5_68 0.24023863 1335.2967 0.0003111939  -5.8030303
272750   rs9444476       6_59 0.19310251 1660.7317 0.0003110984  -6.3088235
28731   rs34515871       1_76 1.00000000  296.9840 0.0002881002  17.0000000
272775   rs9444488       6_59 0.17207131 1665.5818 0.0002780256  -6.2647059
556238 rs140798119      15_35 1.00000000  282.6223 0.0002741680   3.9950739
183979 rs186546224       4_72 0.99999999  278.2802 0.0002699558  -6.8398876
183968   rs4631108       4_72 0.98588526  278.7291 0.0002665748 -17.6376812
323204  rs28557111       7_70 0.99999953  268.5095 0.0002604773  13.6818182
733889  rs62643683       8_21 0.99999999  262.9862 0.0002551193   0.8007519
183920   rs1823291       4_72 0.94438487  275.3827 0.0002522877 -19.4520548

SNPs with largest z scores

#histogram of (abs) SNP z scores
hist(abs(ctwas_snp_res$z))

#SNPs with 50 largest z scores
head(ctwas_snp_res[order(-abs(ctwas_snp_res$z)),report_cols_snps],50)
                id region_tag    susie_pip       mu2          PVE         z
183948   rs1906615       4_72 1.000000e+00 3299.1775 3.200487e-03  45.16049
183949  rs75725917       4_72 0.000000e+00 1501.2534 0.000000e+00  42.33663
183947   rs1906611       4_72 0.000000e+00 1386.7531 0.000000e+00  40.97143
183946  rs28521134       4_72 0.000000e+00 1323.8641 0.000000e+00  40.22772
183942  rs10019689       4_72 0.000000e+00 1314.7532 0.000000e+00  40.11000
183943  rs76013973       4_72 0.000000e+00 1309.8604 0.000000e+00  40.04902
183945  rs12639820       4_72 0.000000e+00 1308.0495 0.000000e+00  40.03922
183941  rs12647393       4_72 0.000000e+00 1303.9357 0.000000e+00  39.98020
183944  rs74496596       4_72 0.000000e+00 1284.8290 0.000000e+00  39.75728
183940  rs12647316       4_72 0.000000e+00 1271.3853 0.000000e+00  39.55882
183939   rs4529121       4_72 0.000000e+00 1275.2573 0.000000e+00  39.55340
183933  rs12650829       4_72 0.000000e+00  605.3700 0.000000e+00  31.54444
183956   rs3866831       4_72 0.000000e+00 1596.6468 0.000000e+00 -30.10000
183955   rs6533530       4_72 0.000000e+00 1580.2990 0.000000e+00 -29.91429
183938  rs12644107       4_72 0.000000e+00  465.5759 0.000000e+00  25.98851
183936   rs2723318       4_72 0.000000e+00  813.2565 0.000000e+00 -25.45833
183931   rs2218698       4_72 0.000000e+00  771.3648 0.000000e+00 -25.09589
183934   rs2197814       4_72 0.000000e+00  772.0146 0.000000e+00  24.59722
183932   rs1448799       4_72 0.000000e+00  770.9787 0.000000e+00  24.56944
183930 rs112927894       4_72 0.000000e+00  741.1342 0.000000e+00  24.50685
183920   rs1823291       4_72 9.443849e-01  275.3827 2.522877e-04 -19.45205
183924   rs2723296       4_72 5.561070e-02  266.6973 1.438757e-05 -19.02740
183929  rs11724067       4_72 0.000000e+00  654.4966 0.000000e+00 -18.94059
183923   rs2044674       4_72 4.429420e-06  242.9736 1.044038e-09  18.58108
183968   rs4631108       4_72 9.858853e-01  278.7291 2.665748e-04 -17.63768
183967   rs1906613       4_72 1.411474e-02  268.6140 3.678003e-06  17.34783
28731   rs34515871       1_76 1.000000e+00  296.9840 2.881002e-04  17.00000
423415  rs60469668      10_66 1.000000e+00  171.3926 1.662657e-04  16.96471
183928  rs13111704       4_72 0.000000e+00  700.2351 0.000000e+00 -16.91743
28734   rs12058931       1_76 2.023295e-04  220.3706 4.325369e-08  16.54054
183952   rs4124159       4_72 0.000000e+00 1664.4211 0.000000e+00 -16.14414
183950   rs1906606       4_72 0.000000e+00 1659.0494 0.000000e+00 -16.02703
183957   rs4032974       4_72 0.000000e+00 1649.6039 0.000000e+00 -15.86726
183977  rs17513625       4_72 0.000000e+00  196.2481 0.000000e+00  15.71130
183954  rs10006881       4_72 0.000000e+00 1641.6919 0.000000e+00 -15.68750
423411  rs12572965      10_66 2.787622e-04  132.8475 3.592507e-08  15.27059
423410  rs56965730      10_66 2.796755e-04  131.7056 3.573296e-08  15.21176
183922  rs12642151       4_72 7.894574e-12  227.0161 1.738585e-15  14.14286
423413   rs7094488      10_66 9.999961e-01  105.1201 1.019752e-04  14.10606
672306    rs577676       1_84 4.329934e-04  124.1225 5.213653e-08 -13.77612
323204  rs28557111       7_70 9.999995e-01  268.5095 2.604773e-04  13.68182
672415    rs680084       1_84 6.024752e-04  136.4064 7.972312e-08 -13.53731
672386    rs608930       1_84 1.253762e-03  138.0822 1.679436e-07 -13.52239
672422    rs629234       1_84 5.624740e-04  135.5991 7.398942e-08 -13.52239
672340    rs598993       1_84 9.849966e-04  137.8588 1.317285e-07 -13.51515
672343    rs541557       1_84 9.796191e-04  137.8182 1.309707e-07 -13.51515
672429    rs525489       1_84 1.190958e-03  137.5496 1.589156e-07 -13.49254
672430    rs503706       1_84 1.177181e-03  137.4686 1.569846e-07 -13.49254
672350    rs539045       1_84 8.984718e-04  136.7722 1.192100e-07 -13.48485
672356    rs580487       1_84 8.877917e-04  136.6820 1.177153e-07 -13.48485

Gene set enrichment for genes with PIP>0.8

#GO enrichment analysis
library(enrichR)
Welcome to enrichR
Checking connection ... 
Enrichr ... Connection is Live!
FlyEnrichr ... Connection is available!
WormEnrichr ... Connection is available!
YeastEnrichr ... Connection is available!
FishEnrichr ... Connection is available!
dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]

#number of genes for gene set enrichment
length(genes)
[1] 19
if (length(genes)>0){
  GO_enrichment <- enrichr(genes, dbs)

  for (db in dbs){
    print(db)
    df <- GO_enrichment[[db]]
    print(plotEnrich(GO_enrichment[[db]]))
    df <- df[df$Adjusted.P.value<0.05,c("Term", "Overlap", "Adjusted.P.value", "Genes")]
    print(df)
  }
  
  #DisGeNET enrichment
  
  # devtools::install_bitbucket("ibi_group/disgenet2r")
  library(disgenet2r)
  
  disgenet_api_key <- get_disgenet_api_key(
                    email = "wesleycrouse@gmail.com", 
                    password = "uchicago1" )
  
  Sys.setenv(DISGENET_API_KEY= disgenet_api_key)
  
  res_enrich <-disease_enrichment(entities=genes, vocabulary = "HGNC",
                               database = "CURATED" )
  
  df <- res_enrich@qresult[1:10, c("Description", "FDR", "Ratio",  "BgRatio")]
  print(df)
  
  #WebGestalt enrichment
  library(WebGestaltR)
  
  background <- ctwas_gene_res$genename
  
  #listGeneSet()
  databases <- c("pathway_KEGG", "disease_GLAD4U", "disease_OMIM")
  
  enrichResult <- WebGestaltR(enrichMethod="ORA", organism="hsapiens",
                              interestGene=genes, referenceGene=background,
                              enrichDatabase=databases, interestGeneType="genesymbol",
                              referenceGeneType="genesymbol", isOutput=F)
  print(enrichResult[,c("description", "size", "overlap", "FDR", "database", "userId")])
}
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
[1] "GO_Biological_Process_2021"

[1] Term             Overlap          Adjusted.P.value Genes           
<0 rows> (or 0-length row.names)
[1] "GO_Cellular_Component_2021"

[1] Term             Overlap          Adjusted.P.value Genes           
<0 rows> (or 0-length row.names)
[1] "GO_Molecular_Function_2021"
                                                                                             Term
1                                                                   zinc ion binding (GO:0008270)
2                        nucleotide phosphatase activity, acting on free nucleotides (GO:0098519)
3 oxidoreductase activity, acting on a sulfur group of donors, disulfide as acceptor (GO:0016671)
4                                                            oxo-acid-lyase activity (GO:0016833)
5                                                           CoA carboxylase activity (GO:0016421)
6                                                       transition metal ion binding (GO:0046914)
7                                      histone demethylase activity (H3-K4 specific) (GO:0032453)
  Overlap Adjusted.P.value            Genes
1   3/336       0.04663435 KDM1B;DPF3;MSRB1
2     1/5       0.04663435              PGP
3     1/5       0.04663435            MSRB1
4     1/5       0.04663435              NPL
5     1/6       0.04663435             PCCB
6   3/445       0.04989809 KDM1B;DPF3;MSRB1
7     1/9       0.04989809            KDM1B
LINC00964 gene(s) from the input list not found in DisGeNET CURATEDJAM2 gene(s) from the input list not found in DisGeNET CURATEDGMCL1 gene(s) from the input list not found in DisGeNET CURATEDWASHC2C gene(s) from the input list not found in DisGeNET CURATEDLINC01314 gene(s) from the input list not found in DisGeNET CURATED
                                                                  Description
1                                                         Atrial Fibrillation
27                                             Paroxysmal atrial fibrillation
56                                             Persistent atrial fibrillation
68                                               familial atrial fibrillation
19                                                   Congenital retrognathism
38                                   Epidermolysis bullosa simplex, Ogna type
57                      HYPOTHYROIDISM, CONGENITAL, NONGOITROUS, 5 (disorder)
60            Epidermolysa bullosa simplex and limb girdle muscular dystrophy
63                                   MUSCULAR DYSTROPHY, LIMB-GIRDLE, TYPE 2Q
64 ATRIAL SEPTAL DEFECT 7 WITH OR WITHOUT ATRIOVENTRICULAR CONDUCTION DEFECTS
            FDR Ratio  BgRatio
1  1.865793e-08  7/14 160/9703
27 1.865793e-08  7/14 156/9703
56 1.865793e-08  7/14 156/9703
68 1.865793e-08  7/14 156/9703
19 5.378460e-03  1/14   1/9703
38 5.378460e-03  1/14   1/9703
57 5.378460e-03  1/14   1/9703
60 5.378460e-03  1/14   1/9703
63 5.378460e-03  1/14   1/9703
64 5.378460e-03  1/14   1/9703
******************************************

*                                        *

*          Welcome to WebGestaltR !      *

*                                        *

******************************************
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
Warning in oraEnrichment(interestGeneList, referenceGeneList, geneSet, minNum =
minNum, : No significant gene set is identified based on FDR 0.05!

NULL

Sensitivity, specificity and precision for silver standard genes

library("readxl")

known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
* `` -> ...4
* `` -> ...5
known_annotations <- unique(known_annotations$`Gene Symbol`)

unrelated_genes <- ctwas_gene_res$genename[!(ctwas_gene_res$genename %in% known_annotations)]

#number of genes in known annotations
print(length(known_annotations))
[1] 69
#number of genes in known annotations with imputed expression
print(sum(known_annotations %in% ctwas_gene_res$genename))
[1] 37
#assign ctwas, TWAS, and bystander genes
ctwas_genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]
twas_genes <- ctwas_gene_res$genename[abs(ctwas_gene_res$z)>sig_thresh]
novel_genes <- ctwas_genes[!(ctwas_genes %in% twas_genes)]

#significance threshold for TWAS
print(sig_thresh)
[1] 4.56791
#number of ctwas genes
length(ctwas_genes)
[1] 19
#number of TWAS genes
length(twas_genes)
[1] 79
#show novel genes (ctwas genes with not in TWAS genes)
ctwas_gene_res[ctwas_gene_res$genename %in% novel_genes,report_cols]
       genename region_tag susie_pip      mu2          PVE         z num_eqtl
4891        NPL       1_90 0.8251030 18.75569 1.501245e-05 -3.825175        1
12133 LINC00964       8_82 0.8180590 22.20129 1.761867e-05  4.554265        2
9417       PLEC       8_94 0.9666163 43.61991 4.090245e-05  3.093844        2
8847    WASHC2C      10_31 0.8186904 19.80281 1.572740e-05 -3.972152        1
12376 LINC01314      15_37 0.8300211 20.71969 1.668334e-05 -4.379164        4
#sensitivity / recall
sensitivity <- rep(NA,2)
names(sensitivity) <- c("ctwas", "TWAS")
sensitivity["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(known_annotations)
sensitivity["TWAS"] <- sum(twas_genes %in% known_annotations)/length(known_annotations)
sensitivity
ctwas  TWAS 
    0     0 
#specificity
specificity <- rep(NA,2)
names(specificity) <- c("ctwas", "TWAS")
specificity["ctwas"] <- sum(!(unrelated_genes %in% ctwas_genes))/length(unrelated_genes)
specificity["TWAS"] <- sum(!(unrelated_genes %in% twas_genes))/length(unrelated_genes)
specificity
    ctwas      TWAS 
0.9981212 0.9921883 
#precision / PPV
precision <- rep(NA,2)
names(precision) <- c("ctwas", "TWAS")
precision["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
precision["TWAS"] <- sum(twas_genes %in% known_annotations)/length(twas_genes)
precision
ctwas  TWAS 
    0     0 
#ROC curves

pip_range <- (0:1000)/1000
sensitivity <- rep(NA, length(pip_range))
specificity <- rep(NA, length(pip_range))

for (index in 1:length(pip_range)){
  pip <- pip_range[index]
  ctwas_genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>=pip]
  sensitivity[index] <- sum(ctwas_genes %in% known_annotations)/length(known_annotations)
  specificity[index] <- sum(!(unrelated_genes %in% ctwas_genes))/length(unrelated_genes)
}

plot(1-specificity, sensitivity, type="l", xlim=c(0,1), ylim=c(0,1))

sig_thresh_range <- seq(from=0, to=max(abs(ctwas_gene_res$z)), length.out=length(pip_range))

for (index in 1:length(sig_thresh_range)){
  sig_thresh_plot <- sig_thresh_range[index]
  twas_genes <- ctwas_gene_res$genename[abs(ctwas_gene_res$z)>=sig_thresh_plot]
  sensitivity[index] <- sum(twas_genes %in% known_annotations)/length(known_annotations)
  specificity[index] <- sum(!(unrelated_genes %in% twas_genes))/length(unrelated_genes)
}

lines(1-specificity, sensitivity, xlim=c(0,1), ylim=c(0,1), col="red", lty=2)

Sensitivity, specificity and precision for silver standard genes - bystanders only

This section first uses imputed silver standard genes to identify bystander genes within 1Mb. The bystander gene list is then subset to only genes with imputed expression in this analysis. Then, the ctwas and TWAS gene lists from this analysis are subset to only genes that are in the (subset) silver standard and bystander genes. These gene lists are then used to compute sensitivity, specificity and precision for ctwas and TWAS.

# library(biomaRt)
# library(GenomicRanges)
# 
# ensembl <- useEnsembl(biomart="ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
# G_list <- getBM(filters= "chromosome_name", attributes= c("hgnc_symbol","chromosome_name","start_position","end_position","gene_biotype"), values=1:22, mart=ensembl)
# G_list <- G_list[G_list$hgnc_symbol!="",]
# G_list <- G_list[G_list$gene_biotype %in% c("protein_coding","lncRNA"),]
# G_list$start <- G_list$start_position
# G_list$end <- G_list$end_position
# G_list_granges <- makeGRangesFromDataFrame(G_list, keep.extra.columns=T)
# 
# #remove genes without imputed expression from gene lists
# known_annotations <- known_annotations[known_annotations %in% ctwas_gene_res$genename]
# 
# known_annotations_positions <- G_list[G_list$hgnc_symbol %in% known_annotations,]
# half_window <- 1000000
# known_annotations_positions$start <- known_annotations_positions$start_position - half_window
# known_annotations_positions$end <- known_annotations_positions$end_position + half_window
# known_annotations_positions$start[known_annotations_positions$start<1] <- 1
# known_annotations_granges <- makeGRangesFromDataFrame(known_annotations_positions, keep.extra.columns=T)
# 
# bystanders <- findOverlaps(known_annotations_granges,G_list_granges)
# bystanders <- unique(subjectHits(bystanders))
# bystanders <- G_list$hgnc_symbol[bystanders]
# bystanders <- unique(bystanders[!(bystanders %in% known_annotations)])
# unrelated_genes <- bystanders
# 
# #save gene lists
# save(known_annotations, file=paste0(results_dir, "/known_annotations.Rd"))
# save(unrelated_genes, file=paste0(results_dir, "/bystanders.Rd"))


load(paste0(results_dir, "/known_annotations.Rd"))
load(paste0(results_dir, "/bystanders.Rd"))


#remove genes without imputed expression from bystander list
unrelated_genes <- unrelated_genes[unrelated_genes %in% ctwas_gene_res$genename]

#number of genes in known annotations (with imputed expression)
print(length(known_annotations))
[1] 37
#number of bystander genes (with imputed expression)
print(length(unrelated_genes))
[1] 442
#subset results to genes in known annotations or bystanders
ctwas_gene_res_subset <- ctwas_gene_res[ctwas_gene_res$genename %in% c(known_annotations, unrelated_genes),]

#assign ctwas and TWAS genes
ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>0.8]
twas_genes <- ctwas_gene_res_subset$genename[abs(ctwas_gene_res_subset$z)>sig_thresh]

#significance threshold for TWAS
print(sig_thresh)
[1] 4.56791
#number of ctwas genes (in known annotations or bystanders)
length(ctwas_genes)
[1] 0
#number of TWAS genes (in known annotations or bystanders)
length(twas_genes)
[1] 5
#sensitivity / recall
sensitivity <- rep(NA,2)
names(sensitivity) <- c("ctwas", "TWAS")
sensitivity["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(known_annotations)
sensitivity["TWAS"] <- sum(twas_genes %in% known_annotations)/length(known_annotations)
sensitivity
ctwas  TWAS 
    0     0 
#specificity / (1 - False Positive Rate)
specificity <- rep(NA,2)
names(specificity) <- c("ctwas", "TWAS")
specificity["ctwas"] <- sum(!(unrelated_genes %in% ctwas_genes))/length(unrelated_genes)
specificity["TWAS"] <- sum(!(unrelated_genes %in% twas_genes))/length(unrelated_genes)
specificity
    ctwas      TWAS 
1.0000000 0.9886878 
#precision / PPV / (1 - False Discovery Rate)
precision <- rep(NA,2)
names(precision) <- c("ctwas", "TWAS")
precision["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
precision["TWAS"] <- sum(twas_genes %in% known_annotations)/length(twas_genes)
precision
ctwas  TWAS 
  NaN     0 
#store sensitivity and specificity calculations for plots
sensitivity_plot <- sensitivity
specificity_plot <- specificity

#precision / PPV by PIP bin
pip_range <- c(0.2, 0.4, 0.6, 0.8, 1)
precision_range <- rep(NA, length(pip_range))

for (i in 1:length(pip_range)){
  pip_upper <- pip_range[i]

  if (i==1){
    pip_lower <- 0
  } else {
    pip_lower <- pip_range[i-1]
  }
  
  #assign ctwas genes in PIP bin
  ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>=pip_lower & ctwas_gene_res_subset$susie_pip<pip_upper]
  
  precision_range[i] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
}

names(precision_range) <- paste(c(0, pip_range[-length(pip_range)]), pip_range,sep=" - ")

barplot(precision_range, ylim=c(0,1), main="Precision by PIP Range", xlab="PIP Range", ylab="Precision")
abline(h=0.2, lty=2)
abline(h=0.4, lty=2)
abline(h=0.6, lty=2)
abline(h=0.8, lty=2)
barplot(precision_range, add=T, col="darkgrey")

#precision / PPV by PIP threshold
#pip_range <- c(0.2, 0.4, 0.6, 0.8, 1)
pip_range <- c(0.5, 0.8, 1)
precision_range <- rep(NA, length(pip_range))
number_detected <- rep(NA, length(pip_range))

for (i in 1:length(pip_range)){
  pip_upper <- pip_range[i]

  if (i==1){
    pip_lower <- 0
  } else {
    pip_lower <- pip_range[i-1]
  }
  
  #assign ctwas genes using PIP threshold
  ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>=pip_lower]
  
  number_detected[i] <- length(ctwas_genes)
  precision_range[i] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
}

names(precision_range) <- paste0(">= ", c(0, pip_range[-length(pip_range)]))

precision_range <- precision_range*100

precision_range <- c(precision_range, precision["TWAS"]*100)
names(precision_range)[4] <- "TWAS Bonferroni"
number_detected <- c(number_detected, length(twas_genes))

barplot(precision_range, ylim=c(0,100), main="Precision for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% of Detected Genes in Silver Standard")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)

#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)

#false discovery rate by PIP threshold

barplot(100-precision_range, ylim=c(0,100), main="False Discovery Rate for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% Bystanders in Detected Genes")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(100-precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)

#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)

#ROC curves

pip_range <- (0:1000)/1000
sensitivity <- rep(NA, length(pip_range))
specificity <- rep(NA, length(pip_range))

for (index in 1:length(pip_range)){
  pip <- pip_range[index]
  ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>=pip]
  sensitivity[index] <- sum(ctwas_genes %in% known_annotations)/length(known_annotations)
  specificity[index] <- sum(!(unrelated_genes %in% ctwas_genes))/length(unrelated_genes)
}

plot(1-specificity, sensitivity, type="l", xlim=c(0,1), ylim=c(0,1), main="", xlab="1 - Specificity", ylab="Sensitivity")
title(expression("ROC Curve for cTWAS (black) and TWAS (" * phantom("red") * ")"))
title(expression(phantom("ROC Curve for cTWAS (black) and TWAS (") * "red" * phantom(")")), col.main="red")

sig_thresh_range <- seq(from=0, to=max(abs(ctwas_gene_res_subset$z)), length.out=length(pip_range))

for (index in 1:length(sig_thresh_range)){
  sig_thresh_plot <- sig_thresh_range[index]
  twas_genes <- ctwas_gene_res_subset$genename[abs(ctwas_gene_res_subset$z)>=sig_thresh_plot]
  sensitivity[index] <- sum(twas_genes %in% known_annotations)/length(known_annotations)
  specificity[index] <- sum(!(unrelated_genes %in% twas_genes))/length(unrelated_genes)
}

lines(1-specificity, sensitivity, xlim=c(0,1), ylim=c(0,1), col="red", lty=1)

abline(a=0,b=1,lty=3)

#add previously computed points from the analysis
ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>0.8]
twas_genes <- ctwas_gene_res_subset$genename[abs(ctwas_gene_res_subset$z)>sig_thresh]

points(1-specificity_plot["ctwas"], sensitivity_plot["ctwas"], pch=21, bg="black")
points(1-specificity_plot["TWAS"], sensitivity_plot["TWAS"], pch=21, bg="red")

PIP Manhattan Plot

library(tibble)
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
✔ tidyr   1.1.4     ✔ dplyr   1.0.7
✔ readr   2.1.1     ✔ stringr 1.4.0
✔ purrr   0.3.4     ✔ forcats 0.5.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ tidyr::extract() masks disgenet2r::extract()
✖ dplyr::filter()  masks stats::filter()
✖ dplyr::lag()     masks stats::lag()
full.gene.pip.summary <- data.frame(gene_name = ctwas_gene_res$genename, 
                                    gene_pip = ctwas_gene_res$susie_pip, 
                                    gene_id = ctwas_gene_res$id, 
                                    chr = as.integer(ctwas_gene_res$chrom),
                                    start = ctwas_gene_res$pos / 1e3,
                                    is_highlight = F, stringsAsFactors = F) %>% as_tibble()
full.gene.pip.summary$is_highlight <- full.gene.pip.summary$gene_pip > 0.80

don <- full.gene.pip.summary %>% 
  
  # Compute chromosome size
  group_by(chr) %>% 
  summarise(chr_len=max(start)) %>% 
  
  # Calculate cumulative position of each chromosome
  mutate(tot=cumsum(chr_len)-chr_len) %>%
  dplyr::select(-chr_len) %>%
  
  # Add this info to the initial dataset
  left_join(full.gene.pip.summary, ., by=c("chr"="chr")) %>%
  
  # Add a cumulative position of each SNP
  arrange(chr, start) %>%
  mutate( BPcum=start+tot)

axisdf <- don %>% group_by(chr) %>% summarize(center=( max(BPcum) + min(BPcum) ) / 2 )

x_axis_labels <- axisdf$chr
x_axis_labels[seq(1,21,2)] <- ""

ggplot(don, aes(x=BPcum, y=gene_pip)) +
  
  # Show all points
  ggrastr::geom_point_rast(aes(color=as.factor(chr)), size=2) +
  scale_color_manual(values = rep(c("grey", "skyblue"), 22 )) +
  
  # custom X axis:
  # scale_x_continuous(label = axisdf$chr, 
  #                    breaks= axisdf$center,
  #                    guide = guide_axis(n.dodge = 2)) +
  scale_x_continuous(label = x_axis_labels,
                     breaks = axisdf$center) +
  
  scale_y_continuous(expand = c(0, 0), limits = c(0,1.25), breaks=(1:5)*0.2, minor_breaks=(1:10)*0.1) + # remove space between plot area and x axis
  
  # Add highlighted points
  ggrastr::geom_point_rast(data=subset(don, is_highlight==T), color="orange", size=2) +
  
  # Add label using ggrepel to avoid overlapping
  ggrepel::geom_label_repel(data=subset(don, is_highlight==T), 
                            aes(label=gene_name), 
                            size=4,
                            min.segment.length = 0, 
                            label.size = NA,
                            fill = alpha(c("white"),0)) +
  
  # Custom the theme:
  theme_bw() +
  theme( 
    text = element_text(size = 14),
    legend.position="none",
    panel.border = element_blank(),
    panel.grid.major.x = element_blank(),
    panel.grid.minor.x = element_blank()
  ) +
  xlab("Chromosome") + 
  ylab("cTWAS PIP")

Locus Plots - 1_84

library(ctwas)

Attaching package: 'ctwas'
The following object is masked _by_ '.GlobalEnv':

    z_snp
locus_plot <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS"){
  region_tag1 <- unlist(strsplit(region_tag, "_"))[1]
  region_tag2 <- unlist(strsplit(region_tag, "_"))[2]
  
  a <- ctwas_res[ctwas_res$region_tag==region_tag,]
  
  regionlist <- readRDS(paste0(results_dir, "/", analysis_id, "_ctwas.regionlist.RDS"))
  region <- regionlist[[as.numeric(region_tag1)]][[region_tag2]]
  
  R_snp_info <- do.call(rbind, lapply(region$regRDS, function(x){data.table::fread(paste0(tools::file_path_sans_ext(x), ".Rvar"))}))
  
  if (isTRUE(rerun_ctwas)){
    ld_exprfs <- paste0(results_dir, "/", analysis_id, "_expr_chr", 1:22, ".expr.gz")
    temp_reg <- data.frame("chr" = paste0("chr",region_tag1), "start" = region$start, "stop" = region$stop)
  
    write.table(temp_reg, 
                #file= paste0(results_dir, "/", analysis_id, "_ctwas.temp.reg.txt") , 
                file= "temp_reg.txt",
                row.names=F, col.names=T, sep="\t", quote = F)
  
    load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd"))
  
    z_gene_temp <-  z_gene[z_gene$id %in% a$id[a$type=="gene"],]
    z_snp_temp <-  z_snp[z_snp$id %in% R_snp_info$id,]
  
    ctwas_rss(z_gene_temp, z_snp_temp, ld_exprfs, ld_pgenfs = NULL, 
              ld_R_dir = dirname(region$regRDS)[1],
              ld_regions_custom = "temp_reg.txt", thin = 1, 
              outputdir = ".", outname = "temp", ncore = 1, ncore.rerun = 1, prob_single = 0,
              group_prior = estimated_group_prior, group_prior_var = estimated_group_prior_var,
              estimate_group_prior = F, estimate_group_prior_var = F)
            
            
    a <- data.table::fread("temp.susieIrss.txt", header = T)
    
    rownames(z_snp_temp) <- z_snp_temp$id
    z_snp_temp <- z_snp_temp[a$id[a$type=="SNP"],]
    z_gene_temp <- z_gene_temp[a$id[a$type=="gene"],]
    
    a$z <- NA
    a$z[a$type=="SNP"] <- z_snp_temp$z
    a$z[a$type=="gene"] <- z_gene_temp$z
  }
  
  a$ifcausal <- 0
  focus <- a$id[a$type=="gene"][which.max(abs(a$z[a$type=="gene"]))]
  a$ifcausal <- as.numeric(a$id==focus)
    
  a$PVALUE <- (-log(2) - pnorm(abs(a$z), lower.tail=F, log.p=T))/log(10)
  
  R_gene <- readRDS(region$R_g_file)
  R_snp_gene <- readRDS(region$R_sg_file)
  R_snp <- as.matrix(Matrix::bdiag(lapply(region$regRDS, readRDS)))
  
  rownames(R_gene) <- region$gid
  colnames(R_gene) <- region$gid
  rownames(R_snp_gene) <- R_snp_info$id
  colnames(R_snp_gene) <- region$gid
  rownames(R_snp) <- R_snp_info$id
  colnames(R_snp) <- R_snp_info$id
  
  a$r2max <- NA
  
  a$r2max[a$type=="gene"] <- R_gene[focus,a$id[a$type=="gene"]]
  a$r2max[a$type=="SNP"] <- R_snp_gene[a$id[a$type=="SNP"],focus]
  
  r2cut <- 0.4
  colorsall <- c("#7fc97f", "#beaed4", "#fdc086")
  
  layout(matrix(1:2, ncol = 1), widths = 1, heights = c(1.5,1.5), respect = FALSE)
  par(mar = c(0, 4.1, 4.1, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " Position"),frame.plot=FALSE, col = "white", ylim= c(-0.1,1.1), ylab = "cTWAS PIP", xaxt = 'n')
  
  grid()
  points(a$pos[a$type=="SNP"], a$susie_pip[a$type == "SNP"], pch = 21, xlab="Genomic position", bg = colorsall[1])
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$susie_pip[a$type == "SNP"  & a$r2max >r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$susie_pip[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$susie_pip[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$susie_pip[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$susie_pip[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  
  if (isTRUE(plot_eqtl)){
    for (cgene in a[a$type=="gene" & a$ifcausal == 1, ]$id){
      load(paste0(results_dir, "/",analysis_id, "_expr_chr", region_tag1, ".exprqc.Rd"))
      eqtls <- rownames(wgtlist[[cgene]])
      points(a[a$id %in% eqtls,]$pos, rep( -0.15, nrow(a[a$id %in% eqtls,])), pch = "|", col = "salmon", cex = 1.5)
    }
  }
  
  legend(min(a$pos), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="Shape Legend", bty ='n', cex=0.6, title.adj = 0)
  legend(min(a$pos), y= 0.7 ,c("Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = 19, col = c("salmon", "purple", colorsall[1]), title="Color Legend", bty ='n', cex=0.6, title.adj = 0)
  
  if (label=="cTWAS"){
    text(a$pos[a$id==focus], a$susie_pip[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
  
  par(mar = c(4.1, 4.1, 0.5, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 21, xlab=paste0("Chromosome ", region_tag1, " Position"), frame.plot=FALSE, bg = colorsall[1], ylab = "TWAS -log10(p value)", panel.first = grid(), ylim =c(0, max(a$PVALUE)*1.2))
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$PVALUE[a$type == "SNP"  & a$r2max > r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$PVALUE[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$PVALUE[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$PVALUE[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$PVALUE[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  abline(h=-log10(alpha/nrow(ctwas_gene_res)), col ="red", lty = 2)
  
  if (label=="TWAS"){
    text(a$pos[a$id==focus], a$PVALUE[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
}

#locus_plot("1_84", label="TWAS")
locus_plot4 <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS"){
  region_tag1 <- unlist(strsplit(region_tag, "_"))[1]
  region_tag2 <- unlist(strsplit(region_tag, "_"))[2]
  
  a <- ctwas_res[ctwas_res$region_tag==region_tag,]
  
  regionlist <- readRDS(paste0(results_dir, "/", analysis_id, "_ctwas.regionlist.RDS"))
  region <- regionlist[[as.numeric(region_tag1)]][[region_tag2]]
  
  R_snp_info <- do.call(rbind, lapply(region$regRDS, function(x){data.table::fread(paste0(tools::file_path_sans_ext(x), ".Rvar"))}))
  
  if (isTRUE(rerun_ctwas)){
    ld_exprfs <- paste0(results_dir, "/", analysis_id, "_expr_chr", 1:22, ".expr.gz")
    temp_reg <- data.frame("chr" = paste0("chr",region_tag1), "start" = region$start, "stop" = region$stop)
  
    write.table(temp_reg, 
                #file= paste0(results_dir, "/", analysis_id, "_ctwas.temp.reg.txt") , 
                file= "temp_reg.txt",
                row.names=F, col.names=T, sep="\t", quote = F)
  
    load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd"))
  
    z_gene_temp <-  z_gene[z_gene$id %in% a$id[a$type=="gene"],]
    z_snp_temp <-  z_snp[z_snp$id %in% R_snp_info$id,]
  
    ctwas_rss(z_gene_temp, z_snp_temp, ld_exprfs, ld_pgenfs = NULL, 
              ld_R_dir = dirname(region$regRDS)[1],
              ld_regions_custom = "temp_reg.txt", thin = 1, 
              outputdir = ".", outname = "temp", ncore = 1, ncore.rerun = 1, prob_single = 0,
              group_prior = estimated_group_prior, group_prior_var = estimated_group_prior_var,
              estimate_group_prior = F, estimate_group_prior_var = F)
            
            
    a <- data.table::fread("temp.susieIrss.txt", header = T)
    
    rownames(z_snp_temp) <- z_snp_temp$id
    z_snp_temp <- z_snp_temp[a$id[a$type=="SNP"],]
    z_gene_temp <- z_gene_temp[a$id[a$type=="gene"],]
    
    a$z <- NA
    a$z[a$type=="SNP"] <- z_snp_temp$z
    a$z[a$type=="gene"] <- z_gene_temp$z
  }
  
  a$ifcausal <- 0
  focus <- a$id[a$type=="gene"][which.max(abs(a$z[a$type=="gene"]))]
  a$ifcausal <- as.numeric(a$id==focus)
    
  a$PVALUE <- (-log(2) - pnorm(abs(a$z), lower.tail=F, log.p=T))/log(10)
  
  R_gene <- readRDS(region$R_g_file)
  R_snp_gene <- readRDS(region$R_sg_file)
  R_snp <- as.matrix(Matrix::bdiag(lapply(region$regRDS, readRDS)))
  
  rownames(R_gene) <- region$gid
  colnames(R_gene) <- region$gid
  rownames(R_snp_gene) <- R_snp_info$id
  colnames(R_snp_gene) <- region$gid
  rownames(R_snp) <- R_snp_info$id
  colnames(R_snp) <- R_snp_info$id
  
  a$r2max <- NA
  
  a$r2max[a$type=="gene"] <- R_gene[focus,a$id[a$type=="gene"]]
  a$r2max[a$type=="SNP"] <- R_snp_gene[a$id[a$type=="SNP"],focus]
  
  r2cut <- 0.4
  colorsall <- c("#7fc97f", "#beaed4", "#fdc086")
  
  layout(matrix(1:2, ncol = 1), widths = 1, heights = c(1.5,1.5), respect = FALSE)
  par(mar = c(0, 4.1, 4.1, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " Position"),frame.plot=FALSE, col = "white", ylim= c(-0.1,1.1), ylab = "cTWAS PIP", xaxt = 'n')
  
  grid()
  points(a$pos[a$type=="SNP"], a$susie_pip[a$type == "SNP"], pch = 21, xlab="Genomic position", bg = colorsall[1])
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$susie_pip[a$type == "SNP"  & a$r2max >r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$susie_pip[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$susie_pip[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$susie_pip[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$susie_pip[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  
  if (isTRUE(plot_eqtl)){
    for (cgene in a[a$type=="gene" & a$ifcausal == 1, ]$id){
      load(paste0(results_dir, "/",analysis_id, "_expr_chr", region_tag1, ".exprqc.Rd"))
      eqtls <- rownames(wgtlist[[cgene]])
      points(a[a$id %in% eqtls,]$pos, rep( -0.15, nrow(a[a$id %in% eqtls,])), pch = "|", col = "salmon", cex = 1.5)
    }
  }
  
  #legend(min(a$pos), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="Shape Legend", bty ='n', cex=0.6, title.adj = 0)
  #legend(min(a$pos), y= 0.7 ,c("Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = 19, col = c("salmon", "purple", colorsall[1]), title="Color Legend", bty ='n', cex=0.6, title.adj = 0)
  
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="Shape Legend", bty ='n', cex=0.6, title.adj = 0)
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 0.7 ,c("Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = 19, col = c("salmon", "purple", colorsall[1]), title="Color Legend", bty ='n', cex=0.6, title.adj = 0)
  
  if (label=="cTWAS"){
    text(a$pos[a$id==focus], a$susie_pip[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
  
  par(mar = c(4.1, 4.1, 0.5, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 21, xlab=paste0("Chromosome ", region_tag1, " Position"), frame.plot=FALSE, bg = colorsall[1], ylab = "TWAS -log10(p value)", panel.first = grid(), ylim =c(0, max(a$PVALUE)*1.2))
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$PVALUE[a$type == "SNP"  & a$r2max > r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$PVALUE[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$PVALUE[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$PVALUE[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$PVALUE[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  abline(h=-log10(alpha/nrow(ctwas_gene_res)), col ="red", lty = 2)
  
  if (label=="TWAS"){
    text(a$pos[a$id==focus], a$PVALUE[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
}

#locus_plot4("10_48", label="cTWAS")
locus_plot5 <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS", focus){
  region_tag1 <- unlist(strsplit(region_tag, "_"))[1]
  region_tag2 <- unlist(strsplit(region_tag, "_"))[2]
  
  a <- ctwas_res[ctwas_res$region_tag==region_tag,]
  
  regionlist <- readRDS(paste0(results_dir, "/", analysis_id, "_ctwas.regionlist.RDS"))
  region <- regionlist[[as.numeric(region_tag1)]][[region_tag2]]
  
  R_snp_info <- do.call(rbind, lapply(region$regRDS, function(x){data.table::fread(paste0(tools::file_path_sans_ext(x), ".Rvar"))}))
  
  if (isTRUE(rerun_ctwas)){
    ld_exprfs <- paste0(results_dir, "/", analysis_id, "_expr_chr", 1:22, ".expr.gz")
    temp_reg <- data.frame("chr" = paste0("chr",region_tag1), "start" = region$start, "stop" = region$stop)
  
    write.table(temp_reg, 
                #file= paste0(results_dir, "/", analysis_id, "_ctwas.temp.reg.txt") , 
                file= "temp_reg.txt",
                row.names=F, col.names=T, sep="\t", quote = F)
  
    load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd"))
  
    z_gene_temp <-  z_gene[z_gene$id %in% a$id[a$type=="gene"],]
    z_snp_temp <-  z_snp[z_snp$id %in% R_snp_info$id,]
  
    ctwas_rss(z_gene_temp, z_snp_temp, ld_exprfs, ld_pgenfs = NULL, 
              ld_R_dir = dirname(region$regRDS)[1],
              ld_regions_custom = "temp_reg.txt", thin = 1, 
              outputdir = ".", outname = "temp", ncore = 1, ncore.rerun = 1, prob_single = 0,
              group_prior = estimated_group_prior, group_prior_var = estimated_group_prior_var,
              estimate_group_prior = F, estimate_group_prior_var = F)
            
            
    a <- data.table::fread("temp.susieIrss.txt", header = T)
    
    rownames(z_snp_temp) <- z_snp_temp$id
    z_snp_temp <- z_snp_temp[a$id[a$type=="SNP"],]
    z_gene_temp <- z_gene_temp[a$id[a$type=="gene"],]
    
    a$z <- NA
    a$z[a$type=="SNP"] <- z_snp_temp$z
    a$z[a$type=="gene"] <- z_gene_temp$z
  }
  
  a$ifcausal <- 0
  focus <- a$id[which(a$genename==focus)]
  a$ifcausal <- as.numeric(a$id==focus)

  a$PVALUE <- (-log(2) - pnorm(abs(a$z), lower.tail=F, log.p=T))/log(10)
  
  R_gene <- readRDS(region$R_g_file)
  R_snp_gene <- readRDS(region$R_sg_file)
  R_snp <- as.matrix(Matrix::bdiag(lapply(region$regRDS, readRDS)))
  
  rownames(R_gene) <- region$gid
  colnames(R_gene) <- region$gid
  rownames(R_snp_gene) <- R_snp_info$id
  colnames(R_snp_gene) <- region$gid
  rownames(R_snp) <- R_snp_info$id
  colnames(R_snp) <- R_snp_info$id
  
  a$r2max <- NA
  
  a$r2max[a$type=="gene"] <- R_gene[focus,a$id[a$type=="gene"]]
  a$r2max[a$type=="SNP"] <- R_snp_gene[a$id[a$type=="SNP"],focus]
  
  r2cut <- 0.4
  colorsall <- c("#7fc97f", "#beaed4", "#fdc086")
  
  layout(matrix(1:2, ncol = 1), widths = 1, heights = c(1.5,1.5), respect = FALSE)
  par(mar = c(0, 4.1, 4.1, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " Position"),frame.plot=FALSE, col = "white", ylim= c(-0.1,1.1), ylab = "cTWAS PIP", xaxt = 'n')
  
  grid()
  points(a$pos[a$type=="SNP"], a$susie_pip[a$type == "SNP"], pch = 21, xlab="Genomic position", bg = colorsall[1])
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$susie_pip[a$type == "SNP"  & a$r2max >r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$susie_pip[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$susie_pip[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$susie_pip[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$susie_pip[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  
  if (isTRUE(plot_eqtl)){
    for (cgene in a[a$type=="gene" & a$ifcausal == 1, ]$id){
      load(paste0(results_dir, "/",analysis_id, "_expr_chr", region_tag1, ".exprqc.Rd"))
      eqtls <- rownames(wgtlist[[cgene]])
      points(a[a$id %in% eqtls,]$pos, rep( -0.15, nrow(a[a$id %in% eqtls,])), pch = "|", col = "salmon", cex = 1.5)
    }
  }
  
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="Shape Legend", bty ='n', cex=0.6, title.adj = 0)
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 0.7 ,c("Focal Gene", "R2 > 0.4", "R2 <= 0.4"), pch = 19, col = c("salmon", "purple", colorsall[1]), title="Color Legend", bty ='n', cex=0.6, title.adj = 0)
  
  if (label=="cTWAS"){
    text(a$pos[a$id==focus], a$susie_pip[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
  
  par(mar = c(4.1, 4.1, 0.5, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 21, xlab=paste0("Chromosome ", region_tag1, " Position"), frame.plot=FALSE, bg = colorsall[1], ylab = "TWAS -log10(p value)", panel.first = grid(), ylim =c(0, max(a$PVALUE)*1.2))
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$PVALUE[a$type == "SNP"  & a$r2max > r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$PVALUE[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$PVALUE[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$PVALUE[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$PVALUE[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  abline(h=-log10(alpha/nrow(ctwas_gene_res)), col ="red", lty = 2)
  
  if (label=="TWAS"){
    text(a$pos[a$id==focus], a$PVALUE[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
}
locus_plot3 <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS", focus){
  region_tag1 <- unlist(strsplit(region_tag, "_"))[1]
  region_tag2 <- unlist(strsplit(region_tag, "_"))[2]
  
  a <- ctwas_res[ctwas_res$region_tag==region_tag,]
  
  regionlist <- readRDS(paste0(results_dir, "/", analysis_id, "_ctwas.regionlist.RDS"))
  region <- regionlist[[as.numeric(region_tag1)]][[region_tag2]]
  
  R_snp_info <- do.call(rbind, lapply(region$regRDS, function(x){data.table::fread(paste0(tools::file_path_sans_ext(x), ".Rvar"))}))
  
  if (isTRUE(rerun_ctwas)){
    ld_exprfs <- paste0(results_dir, "/", analysis_id, "_expr_chr", 1:22, ".expr.gz")
    temp_reg <- data.frame("chr" = paste0("chr",region_tag1), "start" = region$start, "stop" = region$stop)
  
    write.table(temp_reg, 
                #file= paste0(results_dir, "/", analysis_id, "_ctwas.temp.reg.txt") , 
                file= "temp_reg.txt",
                row.names=F, col.names=T, sep="\t", quote = F)
  
    load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd"))
  
    z_gene_temp <-  z_gene[z_gene$id %in% a$id[a$type=="gene"],]
    z_snp_temp <-  z_snp[z_snp$id %in% R_snp_info$id,]
  
    ctwas_rss(z_gene_temp, z_snp_temp, ld_exprfs, ld_pgenfs = NULL, 
              ld_R_dir = dirname(region$regRDS)[1],
              ld_regions_custom = "temp_reg.txt", thin = 1, 
              outputdir = ".", outname = "temp", ncore = 1, ncore.rerun = 1, prob_single = 0,
              group_prior = estimated_group_prior, group_prior_var = estimated_group_prior_var,
              estimate_group_prior = F, estimate_group_prior_var = F)
            
            
    a <- data.table::fread("temp.susieIrss.txt", header = T)
    
    rownames(z_snp_temp) <- z_snp_temp$id
    z_snp_temp <- z_snp_temp[a$id[a$type=="SNP"],]
    z_gene_temp <- z_gene_temp[a$id[a$type=="gene"],]
    
    a$z <- NA
    a$z[a$type=="SNP"] <- z_snp_temp$z
    a$z[a$type=="gene"] <- z_gene_temp$z
  }
  
  a$ifcausal <- 0
  focus <- a$id[which(a$genename==focus)]
  a$ifcausal <- as.numeric(a$id==focus)

  a$PVALUE <- (-log(2) - pnorm(abs(a$z), lower.tail=F, log.p=T))/log(10)
  
  R_gene <- readRDS(region$R_g_file)
  R_snp_gene <- readRDS(region$R_sg_file)
  R_snp <- as.matrix(Matrix::bdiag(lapply(region$regRDS, readRDS)))
  
  rownames(R_gene) <- region$gid
  colnames(R_gene) <- region$gid
  rownames(R_snp_gene) <- R_snp_info$id
  colnames(R_snp_gene) <- region$gid
  rownames(R_snp) <- R_snp_info$id
  colnames(R_snp) <- R_snp_info$id
  
  a$r2max <- NA
  
  a$r2max[a$type=="gene"] <- R_gene[focus,a$id[a$type=="gene"]]
  a$r2max[a$type=="SNP"] <- R_snp_gene[a$id[a$type=="SNP"],focus]
  
  r2cut <- 0.4
  colorsall <- c("#7fc97f", "#beaed4", "#fdc086")
  
  layout(matrix(1:2, ncol = 1), widths = 1, heights = c(1.5,1.5), respect = FALSE)
  par(mar = c(0, 4.1, 4.1, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " Position"),frame.plot=FALSE, col = "white", ylim= c(-0.1,1.1), ylab = "cTWAS PIP", xaxt = 'n')
  
  grid()
  points(a$pos[a$type=="SNP"], a$susie_pip[a$type == "SNP"], pch = 21, xlab="Genomic position", bg = colorsall[1])
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$susie_pip[a$type == "SNP"  & a$r2max >r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$susie_pip[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$susie_pip[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$susie_pip[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$susie_pip[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  
  if (isTRUE(plot_eqtl)){
    for (cgene in a[a$type=="gene" & a$ifcausal == 1, ]$id){
      load(paste0(results_dir, "/",analysis_id, "_expr_chr", region_tag1, ".exprqc.Rd"))
      eqtls <- rownames(wgtlist[[cgene]])
      points(a[a$id %in% eqtls,]$pos, rep( -0.15, nrow(a[a$id %in% eqtls,])), pch = "|", col = "salmon", cex = 1.5)
    }
  }
  
  legend(min(a$pos), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="Shape Legend", bty ='n', cex=0.6, title.adj = 0)
  legend(min(a$pos), y= 0.7 ,c("Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = 19, col = c("salmon", "purple", colorsall[1]), title="Color Legend", bty ='n', cex=0.6, title.adj = 0)
  
  if (label=="cTWAS"){
    text(a$pos[a$id==focus], a$susie_pip[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
  
  par(mar = c(4.1, 4.1, 0.5, 2.1))
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 21, xlab=paste0("Chromosome ", region_tag1, " Position"), frame.plot=FALSE, bg = colorsall[1], ylab = "TWAS -log10(p value)", panel.first = grid(), ylim =c(0, max(a$PVALUE)*1.2))
  points(a$pos[a$type=="SNP" & a$r2max > r2cut], a$PVALUE[a$type == "SNP"  & a$r2max > r2cut], pch = 21, bg = "purple")
  points(a$pos[a$type=="SNP" & a$ifcausal == 1], a$PVALUE[a$type == "SNP" & a$ifcausal == 1], pch = 21, bg = "salmon")
  points(a$pos[a$type=="gene"], a$PVALUE[a$type == "gene"], pch = 22, bg = colorsall[1], cex = 2)
  points(a$pos[a$type=="gene" & a$r2max > r2cut], a$PVALUE[a$type == "gene"  & a$r2max > r2cut], pch = 22, bg = "purple", cex = 2)
  points(a$pos[a$type=="gene" & a$ifcausal == 1], a$PVALUE[a$type == "gene" & a$ifcausal == 1], pch = 22, bg = "salmon", cex = 2)
  abline(h=-log10(alpha/nrow(ctwas_gene_res)), col ="red", lty = 2)
  
  if (label=="TWAS"){
    text(a$pos[a$id==focus], a$PVALUE[a$id==focus], labels=ctwas_gene_res$genename[ctwas_gene_res$id==focus], pos=3, cex=0.6)
  }
}
load(paste0(results_dir, "/known_annotations.Rd"))
load(paste0(results_dir, "/bystanders.Rd"))

for (i in 1:length(known_annotations)){
  focus <- known_annotations[i]
  region_tag <- ctwas_res$region_tag[which(ctwas_res$genename==focus)]

  locus_plot3(region_tag, focus=focus)
  mtext(text=region_tag)

  print(focus)
  print(region_tag)
  print(ctwas_gene_res[ctwas_gene_res$region_tag==region_tag,report_cols,])
}

[1] "ITIH4"
[1] "3_36"
      genename region_tag  susie_pip       mu2          PVE           z
181       PHF7       3_36 0.03088976  4.615967 1.383208e-07  0.16374269
182     SEMA3G       3_36 0.03502755  5.767093 1.959644e-07 -0.36057692
183      NISCH       3_36 0.03205134  4.953846 1.540278e-07  0.24038462
184      STAB1       3_36 0.05050992  9.131302 4.474245e-07 -1.29936306
255       CHDH       3_36 0.05077506  9.180983 4.522203e-07 -1.21195804
257     GLT8D1       3_36 0.03128338  4.731850 1.436002e-07  0.21088172
521      ITIH4       3_36 0.05569229 10.035020 5.421554e-07  1.62424242
527     IL17RB       3_36 0.09631607 15.141119 1.414709e-06  1.89507924
2950   SELENOK       3_36 0.04225325  7.488869 3.069635e-07 -1.09160305
2951     ACTR8       3_36 0.06071920 10.834779 6.381996e-07  1.53764919
3014      RRP9       3_36 0.05429349  9.799640 5.161409e-07 -1.08015267
3022     DNAH1       3_36 0.03189817  4.909838 1.519299e-07 -0.32954545
3025     TNNC1       3_36 0.08528015 13.996033 1.157879e-06 -1.79878049
3029      NEK4       3_36 0.05944421 10.638362 6.134720e-07  1.89705882
7266     RPL29       3_36 0.05844021 10.480473 5.941596e-07  1.33884298
7573       TKT       3_36 0.10408770 15.873090 1.602770e-06  2.17391304
7574      RFT1       3_36 0.05699405 10.248647 5.666391e-07  1.86567164
7575    SFMBT1       3_36 0.03277893  5.159485 1.640633e-07 -1.11538462
7576      GNL3       3_36 0.03094543  4.632390 1.390631e-07  0.10404624
7577     PBRM1       3_36 0.04784020  8.631905 4.005992e-07  0.99111111
7616     POC1A       3_36 0.03468540  5.677120 1.910228e-07 -0.42222222
7617     PPM1M       3_36 0.03387693  5.461144 1.794726e-07 -0.32684355
7619     WDR82       3_36 0.03056377  4.518898 1.339831e-07 -0.45070423
8289    NT5DC2       3_36 0.03143065  4.774743 1.455840e-07  0.01714286
8290     SMIM4       3_36 0.03430308  5.575767 1.855445e-07  1.04477612
11371  TMEM110       3_36 0.24537681 24.212753 5.763524e-06 -3.15524405
11922     TLR9       3_36 0.16240825 20.125488 3.170771e-06 -2.25595238
12027     ACY1       3_36 0.03204571  4.952252 1.539512e-07  0.45679012
12087     TWF2       3_36 0.05954270 10.653671 6.153727e-07 -1.49316098
12840   MUSTN1       3_36 0.04396227  7.853739 3.349400e-07 -1.59493671
12877    DCP1A       3_36 0.03936580  6.838519 2.611509e-07  0.83905021
      num_eqtl
181          1
182          1
183          1
184          1
255          4
257          2
521          1
527          2
2950         1
2951         2
3014         1
3022         1
3025         1
3029         1
7266         1
7573         1
7574         1
7575         1
7576         1
7577         1
7616         1
7617         3
7619         1
8289         1
8290         1
11371        2
11922        1
12027        1
12087        2
12840        1
12877        2

[1] "GHR"
[1] "5_28"
           genename region_tag  susie_pip      mu2          PVE           z
2871            GHR       5_28 0.05662180 6.295470 3.457979e-07  0.96376812
2872         HMGCS1       5_28 0.05317255 5.714465 2.947633e-07  0.67639191
2875            NNT       5_28 0.04675584 4.528240 2.053883e-07  0.16804150
6447          FBXO4       5_28 0.04783224 4.737969 2.198484e-07 -0.72633910
9328          NIM1K       5_28 0.06647410 7.782454 5.018564e-07  1.01775148
12160       SELENOP       5_28 0.04670773 4.518757 2.047473e-07 -0.02985075
12817 CTD-2035E11.4       5_28 0.05127003 5.378057 2.674850e-07  0.61951220
      num_eqtl
2871         1
2872         2
2875         2
6447         2
9328         1
12160        1
12817        1

[1] "EPHX2"
[1] "8_27"
      genename region_tag  susie_pip       mu2          PVE          z num_eqtl
3581    ADRA1A       8_27 0.10143196 18.692023 1.839253e-06 -1.9251055        3
11520     EBF2       8_27 0.02311643  5.031026 1.128204e-07  0.3706897        1
11937    PNMA2       8_27 0.02435414  5.506897 1.301038e-07  0.6029412        1
1986    TRIM35       8_27 0.02533988  5.869059 1.442725e-07 -0.5765401        2
3578       CLU       8_27 0.03081260  7.656246 2.288519e-07 -0.8593986        2
3580     PTK2B       8_27 0.02814020  6.826559 1.863543e-07  0.7368421        1
3584     EPHX2       8_27 0.02795738  6.766985 1.835279e-07  0.7717391        1
4662      ELP3       8_27 0.07296783 15.605213 1.104617e-06 -1.7035831        1
6136    CCDC25       8_27 0.03246217  8.133609 2.561364e-07 -1.1060606        1

[1] "LPL"
[1] "8_21"
            genename region_tag    susie_pip       mu2          PVE          z
995             PCM1       8_21 1.585694e-05 91.963533 1.414639e-09 -4.3484471
1983          PDGFRL       8_21 8.970799e-10  7.706520 6.706560e-15  1.0256850
4228           MTUS1       8_21 2.167432e-09  7.886506 1.658213e-14  1.2790698
2022          SH2D4A       8_21 9.619676e-10  5.897348 5.503356e-15  0.6404494
2039           ASAH1       8_21 2.248119e-05 67.205978 1.465675e-09 -7.4434198
6134      CSGALNACT1       8_21 8.474523e-10  4.684407 3.851061e-15 -0.2163023
6753            PSD3       8_21 9.086929e-10  5.309504 4.680385e-15 -0.4411765
2023          INTS10       8_21 1.510797e-09  9.902528 1.451318e-14 -1.1484375
9143             LPL       8_21 1.325698e-09  8.721530 1.121625e-14  1.0147059
12196 RP11-1105O14.1       8_21 1.222229e-09  7.987228 9.470196e-15  0.9218264
      num_eqtl
995          2
1983         2
4228         1
2022         1
2039         2
6134         3
6753         1
2023         1
9143         1
12196        2

[1] "MTTP"
[1] "4_66"
           genename region_tag  susie_pip       mu2          PVE          z
5323           MTTP       4_66 0.05713053  5.733633 3.177669e-07  0.5394737
5984        TRMT10A       4_66 0.06199325  6.490226 3.903145e-07  0.8490721
6388          EIF4E       4_66 0.07451430  8.200439 5.927712e-07 -1.0566038
10617         ADH1B       4_66 0.11117753 11.959347 1.289837e-06 -1.3819444
12092         ADH1C       4_66 0.06215161  6.513876 3.927374e-07  0.8287844
12107 RP11-766F14.2       4_66 0.24311774 19.587066 4.619516e-06 -2.4715447
12861 RP11-571L19.8       4_66 0.16383078 15.676799 2.491514e-06 -2.2652120
      num_eqtl
5323         1
5984         2
6388         1
10617        1
12092        3
12107        1
12861        2

[1] "DHCR7"
[1] "11_40"
          genename region_tag  susie_pip       mu2          PVE          z
2602         FOLR3      11_40 0.06321706  5.176238 3.174381e-07 -0.3541236
5123        IL18BP      11_40 0.07221106  6.412588 4.492080e-07 -0.6694005
5124         NUMA1      11_40 0.06148379  4.918434 2.933580e-07  0.2965517
5130        RNF121      11_40 0.06333601  5.193677 3.191068e-07  0.4020962
6938       FAM86C1      11_40 0.05986088  4.670549 2.712199e-07  0.2075472
7254          CLPB      11_40 0.22082235 17.123207 3.668078e-06  2.2927426
7828         FOLR2      11_40 0.09264058  8.742876 7.857168e-07  1.0861244
7829        INPPL1      11_40 0.05951221  4.616439 2.665162e-07  0.2215389
8875       NADSYN1      11_40 0.05973022  4.650307 2.694549e-07 -0.1643836
8876         DHCR7      11_40 0.05928308  4.580713 2.634355e-07 -0.1081081
11662    LINC01537      11_40 0.07183761  6.364302 4.435199e-07  0.6622075
12242 RP11-849H4.2      11_40 0.13798992 12.524095 1.676502e-06  1.7038627
      num_eqtl
2602         2
5123         2
5124         1
5130         2
6938         1
7254         2
7828         1
7829         2
8875         1
8876         1
11662        2
12242        1

[1] "LDLRAP1"
[1] "1_18"
          genename region_tag  susie_pip       mu2          PVE          z
563           PIGV       1_18 0.06331853  7.366137 4.524609e-07  0.9159664
3323          SYF2       1_18 0.13264392 14.320449 1.842699e-06 -1.6825397
3326        MAN1C1       1_18 0.04774416  4.756187 2.202874e-07  0.1987179
3327         DHDDS       1_18 0.04757833  4.724125 2.180424e-07  0.2191845
4077         AUNIP       1_18 0.07980968  9.521010 7.371384e-07 -1.3333333
4336         CEP85       1_18 0.13764065 14.674907 1.959442e-06 -1.8148148
4456         NR0B2       1_18 0.04747773  4.704592 2.166818e-07 -0.1594203
5695        CNKSR1       1_18 0.04805156  4.815364 2.244642e-07 -0.3717949
5703          GPN2       1_18 0.05429167  5.942143 3.129585e-07 -0.5934066
6895       LDLRAP1       1_18 0.04652726  4.518310 2.039360e-07 -0.1515152
6898        PAFAH2       1_18 0.04675828  4.563940 2.070184e-07  0.2173913
6899         EXTL1       1_18 0.05432911  5.948515 3.135102e-07 -0.8405797
6900       SLC30A2       1_18 0.05252772  5.637007 2.872417e-07  0.8057856
6902        TRIM63       1_18 0.11242300 12.744786 1.389947e-06 -1.7641509
6906        UBXN11       1_18 0.35871762 24.332422 8.467369e-06 -3.4841270
6923        FAM46B       1_18 0.05027576  5.232552 2.552012e-07  0.4492187
8452          CD52       1_18 0.07315646  8.708947 6.180573e-07  1.6184211
9183           SFN       1_18 0.05511372  6.081000 3.251211e-07  0.6842105
10436         RHCE       1_18 0.07584166  9.044827 6.654548e-07 -1.3799902
10716      FAM110D       1_18 0.04767572  4.743000 2.193617e-07 -0.4202899
11006        HMGN2       1_18 0.06250445  7.246163 4.393691e-07  0.8588235
11107       TMEM57       1_18 0.04707952  4.627003 2.113208e-07 -0.2371968
11872 RP11-96L14.7       1_18 0.05360600  5.824729 3.029002e-07 -0.5374556
12200        TRNP1       1_18 0.04745212  4.699640 2.163370e-07  0.1078431
12822 RP3-465N24.6       1_18 0.05180862  5.509723 2.769123e-07 -0.7297297
      num_eqtl
563          1
3323         1
3326         1
3327         2
4077         1
4336         1
4456         1
5695         1
5703         1
6895         1
6898         1
6899         1
6900         2
6902         1
6906         1
6923         1
8452         1
9183         1
10436        3
10716        1
11006        1
11107        1
11872        2
12200        1
12822        1

[1] "APOB"
[1] "2_13"
     genename region_tag  susie_pip      mu2          PVE         z num_eqtl
1135     APOB       2_13 0.04781908 6.177873 2.865831e-07 0.8658364        2

[1] "MYLIP"
[1] "6_13"
          genename region_tag  susie_pip       mu2          PVE         z
135          MYLIP       6_13 0.04846714 12.545013 5.898329e-07 1.2238806
427         DTNBP1       6_13 0.03284069  9.353887 2.979990e-07 1.1609007
5080          GMPR       6_13 0.01895961  4.784990 8.800775e-08 0.5505618
12767 RP11-560J1.2       6_13 0.03259631  9.698987 3.066939e-07 1.5871560
12809 RP1-151F17.2       6_13 0.05068457 12.830591 6.308598e-07 1.2287287
      num_eqtl
135          1
427          2
5080         1
12767        1
12809        2

[1] "OSBPL5"
[1] "11_3"
      genename region_tag   susie_pip       mu2          PVE          z
77      ZNF195       11_3 0.009895187  7.863944 7.548747e-08 -0.9041096
281     OSBPL5       11_3 0.006968720  4.720008 3.190848e-08  0.2551020
492      KCNQ1       11_3 0.037004455 19.905379 7.145537e-07 -2.0366972
603    TSPAN32       11_3 0.009218940  7.258928 6.491781e-08  0.7857143
1003    TOLLIP       11_3 0.034819757 19.288799 6.515404e-07  2.1340206
2627      CARS       11_3 0.038923449 19.910910 7.518182e-07  2.0746269
2628  SLC22A18       11_3 0.006893503  4.621317 3.090410e-08  0.1736637
2629      CD81       11_3 0.009110689  7.021626 6.205822e-08  0.8191489
2631  C11orf21       11_3 0.006842856  4.556587 3.024736e-08  0.1133250
3341      CTSD       11_3 0.007786252  5.725131 4.324385e-08  0.5583333
4258    CDKN1C       11_3 0.007417506  5.266790 3.789783e-08 -0.4254144
4328     TNNT3       11_3 0.519052917 21.311832 1.073107e-05  4.3137700
8125      ART5       11_3 0.011541333  8.575870 9.601621e-08  0.5078098
9700    PHLDA2       11_3 0.019871210 14.016957 2.702019e-07 -1.5568182
9749      MOB2       11_3 0.008668060  6.798267 5.716505e-08 -0.8924187
9915     ASCL2       11_3 0.008825312  6.904973 5.911565e-08  0.8376502
12034  IFITM10       11_3 0.007203209  5.075247 3.546448e-08 -0.5141243
13194    PRR33       11_3 0.040955066 22.325154 8.869773e-07  2.5537634
4257   CHRNA10       11_3 0.011554834  9.661976 1.083029e-07  1.3576642
4472    TRIM21       11_3 0.012225836 10.363399 1.229111e-07 -1.6901408
8127     STIM1       11_3 0.607774446 24.072335 1.419290e-05  4.4328358
8128      RRM1       11_3 0.007008898  5.669799 3.855030e-08 -1.1740296
8129    OR51E2       11_3 0.008596400  6.686241 5.575824e-08  0.8419368
8130    TRIM68       11_3 0.036085737 19.084751 6.680862e-07  2.0740741
9301      RHOG       11_3 0.021091074 17.688036 3.619001e-07  2.9857143
9633    OR51E1       11_3 0.008342338  6.216940 5.031238e-08 -0.6761545
      num_eqtl
77           1
281          1
492          1
603          1
1003         1
2627         1
2628         3
2629         1
2631         3
3341         1
4258         1
4328         2
8125         4
9700         1
9749         2
9915         2
12034        1
13194        1
4257         1
4472         1
8127         1
8128         2
8129         2
8130         1
9301         1
9633         5

[1] "SCARB1"
[1] "12_76"
     genename region_tag  susie_pip       mu2          PVE          z num_eqtl
844    SCARB1      12_76 0.18474753 16.120470 2.889128e-06  2.2759188        2
1066     AACS      12_76 0.06555756  6.279105 3.993291e-07  0.7222222        1
5370 TMEM132B      12_76 0.06094059  5.601627 3.311550e-07 -0.4868290        2

[1] "CETP"
[1] "16_30"
          genename region_tag  susie_pip       mu2          PVE            z
60         CIAPIN1      16_30 0.06372381  9.231049 5.706413e-07 -1.198426871
93          CX3CL1      16_30 0.04557558  6.133672 2.711835e-07 -0.705882353
470        HERPUD1      16_30 0.03957545  4.835657 1.856487e-07 -0.298507463
1201          CETP      16_30 0.07420553 10.647176 7.664452e-07 -1.375513239
1203           MT3      16_30 0.06992413 10.093756 6.846842e-07 -1.215047343
1205         GNAO1      16_30 0.04497389  6.011327 2.622656e-07  0.832698393
1206        OGFOD1      16_30 0.04149728  5.271319 2.122020e-07  0.506493506
1858         NUP93      16_30 0.04322186  5.645706 2.367185e-07 -0.565957447
1863          PLLP      16_30 0.05115035  7.197374 3.571356e-07 -0.842857143
1867        POLR2C      16_30 0.06447329  9.339562 5.841398e-07 -1.175182482
3889          BBS2      16_30 0.04070678  5.094572 2.011800e-07 -0.451777670
3890          MT1G      16_30 0.04391281  5.791604 2.467178e-07 -0.578947368
3891          MT2A      16_30 0.04785108  6.582470 3.055562e-07 -0.781609195
3894          DOK4      16_30 0.03865430  4.619412 1.732188e-07 -0.131313131
4877      CCDC102A      16_30 0.03884325  4.664180 1.757524e-07 -0.236261447
5518         CPNE2      16_30 0.04247781  5.486014 2.260630e-07 -0.512995403
5519         NLRC5      16_30 0.06281622  9.097971 5.544045e-07  1.130434783
7022          AMFR      16_30 0.03892499  4.683480 1.768511e-07  0.206060483
7025        RSPRY1      16_30 0.03860229  4.607051 1.725228e-07 -0.147619048
8084        NUDT21      16_30 0.03823239  4.518668 1.675916e-07  0.008012715
8861       FAM192A      16_30 0.05266633  7.467009 3.814961e-07 -0.973544974
10296         MT1X      16_30 0.04920084  6.838902 3.264144e-07  0.843243243
10915         MT1F      16_30 0.04682653  6.383045 2.899548e-07 -0.705263158
11252       ADGRG1      16_30 0.04379855  5.767633 2.450574e-07  0.602339181
11256         MT1A      16_30 0.03828804  4.532018 1.683314e-07  0.026315789
11258         MT1M      16_30 0.03870894  4.632379 1.739505e-07 -0.194690265
12072 RP11-461O7.1      16_30 0.03845842  4.572776 1.706011e-07 -0.069034092
      num_eqtl
60           2
93           1
470          1
1201         2
1203         2
1205         2
1206         1
1858         1
1863         1
1867         1
3889         2
3890         1
3891         1
3894         1
4877         2
5518         2
5519         1
7022         2
7025         1
8084         2
8861         1
10296        1
10915        1
11252        1
11256        1
11258        1
12072        2

[1] "APOH"
[1] "17_38"
     genename region_tag  susie_pip       mu2          PVE          z num_eqtl
1354     APOH      17_38 0.11801095 14.851973 1.700266e-06 -2.0358974        1
6629    PRKCA      17_38 0.24348667 22.110347 5.222533e-06 -2.8239485        2
6631   CEP112      17_38 0.04911209  6.517311 3.105041e-07  0.9939394        1
8345    AXIN2      17_38 0.08057069 11.215542 8.766127e-07  1.3925234        1

[1] "PLTP"
[1] "20_28"
           genename region_tag  susie_pip       mu2          PVE           z
313          TOMM34      20_28 0.02524516  5.492950 1.345223e-07  0.48837209
604           WISP2      20_28 0.02530617  5.558368 1.364533e-07  0.60139860
614            CTSA      20_28 0.03231449  7.721463 2.420513e-07  1.19117647
1704           PLTP      20_28 0.04939108 11.604702 5.560232e-07  1.55421687
1705          PCIF1      20_28 0.08493887 16.643262 1.371372e-06 -2.00769231
1707           MMP9      20_28 0.02582196  5.723032 1.433593e-07  0.63461538
1714           CD40      20_28 0.02293930  4.640313 1.032614e-07  0.45453638
1790          WFDC2      20_28 0.02526981  5.533380 1.356447e-07 -0.54087814
1795        DNTTIP1      20_28 0.03077945  7.292193 2.177356e-07  1.12815943
1799          TNNC2      20_28 0.02377720  4.970289 1.146444e-07 -0.38260870
1800          ACOT8      20_28 0.06515733 14.232829 8.996321e-07  1.58080246
3789            PI3      20_28 0.03122838  7.451401 2.257345e-07  1.11627907
3790          SNX21      20_28 0.02307338  4.702641 1.052600e-07 -0.10729654
3791           SLPI      20_28 0.02287167  4.616208 1.024221e-07  0.28846154
3792          WFDC3      20_28 0.02314523  4.738309 1.063887e-07 -0.08148941
3816         KCNK15      20_28 0.05367652 12.388371 6.450732e-07 -1.69068935
3817        TP53TG5      20_28 0.03020217  7.177909 2.103035e-07 -0.78564127
3820         NEURL2      20_28 0.03421084  8.308952 2.757531e-07  1.01552795
4557          OSER1      20_28 0.02290891  4.702150 1.044988e-07 -0.47546906
4558        SERINC3      20_28 0.02492153  5.393470 1.303927e-07 -0.41420118
6310           JPH2      20_28 0.02932188  6.806741 1.936161e-07 -0.57352941
6314        SPATA25      20_28 0.03158694  7.545802 2.312189e-07  0.92485549
8067          YWHAB      20_28 0.03196934  7.670595 2.378883e-07 -1.03090900
8342         ZSWIM1      20_28 0.05466044 12.558543 6.659211e-07 -1.72463768
8354           PKIG      20_28 0.02406997  5.105897 1.192225e-07  0.48837209
9096          UBE2C      20_28 0.07207160 15.108582 1.056327e-06 -1.94078947
10651           ADA      20_28 0.02458064  5.280983 1.259269e-07  0.58282209
10724         FITM2      20_28 0.34299801 30.562546 1.016931e-05  3.47633136
11569     OSER1-AS1      20_28 0.02649116  5.891855 1.514131e-07 -0.47898985
13188 RP11-445H22.3      20_28 0.08674289 16.923237 1.424058e-06 -2.02222222
      num_eqtl
313          1
604          1
614          1
1704         1
1705         1
1707         1
1714         2
1790         2
1795         2
1799         1
1800         2
3789         1
3790         2
3791         1
3792         2
3816         2
3817         2
3820         1
4557         2
4558         1
6310         1
6314         1
8067         2
8342         1
8354         1
9096         1
10651        1
10724        1
11569        3
13188        1

[1] "LIPG"
[1] "18_27"
     genename region_tag  susie_pip       mu2          PVE          z num_eqtl
1817     LIPG      18_27 0.06473438 10.897859 6.843631e-07  1.9012346        1
5621      DYM      18_27 0.03826757  4.803442 1.783175e-07 -0.4668737        2

[1] "KPNB1"
[1] "17_28"
          genename region_tag    susie_pip        mu2          PVE           z
49          SLC4A1      17_28 0.0003180097   5.476102 1.689360e-09  0.48192771
231       SLC25A39      17_28 0.0002866459   4.529182 1.259436e-09 -0.05022464
340            GRN      17_28 0.0048166873  29.835259 1.394083e-07 -2.50000000
855         ADAM11      17_28 0.0003271419   5.727858 1.817770e-09 -0.54310345
1197       ATXN7L3      17_28 0.0020300106  21.984944 4.329464e-08 -2.08273381
1364       TMEM101      17_28 0.0004017452   7.523499 2.932115e-09 -0.86619718
2439          UBTF      17_28 0.0003263940   5.702325 1.805530e-09  0.53846154
2498         HDAC5      17_28 0.0002984882   4.891880 1.416490e-09 -0.30357143
2500          MPP2      17_28 0.0003317175   5.847920 1.881829e-09 -0.57075020
2502         DUSP3      17_28 0.0003767421   6.979751 2.550906e-09  0.77952756
3901      C17orf53      17_28 0.0044678567  29.074611 1.260154e-07 -2.46666667
4390         C1QL1      17_28 0.0002899284   6.379844 1.794367e-09  0.01151939
4391        HIGD1B      17_28 0.0002963348   4.829685 1.388392e-09  0.27586207
7214         LSM12      17_28 0.0004803592   9.177472 4.276610e-09 -1.07024793
7219      FAM171A2      17_28 0.0003229329   5.588266 1.750652e-09  0.51627907
7220         DBF4B      17_28 0.0002909955   4.671514 1.318725e-09  0.18918919
10186       KIF18B      17_28 0.0003010402   4.965591 1.450127e-09 -0.33322170
12610  CTC-296K1.4      17_28 0.0002920351   4.708543 1.333927e-09 -0.20888889
12615  CTC-296K1.3      17_28 0.0004542217   8.664653 3.817943e-09  1.01078096
48           CDC27      17_28 0.0005638306   9.313638 5.094228e-09  0.25974026
860          TBX21      17_28 0.0003305765   5.938589 1.904433e-09  0.62179487
862            NSF      17_28 0.0010635007  59.478721 6.136346e-08  0.98979592
2445          WNT3      17_28 0.0012204211 558.187743 6.608462e-07 -5.27058824
2451         KPNB1      17_28 0.0003313670   5.821022 1.871194e-09  0.43448276
2452         GOSR2      17_28 0.0003369155  14.101908 4.609028e-09 -2.44927536
2453          PNPO      17_28 0.0098829449  31.354986 3.006100e-07  2.59508717
3514        KANSL1      17_28 0.0003640200  21.509890 7.595805e-09  0.82274260
5563        NPEPPS      17_28 0.0004495803  10.909211 4.757854e-09  1.21000000
6976         WNT9B      17_28 0.0003090636  10.278593 3.081712e-09  0.54794521
7006      ARHGAP27      17_28 0.0007799120  82.455833 6.238460e-08 -0.03797468
8888         DCAKD      17_28 0.0002902251  28.608122 8.054428e-09 -0.26470588
9256       LRRC37A      17_28 0.0007051676  60.390985 4.131187e-08  0.98989899
9467       EFCAB13      17_28 0.0003327766   6.299482 2.033612e-09 -0.73719881
9549         RPRML      17_28 0.0003111989   6.081602 1.835974e-09  1.07613062
9691         ACBD4      17_28 0.0003375575   6.295973 2.061679e-09  0.58441558
10151       ARL17A      17_28 0.0006810977 537.906928 3.554078e-07 -4.15979988
10259       HEXIM1      17_28 0.0002995613  11.894480 3.456540e-09 -0.50724638
10265         MAPT      17_28 0.0246154818 498.175032 1.189599e-05  5.60645147
10901         MYL4      17_28 0.0002908602   6.579207 1.856386e-09 -0.21052632
11044       TBKBP1      17_28 0.0061761042  31.748763 1.902181e-07  2.36764706
11694       ARL17B      17_28 0.0028320351 185.449635 5.094893e-07  3.09554404
11902     LRRC37A2      17_28 0.0003019705  78.586006 2.302079e-08 -2.12048193
12370        ITGB3      17_28 0.0002968332   5.180641 1.491786e-09 -0.52597403
63           COPZ2      17_28 0.0005572602  10.503805 5.678257e-09 -1.21428571
86          OSBPL7      17_28 0.0105209292  24.039694 2.453542e-07  2.83041792
2455      CDK5RAP3      17_28 0.0044766936  13.795755 5.991192e-08  2.47418563
2456          CBX1      17_28 0.0003268446   4.764112 1.510545e-09  0.54589372
3515         HOXB5      17_28 0.0003394002   9.734487 3.205056e-09  0.59090909
3516         HOXB3      17_28 0.0006522950  10.398370 6.579907e-09 -1.35294118
5564         SKAP1      17_28 0.0004119036   5.218624 2.085268e-09 -0.90395750
5565        LRRC46      17_28 0.0011115832   9.434393 1.017341e-08 -1.74022390
5566         SCRN2      17_28 0.0004147273   6.569172 2.642918e-09  0.90923973
6986        MRPL10      17_28 0.0002867457   4.550373 1.265769e-09  0.05654812
6995        ATP5G1      17_28 0.0003066704   4.871136 1.449147e-09 -0.39173481
8090         GNGT2      17_28 0.0006284941  11.553020 7.043802e-09 -1.31942009
8104           SP2      17_28 0.0002936187   4.827525 1.375051e-09  0.23512748
8612         TTLL6      17_28 0.0003353892   5.400366 1.757044e-09  0.59420290
8981      PHOSPHO1      17_28 0.0002886628   4.594197 1.286503e-09  0.13432836
9804         HOXB4      17_28 0.0002880062   4.759400 1.329733e-09  0.10928962
10488          SP6      17_28 0.0005472424   6.256420 3.321361e-09  1.20472441
10980       ZNF652      17_28 0.0039011097  26.980080 1.021038e-07  2.40579710
12404        HOXB7      17_28 0.0002922864   6.285681 1.782261e-09  0.18888889
13137 RP5-890E16.5      17_28 0.0381096154  20.815031 7.695238e-07 -3.29629630
      num_eqtl
49           1
231          2
340          1
855          1
1197         1
1364         1
2439         1
2498         1
2500         2
2502         1
3901         1
4390         2
4391         1
7214         1
7219         1
7220         1
10186        2
12610        1
12615        2
48           1
860          1
862          1
2445         1
2451         1
2452         1
2453         2
3514         2
5563         1
6976         1
7006         1
8888         1
9256         1
9467         2
9549         3
9691         1
10151        2
10259        1
10265        2
10901        1
11044        1
11694        2
11902        1
12370        1
63           1
86           2
2455         2
2456         1
3515         1
3516         1
5564         2
5565         2
5566         5
6986         2
6995         2
8090         2
8104         1
8612         1
8981         1
9804         1
10488        1
10980        1
12404        1
13137        1

[1] "ALDH2"
[1] "12_67"
          genename region_tag  susie_pip       mu2          PVE           z
1280          BRAP      12_67 0.04675331  7.994322 3.625805e-07  1.34066358
1281         ERP29      12_67 0.03319527  5.119632 1.648638e-07 -0.64220183
2682         VPS29      12_67 0.04526175  7.644784 3.356657e-07  0.72667784
2689        ACAD10      12_67 0.14319178 17.884097 2.484251e-06  2.26027397
2690         ALDH2      12_67 0.03303767  5.097709 1.633785e-07 -0.72941176
2693         NAA25      12_67 0.03724561  6.593797 2.382435e-07 -0.54973822
3717         IFT81      12_67 0.06872120 12.430363 8.286765e-07  2.17500000
3719         HVCN1      12_67 0.03732208  6.442366 2.332500e-07 -0.67595819
5377          GIT2      12_67 0.03772658  9.022654 3.302115e-07 -2.03825370
5378          TCHP      12_67 0.46592142 19.210171 8.682691e-06 -4.10638298
6384         RAD9B      12_67 0.12795659 18.405551 2.284662e-06  2.62500000
8895        HECTD4      12_67 0.11125085 15.582348 1.681693e-06 -2.01275695
8900        CCDC63      12_67 0.05218572  9.901552 5.012626e-07 -1.47435897
9039      C12orf76      12_67 0.20590043 22.264369 4.447112e-06  2.61230769
9519        PTPN11      12_67 0.10518194 15.094079 1.540133e-06  2.06756757
10198       PPP1CC      12_67 0.03246320  4.964772 1.563511e-07 -0.31192661
10600       ANAPC7      12_67 0.03071825  4.555999 1.357658e-07 -0.01851852
10894      TMEM116      12_67 0.03538487  5.632015 1.933267e-07  0.79439252
11206        ATXN2      12_67 0.03390119  5.437734 1.788312e-07 -0.65322581
11819 MAPKAPK5-AS1      12_67 0.03398186  5.331891 1.757676e-07  0.81176471
12342   RP1-46F2.3      12_67 0.14583902 19.801867 2.801498e-06 -2.32835821
      num_eqtl
1280         2
1281         1
2682         2
2689         1
2690         1
2693         1
3717         1
3719         1
5377         2
5378         1
6384         1
8895         2
8900         1
9039         1
9519         1
10198        1
10600        1
10894        1
11206        1
11819        1
12342        1

[1] "APOA1"
[1] "11_71"
      genename region_tag  susie_pip       mu2          PVE            z
2574      ZPR1      11_71 0.01790703  5.833847 1.013419e-07 -0.541501976
3348     APOA1      11_71 0.02628942  8.435404 2.151282e-07  0.119988826
5151     FXYD6      11_71 0.17556648 26.704647 4.548193e-06 -2.674833297
5152     FXYD2      11_71 0.02160276  7.609753 1.594741e-07  0.920315172
6308     SIDT2      11_71 0.09887605 15.572805 1.493717e-06 -3.600000000
6309     TAGLN      11_71 0.16221658 25.364693 3.991492e-06  2.587628866
8116    RNF214      11_71 0.01548425  4.529874 6.804353e-08 -0.008528785
8270  PAFAH1B2      11_71 0.64305971 21.059969 1.313770e-05  4.166666667
9300   DSCAML1      11_71 0.02745225  9.842213 2.621085e-07  1.218458904
10201    BACE1      11_71 0.04016866 12.905694 5.028971e-07 -1.406417112
268     PHLDB1      11_71 0.01559001  4.586187 6.935991e-08 -0.187022901
2613      DDX6      11_71 0.02202552  7.670877 1.639010e-07 -1.034883721
2614       CBL      11_71 0.01764533  5.737428 9.821040e-08 -0.467265741
3345      TREH      11_71 0.01789392  5.827467 1.011569e-07 -0.625000000
3346     IFT46      11_71 0.01712413  5.419494 9.002802e-08 -0.578805975
3350     RPS25      11_71 0.01571854  4.656502 7.100392e-08 -0.278667949
5145   SLC37A4      11_71 0.01688638  5.222010 8.554305e-08 -0.951456311
6288     HYOU1      11_71 0.15448100 24.965368 3.741308e-06 -3.044117647
6306     MPZL2      11_71 0.01619437  4.936535 7.755267e-08  0.313068811
6307     SCN2B      11_71 0.01925767  6.496184 1.213591e-07 -0.743421053
7128     MPZL3      11_71 0.01566375  4.634099 7.041603e-08  0.149253731
7137     VPS11      11_71 0.10560572 21.812486 2.234617e-06 -2.451773632
7138     NLRX1      11_71 0.02299510  8.109108 1.808917e-07 -0.977272727
8806     HINFP      11_71 0.04001481 12.911204 5.011848e-07 -1.865671642
8819     ABCG4      11_71 0.08152008 19.369046 1.531734e-06 -2.367578183
8823    C2CD2L      11_71 0.03477307 11.660357 3.933374e-07 -1.731343284
8942     RNF26      11_71 0.06652105 17.494079 1.128913e-06 -2.247474736
9299     SCN4B      11_71 0.01617218  4.927748 7.730852e-08  0.283582090
10410    H2AFX      11_71 0.15552293 25.032273 3.776636e-06  3.044117647
10624  TRAPPC4      11_71 0.01692983  5.340398 8.770750e-08 -0.443037975
11015     CD3E      11_71 0.01817585  5.991658 1.056458e-07  0.578735950
12106  CCDC153      11_71 0.07153757 18.076623 1.254475e-06 -2.389854562
12302     HMBS      11_71 0.02141686  7.510263 1.560347e-07 -0.784482759
      num_eqtl
2574         1
3348         3
5151         2
5152         2
6308         1
6309         1
8116         1
8270         1
9300         3
10201        1
268          1
2613         1
2614         2
3345         1
3346         3
3350         2
5145         1
6288         1
6306         2
6307         1
7128         1
7137         2
7138         1
8806         1
8819         2
8823         1
8942         2
9299         1
10410        1
10624        1
11015        2
12106        3
12302        1

[1] "VAPB"
[1] "20_34"
          genename region_tag  susie_pip       mu2          PVE          z
1219       PHACTR3      20_34 0.03489479  4.798068 1.624192e-07 -0.2956861
1731        NELFCD      20_34 0.03400182  4.560485 1.504263e-07 -0.3443348
1732          CTSZ      20_34 0.03419707  4.612974 1.530313e-07 -0.2033651
1735      PRELID3B      20_34 0.32826632 26.301616 8.375663e-06  3.0820477
3796          VAPB      20_34 0.03727272  5.402612 1.953463e-07  0.4647532
3798         ATP5E      20_34 0.07184926 11.463582 7.990116e-07  1.7205882
3805        RAB22A      20_34 0.04134314  6.354345 2.548500e-07 -0.6880223
3811         STX16      20_34 0.04878657  7.878174 3.728519e-07  0.9925926
11491       NPEPL1      20_34 0.12933773 17.001918 2.133210e-06 -2.0485437
12650 RP4-806M20.4      20_34 0.10359351 14.893414 1.496708e-06 -1.6701031
      num_eqtl
1219         2
1731         2
1732         3
1735         2
3796         2
3798         1
3805         1
3811         1
11491        1
12650        1

[1] "STARD3"
[1] "17_23"
           genename region_tag  susie_pip       mu2          PVE          z
22            LASP1      17_23 0.24428424 26.490940 6.277739e-06  2.5789474
156           MED24      17_23 0.05069764 15.124025 7.438161e-07 -2.7926629
853         SMARCE1      17_23 0.02519311  6.527192 1.595213e-07 -0.9227113
854           GSDMB      17_23 0.11843604 23.715838 2.724788e-06 -3.3053892
2440          PSMD3      17_23 0.02394550 18.058244 4.194786e-07 -4.5411022
2441          CASC3      17_23 0.14832067 24.210159 3.483451e-06 -3.1635688
2442       RAPGEFL1      17_23 0.13945876 23.328540 3.156049e-06  3.0590165
3941           MED1      17_23 0.12088620 28.011690 3.284933e-06 -4.6344778
4019           CCR7      17_23 0.06592876 15.577769 9.963011e-07  1.8811881
4020          NR1D1      17_23 0.02657843  6.725640 1.734097e-07  0.8127854
4444         STARD3      17_23 0.04900633 13.502687 6.419228e-07 -2.1062271
5630          ERBB2      17_23 0.10355184 31.617510 3.176113e-06 -5.5991906
5631           GRB7      17_23 0.02512553  7.082351 1.726248e-07 -1.4460432
5632           PNMT      17_23 0.04666788 23.785935 1.076834e-06 -5.0704225
7197         PLXDC1      17_23 0.03887163  9.912100 3.737738e-07 -1.0583333
7198          PGAP3      17_23 0.07840518 28.952979 2.202158e-06 -5.4680413
7199          IKZF3      17_23 0.02963216 16.164208 4.646524e-07  3.8235294
8234          GSDMA      17_23 0.02130786 12.074736 2.495904e-07  3.3941748
8780         ORMDL3      17_23 0.02134267  7.757592 1.606150e-07 -2.2000000
8995           TCAP      17_23 0.02080428  4.616384 9.316761e-08  0.2589928
11363        KRT222      17_23 0.02066725  4.574887 9.172200e-08 -0.3055556
12551 RP11-387H17.4      17_23 0.02117943 10.334739 2.123363e-07  3.0429362
12942         CWC25      17_23 0.02440978  5.869391 1.389848e-07 -0.4966938
13081         PCGF2      17_23 0.02476225  6.128785 1.472227e-07  0.6296296
13104         PSMB3      17_23 0.02917801  8.098124 2.292189e-07  1.0739073
13107   CTB-58E17.1      17_23 0.02645395  6.681254 1.714584e-07 -0.8539326
13108         CISD3      17_23 0.04229289 10.655726 4.371806e-07 -1.1408451
      num_eqtl
22           1
156          2
853          2
854          1
2440         2
2441         1
2442         4
3941         2
4019         1
4020         1
4444         1
5630         3
5631         1
5632         1
7197         1
7198         2
7199         1
8234         2
8780         1
8995         1
11363        1
12551        2
12942        2
13081        1
13104        3
13107        1
13108        1

[1] "PPARG"
[1] "3_9"
      genename region_tag susie_pip        mu2 PVE          z num_eqtl
924      MKRN2        3_9         0  29.475894   0 -3.9882864        2
1241    TMEM40        3_9         0 131.182002   0 -3.7679558        1
4476     PPARG        3_9         0  44.226334   0 -3.3398058        1
5912    TAMM41        3_9         0   9.115353   0  0.5181923        2
5933     CAND2        3_9         0  93.771766   0 -3.2111601        2
6666     TSEN2        3_9         0 165.262753   0  0.3926355        3
6833    SLC6A1        3_9         0   8.763910   0 -1.0000000        1
10620     HRH1        3_9         0   7.431693   0 -0.6944444        1
10763     ATG7        3_9         0  14.255822   0 -1.5204082        1
11600  MKRN2OS        3_9         0 326.284741   0 -2.9276210        2

[1] "LPIN3"
[1] "20_25"
      genename region_tag  susie_pip      mu2          PVE          z num_eqtl
3799     PLCG1      20_25 0.04023364 5.053876 1.972533e-07  0.4185142        2
4553     LPIN3      20_25 0.04145891 5.329523 2.143467e-07  0.4270119        2
9925   EMILIN3      20_25 0.04214410 5.480196 2.240491e-07 -0.3592593        1
11032     TOP1      20_25 0.05057784 7.160215 3.513151e-07  0.8455882        1

[1] "FADS2"
[1] "11_34"
           genename region_tag  susie_pip       mu2          PVE           z
2584           DTX4      11_34 0.02781763  6.861199 1.851529e-07  0.85897436
2593         MS4A6A      11_34 0.03760719  9.622151 3.510375e-07  1.25373134
2594         MS4A4A      11_34 0.02309081  5.160920 1.156051e-07 -0.32835821
2597         CCDC86      11_34 0.03597023  9.213902 3.215121e-07  1.04649029
2621            CD5      11_34 0.03568699  9.141412 3.164708e-07  1.11764706
3883        SCGB1D2      11_34 0.03004532  7.565569 2.205103e-07 -0.89156627
4751          FADS2      11_34 0.10100488 18.791985 1.841304e-06  2.36643571
4752        TMEM258      11_34 0.03697381  9.466299 3.395352e-07  1.39809594
6292        TMEM138      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
6293          FADS1      11_34 0.04673113 11.618934 5.267239e-07 -1.81944444
6296         INCENP      11_34 0.06319853 14.409054 8.833908e-07  1.72072479
6299          MS4A2      11_34 0.02622115  6.321244 1.607921e-07 -0.79104478
7256       CYB561A3      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
7257        PPP1R32      11_34 0.04776414 11.820495 5.477067e-07  1.49792139
7258         ASRGL1      11_34 0.03557232  9.111898 3.144354e-07  1.12328767
8045        FAM111A      11_34 0.02248651  4.919074 1.073040e-07  0.37903226
8061          PATL1      11_34 0.02241093  4.888373 1.062759e-07 -0.29903537
8063           STX3      11_34 0.02639309  6.380928 1.633746e-07  0.82994817
8072         MS4A14      11_34 0.02767618  6.814626 1.829611e-07  0.91549296
8249           VWCE      11_34 0.02151883  4.518039 9.431461e-08  0.02651515
8250          BEST1      11_34 0.03609758  9.246334 3.237860e-07  1.26126126
10279       TMEM216      11_34 0.03789266  9.691540 3.562529e-07 -1.24090909
10481       FAM111B      11_34 0.02911441  7.277705 2.055478e-07 -0.85853659
10784         MPEG1      11_34 0.03036725  7.663054 2.257448e-07 -0.96969697
11219       LRRC10B      11_34 0.05600778 13.290279 7.220926e-07 -1.60000000
11466        MS4A4E      11_34 0.02832931  7.027800 1.931372e-07  0.97058824
11539         FADS3      11_34 0.23438823 26.956236 6.129224e-06 -2.97402597
12060    AP001258.4      11_34 0.03358240  8.584346 2.796594e-07  1.10000000
12307 RP11-794G24.1      11_34 0.02633199  6.359770 1.624559e-07 -0.70680628
12313 RP11-286N22.8      11_34 0.05730574 13.502198 7.506077e-07 -1.61458333
      num_eqtl
2584         1
2593         1
2594         1
2597         2
2621         1
3883         1
4751         2
4752         2
6292         1
6293         1
6296         2
6299         1
7256         1
7257         2
7258         1
8045         1
8061         1
8063         3
8072         1
8249         1
8250         1
10279        1
10481        1
10784        1
11219        1
11466        1
11539        1
12060        1
12307        1
12313        1

[1] "CD36"
[1] "7_51"
     genename region_tag  susie_pip       mu2          PVE           z num_eqtl
897    SEMA3C       7_51 0.42195791 28.413871 1.163081e-05  3.35820896        1
4116    GNAI1       7_51 0.03634843  4.524570 1.595414e-07 -0.05766061        2
4801     CD36       7_51 0.04178462  5.804239 2.352730e-07  0.81308411        1

[1] "CYP27A1"
[1] "2_129"
         genename region_tag  susie_pip       mu2          PVE           z
261       SLC11A1      2_129 0.03319520  5.213021 1.678708e-07 -0.37762238
501         PTPRN      2_129 0.12121952 17.255893 2.029179e-06  2.58095238
815          SPEG      2_129 0.21477968 22.816469 4.753922e-06 -2.75857938
875         BCS1L      2_129 0.12268827 17.370641 2.067423e-06  2.57526882
3107        PLCD4      2_129 0.10007396 15.439848 1.498906e-06  2.43684211
3109       ZNF142      2_129 0.08722359 14.147743 1.197103e-06  2.33684211
3117       CNPPD1      2_129 0.05206533  9.350728 4.722854e-07  1.18372834
3119        ABCB6      2_129 0.03115380  4.631938 1.399859e-07  0.29464286
3780         CHPF      2_129 0.10233279 15.650444 1.553645e-06 -2.17910448
3781        DNPEP      2_129 0.03080248  4.528156 1.353061e-07 -0.05003297
3784        OBSL1      2_129 0.05265628  9.454937 4.829690e-07 -1.20588235
4101       TUBA4A      2_129 0.03077170  4.519008 1.348978e-07  0.39051095
4102         AAMP      2_129 0.07945239 13.274396 1.023133e-06  1.60294118
4103         PNKD      2_129 0.04656196  8.320530 3.758311e-07  1.00000000
4900        USP37      2_129 0.06293239 11.104810 6.779470e-07 -1.82472880
4905       TMBIM1      2_129 0.06330883 11.160103 6.853981e-07  1.41176471
4906      CYP27A1      2_129 0.03424827  5.499145 1.827024e-07  1.02997904
5916        CNOT9      2_129 0.03204614  4.890425 1.520312e-07 -0.19402985
6943      ZFAND2B      2_129 0.04218105  7.411254 3.032631e-07 -1.51428571
7463        ARPC2      2_129 0.03121591  4.650161 1.408168e-07  0.11676531
7467        RNF25      2_129 0.11709264 16.926435 1.922673e-06 -2.53409091
7468        STK36      2_129 0.04853678  8.703305 4.097940e-07  1.20289855
7477        GLB1L      2_129 0.19082480 21.644079 4.006677e-06 -2.79545455
9568       GPBAR1      2_129 0.04388210  7.774869 3.309717e-07 -1.08313614
9639        CXCR2      2_129 0.03308898  5.183663 1.663913e-07  0.47761194
10338       NHEJ1      2_129 0.03379454  5.376946 1.762757e-07  0.81975953
10447     TMEM198      2_129 0.10233279 15.650444 1.553645e-06  2.17910448
11041       ATG9A      2_129 0.03077614  4.520329 1.349568e-07 -0.09832389
11403     SLC23A3      2_129 0.18349763 21.259021 3.784288e-06  2.86602928
11749       DIRC3      2_129 0.05506282  9.867847 5.270980e-07 -1.21195652
12846 RP11-33O4.1      2_129 0.04131385  7.220305 2.893755e-07  1.41071429
      num_eqtl
261          1
501          1
815          3
875          1
3107         1
3109         1
3117         2
3119         1
3780         1
3781         2
3784         1
4101         1
4102         1
4103         1
4900         2
4905         1
4906         2
5916         1
6943         1
7463         2
7467         1
7468         1
7477         1
9568         2
9639         1
10338        2
10447        1
11041        2
11403        2
11749        1
12846        1

[1] "NPC1"
[1] "18_12"
           genename region_tag  susie_pip       mu2          PVE           z
490           LAMA3      18_12 0.03637321  4.547590 1.604624e-07  0.07352941
1823          RIOK3      18_12 0.04235391  5.945423 2.442793e-07 -0.57592109
4718        TMEM241      18_12 0.05164883  7.773134 3.894638e-07  0.88775510
4719        CABLES1      18_12 0.04290307  6.063854 2.523757e-07  0.50802139
5588        OSBPL1A      18_12 0.04483219  6.468596 2.813263e-07 -0.73134328
5590        C18orf8      18_12 0.27002235 23.626498 6.188843e-06  3.45722810
5592           NPC1      18_12 0.11844183 15.530864 1.784478e-06  2.78962603
6613          CABYR      18_12 0.06454667  9.836429 6.159164e-07  1.24637681
6614        ANKRD29      18_12 0.03634908  4.541529 1.601423e-07  0.27106054
8284         TTC39C      18_12 0.05818938  8.875187 5.009930e-07 -0.90476190
12545     LINC01894      18_12 0.05480973  8.321821 4.424727e-07 -1.07352941
12556     LINC01915      18_12 0.04270918  6.022276 2.495125e-07 -0.68750000
12559 RP11-799B12.4      18_12 0.04113012  5.675951 2.264691e-07  0.64285714
12923  RP11-621L6.3      18_12 0.04276926  6.035208 2.504000e-07 -0.65151127
      num_eqtl
490          1
1823         2
4718         1
4719         1
5588         1
5590         2
5592         2
6613         1
6614         2
8284         1
12545        1
12556        1
12559        1
12923        2

[1] "NCEH1"
[1] "3_106"
     genename region_tag  susie_pip      mu2          PVE          z num_eqtl
5959    NCEH1      3_106 0.04126151 4.747794 1.900410e-07 -0.2541279        2
8490    NLGN1      3_106 0.06127625 8.396673 4.991256e-07  1.0027548        1

[1] "FADS1"
[1] "11_34"
           genename region_tag  susie_pip       mu2          PVE           z
2584           DTX4      11_34 0.02781763  6.861199 1.851529e-07  0.85897436
2593         MS4A6A      11_34 0.03760719  9.622151 3.510375e-07  1.25373134
2594         MS4A4A      11_34 0.02309081  5.160920 1.156051e-07 -0.32835821
2597         CCDC86      11_34 0.03597023  9.213902 3.215121e-07  1.04649029
2621            CD5      11_34 0.03568699  9.141412 3.164708e-07  1.11764706
3883        SCGB1D2      11_34 0.03004532  7.565569 2.205103e-07 -0.89156627
4751          FADS2      11_34 0.10100488 18.791985 1.841304e-06  2.36643571
4752        TMEM258      11_34 0.03697381  9.466299 3.395352e-07  1.39809594
6292        TMEM138      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
6293          FADS1      11_34 0.04673113 11.618934 5.267239e-07 -1.81944444
6296         INCENP      11_34 0.06319853 14.409054 8.833908e-07  1.72072479
6299          MS4A2      11_34 0.02622115  6.321244 1.607921e-07 -0.79104478
7256       CYB561A3      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
7257        PPP1R32      11_34 0.04776414 11.820495 5.477067e-07  1.49792139
7258         ASRGL1      11_34 0.03557232  9.111898 3.144354e-07  1.12328767
8045        FAM111A      11_34 0.02248651  4.919074 1.073040e-07  0.37903226
8061          PATL1      11_34 0.02241093  4.888373 1.062759e-07 -0.29903537
8063           STX3      11_34 0.02639309  6.380928 1.633746e-07  0.82994817
8072         MS4A14      11_34 0.02767618  6.814626 1.829611e-07  0.91549296
8249           VWCE      11_34 0.02151883  4.518039 9.431461e-08  0.02651515
8250          BEST1      11_34 0.03609758  9.246334 3.237860e-07  1.26126126
10279       TMEM216      11_34 0.03789266  9.691540 3.562529e-07 -1.24090909
10481       FAM111B      11_34 0.02911441  7.277705 2.055478e-07 -0.85853659
10784         MPEG1      11_34 0.03036725  7.663054 2.257448e-07 -0.96969697
11219       LRRC10B      11_34 0.05600778 13.290279 7.220926e-07 -1.60000000
11466        MS4A4E      11_34 0.02832931  7.027800 1.931372e-07  0.97058824
11539         FADS3      11_34 0.23438823 26.956236 6.129224e-06 -2.97402597
12060    AP001258.4      11_34 0.03358240  8.584346 2.796594e-07  1.10000000
12307 RP11-794G24.1      11_34 0.02633199  6.359770 1.624559e-07 -0.70680628
12313 RP11-286N22.8      11_34 0.05730574 13.502198 7.506077e-07 -1.61458333
      num_eqtl
2584         1
2593         1
2594         1
2597         2
2621         1
3883         1
4751         2
4752         2
6292         1
6293         1
6296         2
6299         1
7256         1
7257         2
7258         1
8045         1
8061         1
8063         3
8072         1
8249         1
8250         1
10279        1
10481        1
10784        1
11219        1
11466        1
11539        1
12060        1
12307        1
12313        1

[1] "VDAC2"
[1] "10_49"
            genename region_tag   susie_pip        mu2          PVE           z
365              VCL      10_49 0.093489730  20.671759 1.874786e-06   1.5128205
1016          DUSP13      10_49 0.100284705  31.460222 3.060602e-06   4.1086957
3705            PLAU      10_49 0.008878220   5.750547 4.952739e-08  -0.9189189
6232        C10orf11      10_49 0.008899518   5.580033 4.817411e-08  -0.8573335
7858           VDAC2      10_49 0.088251394  21.153236 1.810960e-06  -4.3582090
9287          SEC24C      10_49 0.030788946  46.259307 1.381670e-06   6.4776119
10041          AP3M1      10_49 0.035279184  15.591795 5.336114e-07  -1.7388852
10442          DUPD1      10_49 0.008429365   5.258110 4.299668e-08  -1.1529412
10671          FUT11      10_49 0.034603540  47.907740 1.608187e-06  -6.5522388
11458         ZSWIM8      10_49 0.729519326 109.788618 7.769705e-05 -11.2164948
11550       C10orf55      10_49 0.009058826  11.033338 9.695925e-08   2.8208955
11619     ZNF503-AS1      10_49 0.010899216  10.034096 1.060923e-07  -2.1217391
12696 RP11-399K21.11      10_49 0.012183813   8.284501 9.791742e-08  -0.1303262
12792 RP11-574K11.29      10_49 0.022990638  19.165704 4.274509e-07  -3.2007683
12851 RP11-399K21.14      10_49 0.010355302   6.113393 6.141232e-08   0.3968750
      num_eqtl
365          1
1016         1
3705         1
6232         2
7858         1
9287         1
10041        2
10442        1
10671        1
11458        1
11550        1
11619        1
12696        3
12792        2
12851        1

[1] "LIPC"
[1] "15_26"
     genename region_tag  susie_pip       mu2          PVE          z num_eqtl
5176   ADAM10      15_26 0.03703397  4.851525 1.742966e-07  0.2598425        1
6857   RNF111      15_26 0.14645672 17.702391 2.515079e-06 -2.4117647        1
7924     LIPC      15_26 0.04422266  6.481400 2.780508e-07  0.8250664        2

[1] "ANGPTL4"
[1] "19_8"
      genename region_tag  susie_pip       mu2          PVE           z
1483    HNRNPM       19_8 0.07173199 10.132429 7.050776e-07  1.22767857
1484    MARCH2       19_8 0.03980176  4.689135 1.810529e-07  0.08108108
4599     PRAM1       19_8 0.04039230  4.824423 1.890403e-07 -0.14864865
4601    ZNF414       19_8 0.06310548  8.941693 5.473905e-07  1.21505376
5673     MYO1F       19_8 0.09224704 12.484718 1.117227e-06  1.60696522
8213   ANGPTL4       19_8 0.10682901 13.868140 1.437202e-06  1.80882353
8214     CD320       19_8 0.16838445 18.229956 2.977817e-06 -2.21081081
8217    ZNF558       19_8 0.03938491  4.592445 1.754625e-07 -0.16666667
10274    KANK3       19_8 0.08336899 11.535792 9.329586e-07 -1.52564103
12631   NDUFA7       19_8 0.04559754  5.939216 2.627126e-07  0.58520936
      num_eqtl
1483         1
1484         1
4599         1
4601         1
5673         2
8213         1
8214         1
8217         1
10274        1
12631        2

[1] "SOAT2"
[1] "12_33"
           genename region_tag  susie_pip       mu2          PVE           z
225        CALCOCO1      12_33 0.03778982  4.686097 1.717895e-07  0.70165746
585           EIF4B      12_33 0.03903239  4.983038 1.886817e-07 -0.35525461
1411           CBX5      12_33 0.08559634 12.255819 1.017672e-06  1.57352941
2670           TNS2      12_33 0.04537199  6.366685 2.802280e-07  0.59154930
3751          SMUG1      12_33 0.04475377  6.240417 2.709278e-07  0.70238095
4825         ATP5G2      12_33 0.04203984  5.665028 2.310327e-07  1.05090258
4843          ESPL1      12_33 0.04110618  5.458542 2.176678e-07 -0.44979920
5391          GPR84      12_33 0.04287162  5.845147 2.430948e-07 -0.49253731
5392           NPFF      12_33 0.09801321 13.528345 1.286292e-06 -2.10294118
5397        MAP3K12      12_33 0.09193530 12.926084 1.152815e-06 -1.66304348
5400           CSAD      12_33 0.04138287  5.520202 2.216083e-07 -0.42491301
5405         ZNF740      12_33 0.04876555  7.031210 3.326240e-07  0.75757576
7211        ZNF385A      12_33 0.03712370  4.522891 1.628838e-07 -0.12643678
8215         SPRYD3      12_33 0.05104420  7.452467 3.690260e-07  0.81437126
8216          SOAT2      12_33 0.13014201 16.218172 2.047528e-06  1.84210526
8583           KRT4      12_33 0.03744922  4.602988 1.672219e-07 -0.03296703
9784          MFSD5      12_33 0.10628486 14.293058 1.473693e-06  2.05639773
10799         HOXC6      12_33 0.05307684  7.813000 4.022845e-07 -1.13186813
11254         PRR13      12_33 0.07229305 10.678174 7.488658e-07  1.47058824
12161 RP11-834C11.4      12_33 0.20769029 20.766706 4.184025e-06  2.35007196
12433         CISTR      12_33 0.06779696 10.080773 6.630015e-07 -1.55036730
      num_eqtl
225          1
585          2
1411         1
2670         1
3751         1
4825         2
4843         1
5391         1
5392         1
5397         1
5400         3
5405         1
7211         1
8215         1
8216         1
8583         1
9784         2
10799        1
11254        1
12161        2
12433        2

[1] "ADH1B"
[1] "4_66"
           genename region_tag  susie_pip       mu2          PVE          z
5323           MTTP       4_66 0.05713053  5.733633 3.177669e-07  0.5394737
5984        TRMT10A       4_66 0.06199325  6.490226 3.903145e-07  0.8490721
6388          EIF4E       4_66 0.07451430  8.200439 5.927712e-07 -1.0566038
10617         ADH1B       4_66 0.11117753 11.959347 1.289837e-06 -1.3819444
12092         ADH1C       4_66 0.06215161  6.513876 3.927374e-07  0.8287844
12107 RP11-766F14.2       4_66 0.24311774 19.587066 4.619516e-06 -2.4715447
12861 RP11-571L19.8       4_66 0.16383078 15.676799 2.491514e-06 -2.2652120
      num_eqtl
5323         1
5984         2
6388         1
10617        1
12092        3
12107        1
12861        2

[1] "LCAT"
[1] "16_36"
          genename region_tag  susie_pip       mu2          PVE           z
385           EDC4      16_36 0.03864999  6.095171 2.285313e-07  0.80392157
388         FAM65A      16_36 0.03517201  5.230153 1.784523e-07  0.47712418
828         NFATC3      16_36 0.09364552 14.301824 1.299239e-06  1.84401694
1285         CMTM1      16_36 0.06293118 10.591698 6.466091e-07 -1.59405941
1855         ELMO3      16_36 0.04885492  8.250621 3.910258e-07 -1.03759398
1857         NUTF2      16_36 0.07385851 12.079624 8.654946e-07  2.08670520
1859      TSNAXIP1      16_36 0.03266295  4.552064 1.442362e-07 -0.14606742
1866           ACD      16_36 0.09943582 14.865698 1.433965e-06  2.31791908
1868        PARD6A      16_36 0.05634737  9.568173 5.230138e-07 -1.26797492
1881      SLC7A6OS      16_36 0.05629963  9.560069 5.221280e-07 -1.74074074
1882        SLC7A6      16_36 0.03260009  4.534436 1.434011e-07  0.20000000
1884         ESRP2      16_36 0.03381406  4.869319 1.597261e-07  0.44761905
3786         ENKD1      16_36 0.04331642  7.142583 3.001361e-07  0.80970301
3888        LRRC29      16_36 0.03781157  5.893867 2.161899e-07  0.66929134
3892      C16orf70      16_36 0.04785396  8.059797 3.741557e-07 -0.97706422
4527         PRMT7      16_36 0.03526055  5.253201 1.796898e-07 -0.42405017
4875      DYNC1LI2      16_36 0.03454736  5.065907 1.697784e-07 -0.60000000
4876         FHOD1      16_36 0.04326467  7.131586 2.993160e-07  0.76839164
4878        SLC9A5      16_36 0.03943120  6.278896 2.401783e-07  0.63377727
5524         CMTM3      16_36 0.04490788  7.474585 3.256267e-07 -0.87084871
7028          NAE1      16_36 0.03648713  5.566752 1.970389e-07  0.73170732
7035         TPPP3      16_36 0.03594180  5.428632 1.892782e-07 -1.13414634
7036        ZDHHC1      16_36 0.05104559  8.654980 4.285828e-07 -1.66463415
7037      ATP6V0D1      16_36 0.03262864  4.542446 1.437802e-07  0.09156734
7039      C16orf86      16_36 0.08265370 13.130075 1.052786e-06  2.17919075
8018         BEAN1      16_36 0.03260259  4.535136 1.434342e-07 -0.17833693
8117          DUS2      16_36 0.03280281  4.591212 1.460995e-07 -0.36470588
8868          CES3      16_36 0.03831276  6.014725 2.235474e-07 -0.71603194
8871          PDP2      16_36 0.03733128  5.776568 2.091959e-07  0.66544118
9492       EXOC3L1      16_36 0.03995691  6.400539 2.480954e-07 -0.76562500
9813         DDX28      16_36 0.04054143  6.533958 2.569720e-07  0.88775510
10534      PLEKHG4      16_36 0.05342158  9.075039 4.703007e-07 -1.71529720
11243       PSMB10      16_36 0.07059545 11.658849 7.984409e-07  2.04651163
11245         E2F4      16_36 0.06956550 11.522205 7.775708e-07 -1.96167427
11360         LCAT      16_36 0.03254254  4.518255 1.426371e-07 -0.22727273
11505         CKLF      16_36 0.05062503  8.578871 4.213140e-07 -1.25405405
12077    LINC00920      16_36 0.03256396  4.524282 1.429214e-07 -0.03193996
13014 RP11-615I2.6      16_36 0.09809835 14.738998 1.402620e-06 -1.76835994
      num_eqtl
385          1
388          1
828          2
1285         1
1855         1
1857         1
1859         1
1866         1
1868         2
1881         1
1882         1
1884         1
3786         2
3888         1
3892         1
4527         3
4875         1
4876         2
4878         2
5524         1
7028         1
7035         1
7036         1
7037         2
7039         1
8018         2
8117         1
8868         2
8871         1
9492         1
9813         1
10534        2
11243        1
11245        2
11360        1
11505        1
12077        2
13014        2

[1] "VDAC1"
[1] "5_80"
        genename region_tag  susie_pip       mu2          PVE           z
116        CDKL3       5_80 0.03761542  4.527426 1.652067e-07 -0.08130081
737        PITX1       5_80 0.12975728 16.073676 2.023286e-06  2.02631579
819         AFF4       5_80 0.04504579  6.184097 2.702346e-07  0.68807339
1055        TCF7       5_80 0.04643238  6.463251 2.911270e-07 -0.75974026
2928     C5orf15       5_80 0.07397067 10.775697 7.732419e-07  1.31781707
3415       UBE2B       5_80 0.03761542  4.527426 1.652067e-07 -0.08130081
4524       PCBD2       5_80 0.08078693 11.598468 9.089755e-07 -1.56504419
6523       SAR1B       5_80 0.06538367  9.627799 6.106701e-07  1.33644860
7688        GDF9       5_80 0.06939581 10.181266 6.854021e-07  1.27372263
7713       CAMLG       5_80 0.06450132  9.501662 5.945366e-07  1.31225633
8599       HSPA4       5_80 0.04010050  5.114777 1.989697e-07  0.43421053
11375      VDAC1       5_80 0.09151248 12.766560 1.133351e-06  1.61904762
11878 CDKN2AIPNL       5_80 0.10152738 13.744242 1.353675e-06  1.63768116
12174  LINC01843       5_80 0.05909288  8.689756 4.981420e-07 -1.11235955
      num_eqtl
116          1
737          1
819          1
1055         1
2928         2
3415         1
4524         2
6523         1
7688         1
7713         2
8599         1
11375        1
11878        1
12174        1

[1] "FADS3"
[1] "11_34"
           genename region_tag  susie_pip       mu2          PVE           z
2584           DTX4      11_34 0.02781763  6.861199 1.851529e-07  0.85897436
2593         MS4A6A      11_34 0.03760719  9.622151 3.510375e-07  1.25373134
2594         MS4A4A      11_34 0.02309081  5.160920 1.156051e-07 -0.32835821
2597         CCDC86      11_34 0.03597023  9.213902 3.215121e-07  1.04649029
2621            CD5      11_34 0.03568699  9.141412 3.164708e-07  1.11764706
3883        SCGB1D2      11_34 0.03004532  7.565569 2.205103e-07 -0.89156627
4751          FADS2      11_34 0.10100488 18.791985 1.841304e-06  2.36643571
4752        TMEM258      11_34 0.03697381  9.466299 3.395352e-07  1.39809594
6292        TMEM138      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
6293          FADS1      11_34 0.04673113 11.618934 5.267239e-07 -1.81944444
6296         INCENP      11_34 0.06319853 14.409054 8.833908e-07  1.72072479
6299          MS4A2      11_34 0.02622115  6.321244 1.607921e-07 -0.79104478
7256       CYB561A3      11_34 0.07669069 16.209207 1.205910e-06  1.96202532
7257        PPP1R32      11_34 0.04776414 11.820495 5.477067e-07  1.49792139
7258         ASRGL1      11_34 0.03557232  9.111898 3.144354e-07  1.12328767
8045        FAM111A      11_34 0.02248651  4.919074 1.073040e-07  0.37903226
8061          PATL1      11_34 0.02241093  4.888373 1.062759e-07 -0.29903537
8063           STX3      11_34 0.02639309  6.380928 1.633746e-07  0.82994817
8072         MS4A14      11_34 0.02767618  6.814626 1.829611e-07  0.91549296
8249           VWCE      11_34 0.02151883  4.518039 9.431461e-08  0.02651515
8250          BEST1      11_34 0.03609758  9.246334 3.237860e-07  1.26126126
10279       TMEM216      11_34 0.03789266  9.691540 3.562529e-07 -1.24090909
10481       FAM111B      11_34 0.02911441  7.277705 2.055478e-07 -0.85853659
10784         MPEG1      11_34 0.03036725  7.663054 2.257448e-07 -0.96969697
11219       LRRC10B      11_34 0.05600778 13.290279 7.220926e-07 -1.60000000
11466        MS4A4E      11_34 0.02832931  7.027800 1.931372e-07  0.97058824
11539         FADS3      11_34 0.23438823 26.956236 6.129224e-06 -2.97402597
12060    AP001258.4      11_34 0.03358240  8.584346 2.796594e-07  1.10000000
12307 RP11-794G24.1      11_34 0.02633199  6.359770 1.624559e-07 -0.70680628
12313 RP11-286N22.8      11_34 0.05730574 13.502198 7.506077e-07 -1.61458333
      num_eqtl
2584         1
2593         1
2594         1
2597         2
2621         1
3883         1
4751         2
4752         2
6292         1
6293         1
6296         2
6299         1
7256         1
7257         2
7258         1
8045         1
8061         1
8063         3
8072         1
8249         1
8250         1
10279        1
10481        1
10784        1
11219        1
11466        1
11539        1
12060        1
12307        1
12313        1

[1] "APOC2"
[1] "19_31"
      genename region_tag  susie_pip       mu2          PVE           z
123   TRAPPC6A      19_31 0.09915894 11.601044 1.115936e-06 -1.43410853
578     ZNF112      19_31 0.04768345  4.787592 2.214600e-07  0.15789474
842        PVR      19_31 0.04845305  4.935179 2.319714e-07  0.40965622
2052    CLPTM1      19_31 0.05877400  6.719066 3.830933e-07  0.77009814
2057       CKM      19_31 0.04813746  4.874945 2.276477e-07  0.36165100
2059  PPP1R13L      19_31 0.06371252  7.466884 4.615031e-07  0.94933333
3338    CD3EAP      19_31 0.05192595  5.573765 2.807653e-07  0.56301629
3949      FOSB      19_31 0.04665997  4.587703 2.076587e-07  0.11538462
3951      RTN2      19_31 0.04914093  5.065148 2.414604e-07  0.36842105
4280   NECTIN2      19_31 0.11432276 12.946862 1.435845e-06  1.65828323
4282    TOMM40      19_31 0.05203045  5.592327 2.822673e-07 -0.59268930
5668    GEMIN7      19_31 0.09449659 11.147586 1.021898e-06 -1.47151206
7051    ZNF233      19_31 0.22438507 19.499838 4.244586e-06  2.65656566
7052    ZNF235      19_31 0.13166512 14.291498 1.825404e-06  2.28712871
8611    ZNF296      19_31 0.04678271  4.611904 2.093033e-07 -0.19444444
10231 CEACAM19      19_31 0.15596201 15.922324 2.408994e-06  1.95939086
10300     BCAM      19_31 0.07444369  8.914531 6.437790e-07 -1.15789474
10487  BLOC1S3      19_31 0.04981758  5.191270 2.508804e-07 -0.41492537
11402    PPM1N      19_31 0.05741543  6.502596 3.621811e-07 -0.76470588
11503   IGSF23      19_31 0.04710462  4.675075 2.136301e-07  0.09745763
11829    APOC2      19_31 0.04744721  4.741844 2.182571e-07 -0.21225665
12617   ZNF285      19_31 0.05262760  5.697703 2.908867e-07 -0.63909774
13122   ZNF229      19_31 0.05013876  5.250555 2.553814e-07 -0.54634146
      num_eqtl
123          1
578          1
842          2
2052         2
2057         2
2059         1
3338         2
3949         1
3951         1
4280         2
4282         1
5668         2
7051         1
7052         1
8611         1
10231        1
10300        1
10487        1
11402        1
11503        1
11829        2
12617        1
13122        1
#run APOE locus again using full SNPs
# focus <- "APOE"
# region_tag <- ctwas_res$region_tag[which(ctwas_res$genename==focus)]
# 
# locus_plot(region_tag, label="TWAS", rerun_ctwas = T)
# 
# mtext(text=region_tag)
# 
# print(focus)
# print(region_tag)
# print(ctwas_gene_res[ctwas_gene_res$region_tag==region_tag,report_cols,])

Locus Plots - False positives

This section produces locus plots for all bystander genes with PIP>0.8 (false positives). The highlighted gene at each region is the false positive gene.

false_positives <- ctwas_gene_res$genename[ctwas_gene_res$genename %in% unrelated_genes & ctwas_gene_res$susie_pip>0.8]

for (i in 1:length(false_positives)){
  focus <- false_positives[i]
  region_tag <- ctwas_res$region_tag[which(ctwas_res$genename==focus)]

  locus_plot3(region_tag, focus=focus)
  mtext(text=region_tag)

  print(focus)
  print(region_tag)
  print(ctwas_gene_res[ctwas_gene_res$region_tag==region_tag,report_cols,])
  
  #genes at this locus that are in known annotations
  ctwas_gene_res$genename[ctwas_gene_res$region_tag==region_tag][ctwas_gene_res$genename[ctwas_gene_res$region_tag==region_tag] %in% known_annotations]
}

Genes with many eQTL

#distribution of number of eQTL for all imputed genes (after dropping ambiguous variants)
table(ctwas_gene_res$num_eqtl)

   1    2    3    4    5    6 
6701 2825  539   76    8    1 
#all genes with 4+ eQTL
ctwas_gene_res[ctwas_gene_res$num_eqtl>3,]
      chrom                 id       pos type region_tag1 region_tag2 cs_index
11112     1  ENSG00000204219.9  23381993 gene           1          16        0
531       1  ENSG00000057468.6  75779738 gene           1          47        0
3232      1 ENSG00000116791.13  74702183 gene           1          47        0
4675      1 ENSG00000134184.12 109673814 gene           1          67        0
12685     2  ENSG00000269973.1   9843557 gene           2           6        0
3049      2 ENSG00000115129.13  24064728 gene           2          14        0
3478      2 ENSG00000119771.14  23385014 gene           2          14        0
3160      2  ENSG00000116031.8  70823530 gene           2          47        0
5240      2 ENSG00000138376.10 214808273 gene           2         127        0
106       2 ENSG00000006607.13 241355498 gene           2         144        0
9645      2 ENSG00000180902.17 241734472 gene           2         144        0
5903      3 ENSG00000144455.13   4368850 gene           3           4        0
255       3 ENSG00000016391.10  53825497 gene           3          36        0
10512     3  ENSG00000189366.9 125937048 gene           3          78        0
12886     3  ENSG00000272970.1 184727389 gene           3         113        0
4063      3  ENSG00000127252.5 193241004 gene           3         118        0
10123     4 ENSG00000185619.18    705427 gene           4           2        0
9009      4 ENSG00000174137.12   1680955 gene           4           3        0
3830      4 ENSG00000124406.16  42619261 gene           4          34        0
10932     4 ENSG00000198515.13  48006903 gene           4          37        0
7510      4 ENSG00000163644.14  88284772 gene           4          59        0
6026      5  ENSG00000145779.7 119268542 gene           5          72        0
7759      5 ENSG00000164904.17 126538297 gene           5          77        0
6046      6  ENSG00000145949.9   2680498 gene           6           3        0
11722     6  ENSG00000230438.6   2876301 gene           6           3        0
11166     6  ENSG00000204516.9  31494471 gene           6          26        0
11126     6  ENSG00000204301.6  32205480 gene           6          26        0
12047     6  ENSG00000244731.7  31973120 gene           6          26        0
8639      6  ENSG00000170915.8  52356177 gene           6          39        0
6892      7 ENSG00000157927.16   4817947 gene           7           6        0
10553     7 ENSG00000196247.11  64665954 gene           7          43        0
24        7  ENSG00000002933.7 150788313 gene           7          93        0
233       7 ENSG00000013374.15 151341248 gene           7          94        0
6151      8 ENSG00000147576.15  66431109 gene           8          50        0
9587      8 ENSG00000180155.19 142777665 gene           8          93        0
2340      9 ENSG00000107099.15    214719 gene           9           1        0
5059      9 ENSG00000137074.18  33024705 gene           9          25        0
11846     9  ENSG00000235387.2  35865700 gene           9          27        0
5016      9 ENSG00000136816.15 129795323 gene           9          67        0
7973     10  ENSG00000166295.8  72178808 gene          10          48        0
4628     10 ENSG00000133661.15  79980164 gene          10          51        0
7970     10 ENSG00000166275.15 102846409 gene          10          66        0
6451     10 ENSG00000151893.14 118655864 gene          10          73        1
748      11  ENSG00000069696.6    627517 gene          11           1        0
9292     11 ENSG00000177042.14    688091 gene          11           1        0
10066    11 ENSG00000185201.16    307025 gene          11           1        0
8125     11 ENSG00000167311.13   3633446 gene          11           3        0
9633     11  ENSG00000180785.8   4643212 gene          11           3        0
6258     11 ENSG00000149089.12  34916384 gene          11          23        0
7918     11  ENSG00000166002.6  93498608 gene          11          53        0
5351     12 ENSG00000139197.10   7186351 gene          12           7        0
11940    12  ENSG00000240771.6  57605318 gene          12          36        0
10033    12  ENSG00000184967.6 132005752 gene          12          81        0
346      13 ENSG00000032742.17  20566173 gene          13           2        0
1836     13  ENSG00000102683.7  23180605 gene          13           4        0
4460     14 ENSG00000131966.13  58134632 gene          14          26        0
167      14 ENSG00000009830.11  77320520 gene          14          36        0
250      14 ENSG00000015133.18  91323427 gene          14          46        0
9780     14  ENSG00000182512.4  95533077 gene          14          49        0
11058    14 ENSG00000203485.12 104689664 gene          14          55        0
4192     15  ENSG00000128928.8  40361837 gene          15          14        0
1890     16 ENSG00000103148.15    112241 gene          16           1        0
1901     16 ENSG00000103199.13   4759007 gene          16           4        0
6591     16 ENSG00000153786.12  85009554 gene          16          49        0
5544     16 ENSG00000141013.16  89846600 gene          16          54        0
8194     17 ENSG00000167693.16    887726 gene          17           1        0
2442     17 ENSG00000108352.11  40170611 gene          17          23        0
5566     17 ENSG00000141295.13  47834936 gene          17          28        0
8119     17 ENSG00000167280.16  79074789 gene          17          44        0
8321     18 ENSG00000168461.12   9685412 gene          18           7        0
1814     18 ENSG00000101638.13  46714149 gene          18          26        0
1490     19 ENSG00000099817.11   1078821 gene          19           2        0
9732     19 ENSG00000182087.12   1000167 gene          19           2        0
2086     19  ENSG00000104980.7   7926838 gene          19           7        0
8210     19 ENSG00000167766.18  52618483 gene          19          36        0
8643     19 ENSG00000170949.17  53087254 gene          19          36        0
8644     19 ENSG00000170954.11  53093958 gene          19          36        0
11057    19 ENSG00000203326.11  53365182 gene          19          36        0
506      20 ENSG00000054793.13  51703540 gene          20          31        0
9888     22 ENSG00000183569.17  42553443 gene          22          18        0
11274    22 ENSG00000205593.11  50313740 gene          22          24        0
1961     15 ENSG00000103811.15  78937302 gene          15          37        0
1964     15 ENSG00000103876.11  80147571 gene          15          37        0
12376    15  ENSG00000259417.2  80252110 gene          15          37        0
130      16 ENSG00000007516.13   1333326 gene          16           2        0
         susie_pip       mu2 region_tag          PVE     genename
11112 0.2165531827 21.507177       1_16 4.518127e-06        TCEA3
531   0.0440342175  6.180003       1_47 2.639912e-07         MSH4
3232  0.0379537718  4.814549       1_47 1.772642e-07         CRYZ
4675  0.0244600436  8.346662       1_67 1.980526e-07        GSTM1
12685 0.0306431693  4.730411        2_6 1.406187e-07 RP11-95D17.1
3049  0.1280649183 13.581111       2_14 1.687236e-06       TP53I3
3478  0.0571029917  6.005463       2_14 3.326717e-07       KLHL29
3160  0.0238575187  4.673566       2_47 1.081643e-07        CD207
5240  0.0346456395  4.623896      2_127 1.554058e-07        BARD1
106   0.0369699941  4.535566      2_144 1.626640e-07        FARP2
9645  0.1213386828 15.600616      2_144 1.836333e-06       D2HGDH
5903  0.0244258772  6.426375        3_4 1.522743e-07        SUMF1
255   0.0507750627  9.180983       3_36 4.522203e-07         CHDH
10512 0.0519452702  5.571409       3_78 2.807511e-07        ALG1L
12886 0.0446447276  4.528488      3_113 1.961254e-07 RP11-329B9.4
4063  0.0461679442  4.572799      3_118 2.048014e-07       HRASLS
10123 0.0415752691  4.651024        4_2 1.875832e-07        PCGF3
9009  0.0546096961  5.324484        4_3 2.820705e-07       FAM53A
3830  0.1323480952 14.056297       4_34 1.804675e-06       ATP8A1
10932 0.1225852651 16.574520       4_37 1.971014e-06        CNGA1
7510  0.0596633378  5.060200       4_59 2.928772e-07        PPM1K
6026  0.1222296023 14.553489       5_72 1.725655e-06      TNFAIP8
7759  0.0574487010  4.600750       5_77 2.564007e-07      ALDH7A1
6046  0.0439488504  4.658363        6_3 1.986055e-07        MYLK4
11722 0.1198506687 14.017307        6_3 1.629729e-06   SERPINB9P1
11166 0.1149773520 30.739146       6_26 3.428582e-06         MICB
11126 0.0066330331  4.550173       6_26 2.927861e-08       NOTCH4
12047 0.0115304369  9.564307       6_26 1.069817e-07          C4A
8639  0.0471240512  4.532585       6_39 2.072044e-07        PAQR8
6892  0.0390673314  5.127604        7_6 1.943294e-07        RADIL
10553 0.0600366098  9.067138       7_43 5.280765e-07       ZNF107
24    0.0356333853  5.034035       7_93 1.740138e-07     TMEM176A
233   0.0519676493  5.037321       7_94 2.539470e-07         NUB1
6151  0.0782335708 13.908796       8_50 1.055585e-06       ADHFE1
9587  0.0490808165  6.017971       8_93 2.865314e-07        LYNX1
2340  0.0494136848  4.958825        9_1 2.377040e-07        DOCK8
5059  0.0479839679  5.063216       9_25 2.356856e-07         APTX
11846 0.0673676830 15.086440       9_27 9.859362e-07        SPAAR
5016  0.0471381096  5.007281       9_67 2.289731e-07        TOR1B
7973  0.0481151378  5.677193      10_48 2.649878e-07      ANAPC16
4628  0.0511950570  6.836265      10_51 3.395137e-07        SFTPD
7970  0.0006550480  7.207757      10_66 4.580192e-09       BORCS7
6451  0.7227588049 22.107581      10_73 1.550048e-05       CACUL1
748   0.0845027751 12.484376       11_1 1.023407e-06         DRD4
9292  0.0361365018  4.624666       11_1 1.621201e-07       TMEM80
10066 0.0357202865  4.518435       11_1 1.565717e-07       IFITM2
8125  0.0115413329  8.575870       11_3 9.601621e-08         ART5
9633  0.0083423383  6.216940       11_3 5.031238e-08       OR51E1
6258  0.0495298672  4.531703      11_23 2.177404e-07         APIP
7918  0.1087441019 15.854990      11_53 1.672562e-06        SMCO4
5351  0.0472982127  7.658971       12_7 3.514193e-07         PEX5
11940 0.0549328713  5.126961      12_36 2.732139e-07     ARHGEF25
10033 0.1145190870 13.470564      12_81 1.496491e-06        NOC4L
346   0.0383783120  4.579146       13_2 1.704829e-07        IFT88
1836  0.0434719760  4.837522       13_4 2.040059e-07         SGCG
4460  0.0561816376  4.610153      14_26 2.512582e-07       ACTR10
167   0.0220308723  4.532378      14_36 9.686529e-08        POMT2
250   0.0342051406  5.679435      14_46 1.884547e-07      CCDC88C
9780  0.0342395723  4.548660      14_49 1.510853e-07        GLRX5
11058 0.0580796189  6.034835      14_55 3.400162e-07         INF2
4192  0.0418828342  4.828395      15_14 1.961776e-07          IVD
1890  0.2017966776 23.219121       16_1 4.545380e-06        NPRL3
1901  0.0498766898  6.836741       16_4 3.307937e-07       ZNF500
6591  0.0998611432 12.028396      16_49 1.165238e-06       ZDHHC7
5544  0.0739153222  9.559528      16_54 6.854588e-07         GAS8
8194  0.0513564891  6.241564       17_1 3.109562e-07          NXN
2442  0.1394587619 23.328540      17_23 3.156049e-06     RAPGEFL1
5566  0.0004147273  6.569172      17_28 2.642918e-09        SCRN2
8119  0.1975915092 20.221028      17_44 3.875984e-06       ENGASE
8321  0.0189532463  5.083683       18_7 9.347006e-08        RAB31
1814  0.0292918992  4.519378      18_26 1.284212e-07      ST8SIA5
1490  0.3292345554 27.865676       19_2 8.899906e-06       POLR2E
9732  0.0303158041  5.041546       19_2 1.482666e-07      TMEM259
2086  0.0572222626  9.344200       19_7 5.187016e-07       TIMM44
8210  0.0148425117  4.832946      19_36 6.958726e-08        ZNF83
8643  0.0161796261  5.617267      19_36 8.816658e-08       ZNF160
8644  0.0209937643  7.988582      19_36 1.626936e-07       ZNF415
11057 0.0143593513  4.532138      19_36 6.313183e-08       ZNF525
506   0.0265247719  5.526450      20_31 1.422028e-07        ATP9A
9888  0.0433638436  4.567262      22_18 1.921295e-07       SERHL2
11274 0.0848633748 13.670071      22_24 1.125386e-06      DENND6B
1961  0.0187963047  5.781908      15_37 1.054275e-07         CTSH
1964  0.0162993022  4.773008      15_37 7.546952e-08          FAH
12376 0.8300210991 20.719695      15_37 1.668334e-05    LINC01314
130   0.0065793657  7.286811       16_2 4.650846e-08       BAIAP3
           gene_type            z num_eqtl
11112 protein_coding -2.440267951        4
531   protein_coding -0.620052310        4
3232  protein_coding  0.002855101        4
4675  protein_coding -0.973339711        4
12685        lincRNA  0.217340052        4
3049  protein_coding -1.976212808        4
3478  protein_coding -0.624890316        4
3160  protein_coding -0.102351022        4
5240  protein_coding  0.245540338        4
106   protein_coding  0.172114509        4
9645  protein_coding  1.891608686        4
5903  protein_coding  0.669021935        4
255   protein_coding -1.211958037        4
10512 protein_coding  0.608861176        4
12886        lincRNA  0.082489767        4
4063  protein_coding  0.086747178        4
10123 protein_coding -0.172329751        4
9009  protein_coding  0.674150321        4
3830  protein_coding  1.836540407        4
10932 protein_coding  2.302208079        4
7510  protein_coding  0.375710166        4
6026  protein_coding  1.766342942        4
7759  protein_coding  0.254481787        4
6046  protein_coding -0.229459393        4
11722        lincRNA -1.695032189        4
11166 protein_coding  2.916537842        4
11126 protein_coding -0.072751034        4
12047 protein_coding  1.316735788        4
8639  protein_coding -0.015891555        4
6892  protein_coding -0.413872489        4
10553 protein_coding  1.326350485        4
24    protein_coding -0.643253657        4
233   protein_coding  0.379208858        4
6151  protein_coding  1.998483498        4
9587  protein_coding  0.520495756        4
2340  protein_coding -0.356181735        4
5059  protein_coding -0.549963807        4
11846 protein_coding  1.675675285        5
5016  protein_coding  0.380445650        4
7973  protein_coding  0.399205152        4
4628  protein_coding -0.885721483        4
7970  protein_coding -0.526012182        4
6451  protein_coding  4.319545841        4
748   protein_coding -1.497374114        4
9292  protein_coding  0.049876581        4
10066 protein_coding -0.025005790        5
8125  protein_coding  0.507809839        4
9633  protein_coding -0.676154522        5
6258  protein_coding -0.027704193        4
7918  protein_coding -1.932558474        4
5351  protein_coding -0.902269046        4
11940 protein_coding  0.433006303        4
10033 protein_coding -1.805702949        6
346   protein_coding  0.131751846        4
1836  protein_coding  0.243117640        4
4460  protein_coding  0.119326035        4
167   protein_coding -0.374526500        4
250   protein_coding  0.609826113        4
9780  protein_coding  0.158475991        4
11058 protein_coding -0.476342392        4
4192  protein_coding  0.258688400        4
1890  protein_coding -2.449224925        4
1901  protein_coding -0.779958034        4
6591  protein_coding  1.538279013        4
5544  protein_coding -1.587793494        4
8194  protein_coding -0.655809230        4
2442  protein_coding  3.059016504        4
5566  protein_coding  0.909239725        5
8119  protein_coding -2.276500640        4
8321  protein_coding -0.427850673        5
1814  protein_coding -0.154330769        4
1490  protein_coding -3.150789744        5
9732  protein_coding -0.535091807        4
2086  protein_coding -1.221084055        4
8210  protein_coding  0.303018261        5
8643  protein_coding -0.511367254        4
8644  protein_coding -0.939733027        4
11057 protein_coding -0.062633062        4
506   protein_coding -0.509725048        4
9888  protein_coding  0.154400055        4
11274 protein_coding  2.245941958        4
1961  protein_coding  0.633053187        5
1964  protein_coding -0.142308981        4
12376 protein_coding -4.379164029        4
130   protein_coding  0.228653666        4
#distribution of number of eQTL for genes with PIP>0.8
table(ctwas_gene_res$num_eqtl[ctwas_gene_res$susie_pip>0.8])/sum(ctwas_gene_res$susie_pip>0.8)

         1          2          4 
0.57894737 0.36842105 0.05263158 
#genes with 2+ eQTL and PIP>0.8
ctwas_gene_res[ctwas_gene_res$num_eqtl>1 & ctwas_gene_res$susie_pip>0.8,]
      chrom                 id       pos type region_tag1 region_tag2 cs_index
3169      1 ENSG00000116132.11 170662279 gene           1          84        1
1214      2  ENSG00000087338.4  69829233 gene           2          46        1
3147      2 ENSG00000115935.17 174683036 gene           2         105        1
9840      5  ENSG00000183072.9 173219180 gene           5         103        1
12133     8  ENSG00000249816.6 124849014 gene           8          82        1
9417      8 ENSG00000178209.14 143944186 gene           8          94        1
12376    15  ENSG00000259417.2  80252110 gene          15          37        0
6663     21 ENSG00000154721.14  25638800 gene          21           9        1
      susie_pip        mu2 region_tag          PVE  genename      gene_type
3169  0.9999999  153.79916       1_84 1.491985e-04     PRRX1 protein_coding
1214  0.9944249   60.60721       2_46 5.846645e-05     GMCL1 protein_coding
3147  0.9993101 2124.21550      2_105 2.059251e-03     WIPF1 protein_coding
9840  0.9942183   61.83714      5_103 5.964054e-05    NKX2-5 protein_coding
12133 0.8180590   22.20129       8_82 1.761867e-05 LINC00964        lincRNA
9417  0.9666163   43.61991       8_94 4.090245e-05      PLEC protein_coding
12376 0.8300211   20.71969      15_37 1.668334e-05 LINC01314 protein_coding
6663  0.9633616   22.37976       21_9 2.091487e-05      JAM2 protein_coding
              z num_eqtl
3169  14.848088        2
1214  -8.434995        2
3147   8.987351        2
9840  -9.616279        2
12133  4.554265        2
9417   3.093844        2
12376 -4.379164        4
6663   4.569598        2

cTWAS genes in GO terms enriched for silver standard genes

#reload silver standard genes
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
* `` -> ...4
* `` -> ...5
known_annotations <- unique(known_annotations$`Gene Symbol`)

#GO enrichment analysis for silver standard genes
dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
genes <- known_annotations
GO_enrichment <- enrichr(genes, dbs)
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
for (db in dbs){
  print(db)
  df <- GO_enrichment[[db]]
  df <- df[df$Adjusted.P.value<0.05,c("Term", "Overlap", "Adjusted.P.value", "Genes")]
  plotEnrich(GO_enrichment[[db]])
  print(df)
}
[1] "GO_Biological_Process_2021"
                                                                                       Term
1                                                        cholesterol transport (GO:0030301)
2                                                      cholesterol homeostasis (GO:0042632)
3                                                           sterol homeostasis (GO:0055092)
4                                                           cholesterol efflux (GO:0033344)
5                                                             sterol transport (GO:0015918)
6                                                cholesterol metabolic process (GO:0008203)
7                                                     sterol metabolic process (GO:0016125)
8                            triglyceride-rich lipoprotein particle remodeling (GO:0034370)
9                                 high-density lipoprotein particle remodeling (GO:0034375)
10                                               reverse cholesterol transport (GO:0043691)
11                                         secondary alcohol metabolic process (GO:1902652)
12                                   regulation of lipoprotein lipase activity (GO:0051004)
13                                                      phospholipid transport (GO:0015914)
14                                                             lipid transport (GO:0006869)
15                                                    acylglycerol homeostasis (GO:0055090)
16                            very-low-density lipoprotein particle remodeling (GO:0034372)
17                                                    triglyceride homeostasis (GO:0070328)
18                                              triglyceride metabolic process (GO:0006641)
19                                                         phospholipid efflux (GO:0033700)
20                                                      chylomicron remodeling (GO:0034371)
21                                         regulation of cholesterol transport (GO:0032374)
22                                                        chylomicron assembly (GO:0034378)
23                                               chylomicron remnant clearance (GO:0034382)
24                                               lipoprotein metabolic process (GO:0042157)
25                                               diterpenoid metabolic process (GO:0016101)
26                            positive regulation of steroid metabolic process (GO:0045940)
27                                                  retinoid metabolic process (GO:0001523)
28                                                           lipid homeostasis (GO:0055088)
29                                      negative regulation of lipase activity (GO:0060192)
30                           positive regulation of cholesterol esterification (GO:0010873)
31                                           intestinal cholesterol absorption (GO:0030299)
32                                negative regulation of cholesterol transport (GO:0032375)
33                                                 intestinal lipid absorption (GO:0098856)
34                                              acylglycerol metabolic process (GO:0006639)
35                                    regulation of cholesterol esterification (GO:0010872)
36                                                    phospholipid homeostasis (GO:0055091)
37                              very-low-density lipoprotein particle assembly (GO:0034379)
38                              positive regulation of lipid metabolic process (GO:0045834)
39                                  high-density lipoprotein particle assembly (GO:0034380)
40                          negative regulation of lipoprotein lipase activity (GO:0051005)
41                       negative regulation of lipoprotein particle clearance (GO:0010985)
42              regulation of very-low-density lipoprotein particle remodeling (GO:0010901)
43                                         intracellular cholesterol transport (GO:0032367)
44                                positive regulation of cholesterol transport (GO:0032376)
45                             regulation of intestinal cholesterol absorption (GO:0030300)
46                          positive regulation of lipoprotein lipase activity (GO:0051006)
47                                              acylglycerol catabolic process (GO:0046464)
48                           positive regulation of lipid biosynthetic process (GO:0046889)
49                       positive regulation of triglyceride metabolic process (GO:0090208)
50                         positive regulation of triglyceride lipase activity (GO:0061365)
51                                       regulation of lipid catabolic process (GO:0050994)
52                                                   steroid metabolic process (GO:0008202)
53                              positive regulation of lipid catabolic process (GO:0050996)
54                                              triglyceride catabolic process (GO:0019433)
55                                             organophosphate ester transport (GO:0015748)
56                                       phosphatidylcholine metabolic process (GO:0046470)
57                                regulation of triglyceride catabolic process (GO:0010896)
58                                                fatty acid metabolic process (GO:0006631)
59                               regulation of fatty acid biosynthetic process (GO:0042304)
60                                              regulation of sterol transport (GO:0032371)
61              cellular response to low-density lipoprotein particle stimulus (GO:0071404)
62                                 low-density lipoprotein particle remodeling (GO:0034374)
63                  regulation of macrophage derived foam cell differentiation (GO:0010743)
64                                                 organic substance transport (GO:0071702)
65                                            regulation of cholesterol efflux (GO:0010874)
66                                               receptor-mediated endocytosis (GO:0006898)
67                                      secondary alcohol biosynthetic process (GO:1902653)
68                                           regulation of cholesterol storage (GO:0010885)
69                                                          cholesterol import (GO:0070508)
70                                                               sterol import (GO:0035376)
71                                    monocarboxylic acid biosynthetic process (GO:0072330)
72                                            cholesterol biosynthetic process (GO:0006695)
73                           positive regulation of cellular metabolic process (GO:0031325)
74                                                 sterol biosynthetic process (GO:0016126)
75                         positive regulation of fatty acid metabolic process (GO:0045923)
76                                 regulation of receptor-mediated endocytosis (GO:0048259)
77                                             fatty acid biosynthetic process (GO:0006633)
78                             regulation of Cdc42 protein signal transduction (GO:0032489)
79                       positive regulation of triglyceride catabolic process (GO:0010898)
80                                                  lipid biosynthetic process (GO:0008610)
81                                   positive regulation of cholesterol efflux (GO:0010875)
82                        negative regulation of receptor-mediated endocytosis (GO:0048261)
83                                                       lipoprotein transport (GO:0042953)
84                                       regulation of lipid metabolic process (GO:0019216)
85                                       monocarboxylic acid metabolic process (GO:0032787)
86                                                    lipoprotein localization (GO:0044872)
87                                                     lipid catabolic process (GO:0016042)
88                      positive regulation of fatty acid biosynthetic process (GO:0045723)
89                                              intracellular sterol transport (GO:0032366)
90                                                steroid biosynthetic process (GO:0006694)
91                                    regulation of lipid biosynthetic process (GO:0046890)
92                                               regulation of lipase activity (GO:0060191)
93                        positive regulation of cellular biosynthetic process (GO:0031328)
94                                        regulation of amyloid-beta clearance (GO:1900221)
95                                              phospholipid metabolic process (GO:0006644)
96                                   regulation of intestinal lipid absorption (GO:1904729)
97             positive regulation of protein catabolic process in the vacuole (GO:1904352)
98                                 positive regulation of biosynthetic process (GO:0009891)
99                                 regulation of cholesterol metabolic process (GO:0090181)
100                                                  foam cell differentiation (GO:0090077)
101                                 positive regulation of cholesterol storage (GO:0010886)
102                               macrophage derived foam cell differentiation (GO:0010742)
103                              organic hydroxy compound biosynthetic process (GO:1901617)
104                                    regulation of steroid metabolic process (GO:0019218)
105                               organonitrogen compound biosynthetic process (GO:1901566)
106                             negative regulation of lipid metabolic process (GO:0045833)
107                          regulation of lysosomal protein catabolic process (GO:1905165)
108                              positive regulation of amyloid-beta clearance (GO:1900223)
109                                           cellular lipid catabolic process (GO:0044242)
110                                                       chemical homeostasis (GO:0048878)
111                                              cholesterol catabolic process (GO:0006707)
112                                                   sterol catabolic process (GO:0016127)
113                                       steroid hormone biosynthetic process (GO:0120178)
114                   regulation of low-density lipoprotein particle clearance (GO:0010988)
115                                                bile acid metabolic process (GO:0008206)
116                                   phosphatidylcholine biosynthetic process (GO:0006656)
117                                                  alcohol catabolic process (GO:0046164)
118                                          organophosphate catabolic process (GO:0046434)
119                                       regulation of phospholipase activity (GO:0010517)
120                                  positive regulation of lipid localization (GO:1905954)
121                              positive regulation of phospholipid transport (GO:2001140)
122                                      glycerophospholipid metabolic process (GO:0006650)
123                                         organic hydroxy compound transport (GO:0015850)
124        negative regulation of macrophage derived foam cell differentiation (GO:0010745)
125                                     positive regulation of lipid transport (GO:0032370)
126                                   C21-steroid hormone biosynthetic process (GO:0006700)
127                                                      membrane organization (GO:0061024)
128                                         positive regulation of endocytosis (GO:0045807)
129                    positive regulation of multicellular organismal process (GO:0051240)
130                                   negative regulation of catabolic process (GO:0009895)
131                             negative regulation of lipid catabolic process (GO:0050995)
132                                          carbohydrate derivative transport (GO:1901264)
133        positive regulation of macrophage derived foam cell differentiation (GO:0010744)
134                                                          protein transport (GO:0015031)
135                                                       fatty acid transport (GO:0015908)
136                                       positive regulation of lipid storage (GO:0010884)
137                                      C21-steroid hormone metabolic process (GO:0008207)
138                                             phospholipid catabolic process (GO:0009395)
139                                         negative regulation of endocytosis (GO:0045806)
140                                    regulation of primary metabolic process (GO:0080090)
141                    negative regulation of multicellular organismal process (GO:0051241)
142                                             bile acid biosynthetic process (GO:0006699)
143  regulation of low-density lipoprotein particle receptor catabolic process (GO:0032803)
144                              regulation of Rho protein signal transduction (GO:0035023)
145                             regulation of small molecule metabolic process (GO:0062012)
146                          positive regulation of cellular catabolic process (GO:0031331)
147                                                       artery morphogenesis (GO:0048844)
148                     negative regulation of cellular component organization (GO:0051129)
149                                                       glycolipid transport (GO:0046836)
150                      positive regulation of lipoprotein particle clearance (GO:0010986)
151                                    positive regulation of sterol transport (GO:0032373)
152                                            long-chain fatty acid transport (GO:0015909)
153                                                        response to insulin (GO:0032868)
154                                  regulation of bile acid metabolic process (GO:1904251)
155                          positive regulation of receptor catabolic process (GO:2000646)
156                                           positive regulation of transport (GO:0051050)
157                      negative regulation of endothelial cell proliferation (GO:0001937)
158                          negative regulation of endothelial cell migration (GO:0010596)
159                          regulation of nitrogen compound metabolic process (GO:0051171)
160                              negative regulation of amyloid-beta clearance (GO:1900222)
161                          negative regulation of cellular metabolic process (GO:0031324)
162                                   glycerophospholipid biosynthetic process (GO:0046474)
163 negative regulation of production of molecular mediator of immune response (GO:0002701)
164                                unsaturated fatty acid biosynthetic process (GO:0006636)
165                                                            anion transport (GO:0006820)
166                       positive regulation of receptor-mediated endocytosis (GO:0048260)
167                                 negative regulation of cholesterol storage (GO:0010887)
168                               regulation of bile acid biosynthetic process (GO:0070857)
169                                           peptidyl-amino acid modification (GO:0018193)
170                low-density lipoprotein particle receptor catabolic process (GO:0032802)
171                low-density lipoprotein receptor particle metabolic process (GO:0032799)
172                                                          protein oxidation (GO:0018158)
173                               positive regulation by host of viral process (GO:0044794)
174                   positive regulation of triglyceride biosynthetic process (GO:0010867)
175                                                   receptor internalization (GO:0031623)
176                                                        response to glucose (GO:0009749)
177                     positive regulation of cellular component organization (GO:0051130)
178                     negative regulation of fatty acid biosynthetic process (GO:0045717)
179                                          negative regulation of hemostasis (GO:1900047)
180                                           peptidyl-methionine modification (GO:0018206)
181                                                          ethanol oxidation (GO:0006069)
182                            negative regulation of amyloid fibril formation (GO:1905907)
183                           negative regulation of protein metabolic process (GO:0051248)
184                                   unsaturated fatty acid metabolic process (GO:0033559)
185                                     alpha-linolenic acid metabolic process (GO:0036109)
186                                                     platelet degranulation (GO:0002576)
187                                   negative regulation of metabolic process (GO:0009892)
188                                     negative regulation of cell activation (GO:0050866)
189                                         negative regulation of coagulation (GO:0050819)
190                                                    cGMP-mediated signaling (GO:0019934)
191                                                      intestinal absorption (GO:0050892)
192                                                 receptor metabolic process (GO:0043112)
193                                                 regulation of phagocytosis (GO:0050764)
194                                     regulation of amyloid fibril formation (GO:1905906)
195                                 regulation of sequestering of triglyceride (GO:0010889)
196                            regulation of triglyceride biosynthetic process (GO:0010866)
197                                    post-translational protein modification (GO:0043687)
198                                                  regulation of endocytosis (GO:0030100)
199                                                   amyloid fibril formation (GO:1990000)
200                    positive regulation of small molecule metabolic process (GO:0062013)
201                                       cellular response to nutrient levels (GO:0031669)
202     negative regulation of cytokine production involved in immune response (GO:0002719)
203                        negative regulation of fatty acid metabolic process (GO:0045922)
204                             regulation of cholesterol biosynthetic process (GO:0045540)
205                                 regulation of steroid biosynthetic process (GO:0050810)
206                                   positive regulation of catabolic process (GO:0009896)
207                                amyloid precursor protein metabolic process (GO:0042982)
208                                  nitric oxide mediated signal transduction (GO:0007263)
209                      positive regulation of nitric-oxide synthase activity (GO:0051000)
210                                                  ethanol metabolic process (GO:0006067)
211                  positive regulation of cellular protein catabolic process (GO:1903364)
212                                                     response to fatty acid (GO:0070542)
213                                                           long-term memory (GO:0007616)
214                                       negative regulation of lipid storage (GO:0010888)
215                                            linoleic acid metabolic process (GO:0043651)
216                          negative regulation of lipid biosynthetic process (GO:0051055)
217                                                regulation of lipid storage (GO:0010883)
218                                regulation of interleukin-1 beta production (GO:0032651)
219                                    long-chain fatty acid metabolic process (GO:0001676)
220              regulation of cytokine production involved in immune response (GO:0002718)
221                                         cellular protein metabolic process (GO:0044267)
222                                    negative regulation of defense response (GO:0031348)
223                                       transport across blood-brain barrier (GO:0150104)
224                                                 receptor catabolic process (GO:0032801)
225                                                         response to hexose (GO:0009746)
226                                                       regulated exocytosis (GO:0045055)
227                                   regulation of endothelial cell migration (GO:0010594)
228                                   negative regulation of protein transport (GO:0051224)
229                                             positive regulation of binding (GO:0051099)
230                                            regulation of blood coagulation (GO:0030193)
231                              positive regulation of monooxygenase activity (GO:0032770)
232                                       negative regulation of wound healing (GO:0061045)
233                     negative regulation of macromolecule metabolic process (GO:0010605)
234                                 long-chain fatty acid biosynthetic process (GO:0042759)
235                                         regulation of developmental growth (GO:0048638)
236                                                   regulation of cell death (GO:0010941)
237                                                 regulation of angiogenesis (GO:0045765)
238                                        regulation of inflammatory response (GO:0050727)
239                                                   apoptotic cell clearance (GO:0043277)
240                              cellular response to peptide hormone stimulus (GO:0071375)
241             negative regulation of blood vessel endothelial cell migration (GO:0043537)
242                            phosphate-containing compound metabolic process (GO:0006796)
243                           negative regulation of epithelial cell migration (GO:0010633)
244                                          cellular response to amyloid-beta (GO:1904646)
245                                       cyclic-nucleotide-mediated signaling (GO:0019935)
246                                     regulation of receptor internalization (GO:0002090)
247                                                          response to lipid (GO:0033993)
248         regulation of vascular associated smooth muscle cell proliferation (GO:1904705)
249                          regulation of protein-containing complex assembly (GO:0043254)
250                                                              ion transport (GO:0006811)
251                       negative regulation of response to external stimulus (GO:0032102)
252                                              regulation of protein binding (GO:0043393)
253                                regulation of cellular component biogenesis (GO:0044087)
254                                   negative regulation of protein secretion (GO:0050709)
255                                   negative regulation of secretion by cell (GO:1903531)
256                               regulation of nitric-oxide synthase activity (GO:0050999)
257                                   negative regulation of blood coagulation (GO:0030195)
258                                     cellular response to organic substance (GO:0071310)
259                                      cellular response to insulin stimulus (GO:0032869)
260                                                   response to amyloid-beta (GO:1904645)
261              establishment of protein localization to extracellular region (GO:0035592)
262                                   regulation of cellular metabolic process (GO:0031323)
263                                    regulation of protein metabolic process (GO:0051246)
264                                positive regulation of cell differentiation (GO:0045597)
265                        negative regulation of cell projection organization (GO:0031345)
266                            positive regulation of fat cell differentiation (GO:0045600)
267                               negative regulation of BMP signaling pathway (GO:0030514)
268                       negative regulation of cellular biosynthetic process (GO:0031327)
269                                        positive regulation of phagocytosis (GO:0050766)
    Overlap Adjusted.P.value
1     28/51     3.291336e-55
2     29/71     1.134840e-52
3     29/72     1.264418e-52
4     16/24     1.003687e-32
5     15/21     2.203564e-31
6     20/77     5.273224e-31
7     19/70     7.882518e-30
8     12/13     1.520527e-27
9     13/18     2.514128e-27
10    12/17     5.731565e-25
11    15/49     2.711706e-24
12    12/21     2.245426e-23
13    15/59     5.665269e-23
14   17/109     2.748742e-22
15    12/25     3.145271e-22
16      9/9     2.283165e-21
17    12/31     7.414146e-21
18    13/55     1.935295e-19
19     9/12     4.196729e-19
20      8/9     5.374944e-18
21    10/25     1.639871e-17
22     8/10     2.436689e-17
23      7/7     1.679428e-16
24      7/9     5.763376e-15
25    11/64     8.362646e-15
26     7/13     2.508790e-13
27    11/92     5.133855e-13
28    10/64     5.133855e-13
29      6/9     3.296018e-12
30      6/9     3.296018e-12
31      6/9     3.296018e-12
32     6/11     1.693836e-11
33     6/11     1.693836e-11
34     8/41     3.013332e-11
35     6/12     3.013332e-11
36     6/12     3.013332e-11
37     6/12     3.013332e-11
38     7/25     4.654994e-11
39     6/13     5.294950e-11
40      5/6     5.459029e-11
41      5/6     5.459029e-11
42      5/6     5.459029e-11
43     6/15     1.393181e-10
44     7/33     3.496187e-10
45      5/8     4.627510e-10
46      5/8     4.627510e-10
47     7/35     5.017364e-10
48     7/35     5.017364e-10
49     6/19     6.556580e-10
50      5/9     9.553575e-10
51     6/21     1.253116e-09
52    9/104     1.493946e-09
53     6/22     1.653549e-09
54     6/23     2.189811e-09
55     6/25     3.733511e-09
56     8/77     3.733511e-09
57     5/12     5.225810e-09
58    9/124     6.552660e-09
59     6/29     9.279729e-09
60      4/5     9.798195e-09
61     5/14     1.207993e-08
62     5/14     1.207993e-08
63     6/31     1.339781e-08
64    9/136     1.355933e-08
65     6/33     1.942867e-08
66    9/143     2.054367e-08
67     6/34     2.282600e-08
68     5/16     2.390304e-08
69      4/6     2.513038e-08
70      4/6     2.513038e-08
71     7/63     2.556641e-08
72     6/35     2.556641e-08
73    8/105     3.517095e-08
74     6/38     4.196695e-08
75     5/18     4.228478e-08
76     6/39     4.816188e-08
77     7/71     5.609765e-08
78      4/8     1.033779e-07
79      4/8     1.033779e-07
80     7/80     1.258618e-07
81     5/23     1.517283e-07
82     5/26     2.906610e-07
83     4/10     2.936601e-07
84     7/92     3.199662e-07
85    8/143     3.471498e-07
86     4/11     4.442138e-07
87     5/29     4.906437e-07
88     4/13     9.252034e-07
89     4/13     9.252034e-07
90     6/65     9.598111e-07
91     5/35     1.249797e-06
92     4/14     1.249797e-06
93    8/180     1.884951e-06
94     4/16     2.212485e-06
95     6/76     2.336232e-06
96      3/5     3.664395e-06
97      3/5     3.664395e-06
98     5/44     3.827136e-06
99     4/21     6.819051e-06
100     3/6     6.952354e-06
101     3/6     6.952354e-06
102     3/6     6.952354e-06
103    5/50     6.991423e-06
104    4/23     9.554179e-06
105   7/158     1.040987e-05
106    4/24     1.121951e-05
107     3/7     1.146235e-05
108     3/7     1.146235e-05
109    4/27     1.788032e-05
110    5/65     2.452122e-05
111     3/9     2.639634e-05
112     3/9     2.639634e-05
113    4/31     3.060279e-05
114    3/10     3.695601e-05
115    4/33     3.856854e-05
116    4/33     3.856854e-05
117    3/11     4.775659e-05
118    3/11     4.775659e-05
119    3/11     4.775659e-05
120    3/11     4.775659e-05
121    3/11     4.775659e-05
122    5/80     6.182763e-05
123    4/40     7.973389e-05
124    3/13     7.973389e-05
125    3/13     7.973389e-05
126    3/15     1.252218e-04
127   7/242     1.420233e-04
128    4/48     1.598563e-04
129   8/345     1.704405e-04
130    4/49     1.709436e-04
131    3/18     2.111817e-04
132    3/18     2.111817e-04
133    3/18     2.111817e-04
134   8/369     2.646441e-04
135    3/20     2.892290e-04
136    3/21     3.341258e-04
137    3/24     4.974036e-04
138    3/24     4.974036e-04
139    3/25     5.597802e-04
140   5/130     5.616142e-04
141   6/214     6.166972e-04
142    3/27     6.934199e-04
143     2/5     7.406583e-04
144    4/73     7.449454e-04
145    3/28     7.586859e-04
146   5/141     7.898802e-04
147    3/30     9.228897e-04
148    4/80     1.034287e-03
149     2/6     1.049782e-03
150     2/6     1.049782e-03
151     2/6     1.049782e-03
152    3/32     1.085012e-03
153    4/84     1.208000e-03
154     2/7     1.428577e-03
155     2/7     1.428577e-03
156    4/91     1.611630e-03
157    3/37     1.625395e-03
158    3/38     1.749224e-03
159     2/8     1.841132e-03
160     2/8     1.841132e-03
161    3/39     1.855101e-03
162   5/177     2.046657e-03
163     2/9     2.304288e-03
164     2/9     2.304288e-03
165    3/43     2.420344e-03
166    3/44     2.575438e-03
167    2/10     2.756295e-03
168    2/10     2.756295e-03
169    2/10     2.756295e-03
170    2/10     2.756295e-03
171    2/10     2.756295e-03
172    2/11     3.303347e-03
173    2/11     3.303347e-03
174    2/11     3.303347e-03
175    3/49     3.337798e-03
176    3/49     3.337798e-03
177   4/114     3.341630e-03
178    2/12     3.781332e-03
179    2/12     3.781332e-03
180    2/12     3.781332e-03
181    2/12     3.781332e-03
182    2/12     3.781332e-03
183    3/52     3.822266e-03
184    3/54     4.245657e-03
185    2/13     4.386588e-03
186   4/125     4.489058e-03
187    3/56     4.645735e-03
188    2/14     4.945884e-03
189    2/14     4.945884e-03
190    2/14     4.945884e-03
191    2/14     4.945884e-03
192    3/58     4.985945e-03
193    3/58     4.985945e-03
194    2/15     5.548828e-03
195    2/15     5.548828e-03
196    2/15     5.548828e-03
197   6/345     5.596173e-03
198    3/61     5.626994e-03
199    3/63     6.147256e-03
200    2/16     6.200855e-03
201    3/66     6.840974e-03
202    2/17     6.840974e-03
203    2/17     6.840974e-03
204    2/17     6.840974e-03
205    2/17     6.840974e-03
206    3/67     7.093595e-03
207    2/18     7.532008e-03
208    2/18     7.532008e-03
209    2/18     7.532008e-03
210    2/19     8.241667e-03
211    2/19     8.241667e-03
212    2/19     8.241667e-03
213    2/19     8.241667e-03
214    2/20     9.094348e-03
215    2/21     9.982653e-03
216    2/22     1.085553e-02
217    2/22     1.085553e-02
218    3/83     1.230478e-02
219    3/83     1.230478e-02
220    2/24     1.273659e-02
221   6/417     1.291939e-02
222    3/85     1.298477e-02
223    3/86     1.336097e-02
224    2/25     1.350640e-02
225    2/25     1.350640e-02
226   4/180     1.399465e-02
227    3/89     1.440735e-02
228    2/26     1.440735e-02
229    3/90     1.479001e-02
230    2/27     1.539039e-02
231    2/28     1.646589e-02
232    2/29     1.757027e-02
233   4/194     1.771224e-02
234    2/30     1.862299e-02
235    2/31     1.977865e-02
236   3/102     2.036757e-02
237   4/203     2.042828e-02
238   4/206     2.141587e-02
239    2/33     2.198466e-02
240   3/106     2.228428e-02
241    2/34     2.311351e-02
242   4/212     2.328380e-02
243    2/35     2.415927e-02
244    2/35     2.415927e-02
245    2/36     2.531623e-02
246    2/36     2.531623e-02
247   3/114     2.646649e-02
248    2/37     2.648825e-02
249   3/116     2.742785e-02
250   3/116     2.742785e-02
251   3/118     2.842391e-02
252   3/118     2.842391e-02
253    2/39     2.842391e-02
254    2/39     2.842391e-02
255    2/39     2.842391e-02
256    2/39     2.842391e-02
257    2/40     2.973753e-02
258   3/123     3.119488e-02
259   3/129     3.533580e-02
260    2/44     3.533580e-02
261    2/46     3.834204e-02
262    2/47     3.980515e-02
263    2/48     4.128649e-02
264   4/258     4.183273e-02
265    2/49     4.262417e-02
266    2/51     4.583569e-02
267    2/52     4.720898e-02
268    2/52     4.720898e-02
269    2/53     4.877011e-02
                                                                                                                                                                       Genes
1         SCARB1;CETP;LCAT;LIPC;NPC1L1;LIPG;CD36;APOE;LDLRAP1;APOB;LDLR;ABCA1;ABCG8;STARD3;ABCG5;OSBPL5;APOA2;APOA1;APOC3;APOA4;APOA5;NPC1;SOAT1;STAR;NPC2;SOAT2;APOC2;APOC1
2   SCARB1;CETP;MTTP;PCSK9;LPL;LCAT;ABCB11;CYP7A1;LIPC;LIPG;APOE;LDLRAP1;APOB;LDLR;ABCA1;ABCG8;ABCG5;EPHX2;APOA2;APOA1;APOC3;APOA4;APOA5;SOAT1;NPC1;NPC2;SOAT2;APOC2;ANGPTL3
3   SCARB1;CETP;MTTP;PCSK9;LPL;LCAT;ABCB11;CYP7A1;LIPC;LIPG;APOE;LDLRAP1;APOB;LDLR;ABCA1;ABCG8;ABCG5;EPHX2;APOA2;APOA1;APOC3;APOA4;APOA5;SOAT1;NPC1;NPC2;SOAT2;APOC2;ANGPTL3
4                                                                              ABCA1;ABCG8;SCARB1;ABCG5;APOA2;APOA1;APOC3;APOA4;APOA5;NPC1;SOAT1;NPC2;SOAT2;APOC2;APOC1;APOE
5                                                                                    ABCG8;CETP;STARD3;ABCG5;OSBPL5;APOA2;APOA1;LCAT;NPC1;NPC1L1;NPC2;CD36;APOB;LDLRAP1;LDLR
6                                              ABCA1;STARD3;CETP;OSBPL5;APOA2;APOA1;LCAT;APOA4;HMGCR;APOA5;CYP7A1;CYP27A1;SOAT1;SOAT2;NPC1L1;ANGPTL3;APOE;DHCR7;LDLRAP1;APOB
7                                                      ABCA1;STARD3;CETP;OSBPL5;APOA2;APOA1;LCAT;APOA4;HMGCR;LIPA;CYP7A1;CYP27A1;SOAT1;SOAT2;ANGPTL3;APOE;DHCR7;LDLRAP1;APOB
8                                                                                                           CETP;LIPC;APOC2;APOA2;APOA1;APOC3;LCAT;LPL;APOA4;APOE;APOB;APOA5
9                                                                                                   CETP;SCARB1;APOA2;APOA1;APOC3;LCAT;APOA4;LIPC;APOC2;APOC1;LIPG;APOE;PLTP
10                                                                                                       ABCA1;CETP;SCARB1;LIPC;APOC2;LIPG;APOA2;APOA1;APOC3;LCAT;APOA4;APOE
11                                                                             ABCA1;STARD3;CETP;OSBPL5;APOA2;APOA1;LCAT;APOA4;CYP27A1;SOAT1;SOAT2;ANGPTL3;APOE;LDLRAP1;APOB
12                                                                                                   LIPC;SORT1;APOC2;APOH;APOC1;ANGPTL3;APOA1;APOC3;LPL;APOA4;ANGPTL4;APOA5
13                                                                                    ABCA1;SCARB1;OSBPL5;MTTP;APOA2;APOA1;APOC3;APOA4;APOA5;NPC2;APOC2;APOC1;APOE;LDLR;PLTP
14                                                                        ABCA1;SCARB1;ABCG8;CETP;ABCG5;OSBPL5;MTTP;APOA1;APOA4;ABCB11;APOA5;NPC2;NPC1L1;CD36;APOE;LDLR;PLTP
15                                                                                                   CETP;SCARB1;LIPC;APOC2;ANGPTL3;LPL;APOA1;APOC3;APOA4;APOE;ANGPTL4;APOA5
16                                                                                                                           CETP;LIPC;APOC2;APOA1;LCAT;LPL;APOA4;APOE;APOA5
17                                                                                                   CETP;SCARB1;LIPC;APOC2;ANGPTL3;LPL;APOA1;APOC3;APOA4;APOE;ANGPTL4;APOA5
18                                                                                                      CETP;APOA2;LPL;APOC3;APOA5;LIPC;LIPI;APOH;LIPG;APOC1;APOE;APOB;LPIN3
19                                                                                                                      ABCA1;APOC2;APOC1;APOA2;APOA1;APOC3;APOA4;APOE;APOA5
20                                                                                                                               APOC2;APOA2;APOA1;APOC3;LPL;APOA4;APOE;APOB
21                                                                                                                   CETP;LRP1;APOC2;LIPG;APOC1;APOA2;TSPO;APOA1;APOA4;APOA5
22                                                                                                                              APOC2;MTTP;APOA2;APOA1;APOC3;APOA4;APOE;APOB
23                                                                                                                                     LIPC;APOC2;APOC1;APOC3;APOE;APOB;LDLR
24                                                                                                                                  NPC1L1;MTTP;APOA2;APOA1;APOA4;APOE;APOA5
25                                                                                                               LRP1;ADH1B;APOC2;APOA2;APOA1;LPL;APOC3;APOA4;LRP2;APOE;APOB
26                                                                                                                                APOC1;APOA2;APOA1;APOA4;APOE;LDLRAP1;APOA5
27                                                                                                               LRP1;ADH1B;APOC2;APOA2;APOA1;LPL;APOC3;APOA4;LRP2;APOE;APOB
28                                                                                                               ABCA1;CETP;LIPG;ANGPTL3;APOA1;APOA4;PPARG;APOE;ABCB11;APOA5
29                                                                                                                                   SORT1;APOC1;ANGPTL3;APOA2;APOC3;ANGPTL4
30                                                                                                                                        APOC1;APOA2;APOA1;APOA4;APOE;APOA5
31                                                                                                                                        ABCG8;ABCG5;NPC1L1;SOAT2;CD36;LDLR
32                                                                                                                                       ABCG8;ABCG5;APOC2;APOC1;APOA2;APOC3
33                                                                                                                                        ABCG8;ABCG5;NPC1L1;SOAT2;CD36;LDLR
34                                                                                                                                CETP;APOH;APOC1;APOA2;LPL;APOC3;APOE;APOA5
35                                                                                                                                        APOC1;APOA2;APOA1;APOA4;APOE;APOA5
36                                                                                                                                      ABCA1;CETP;LIPG;ANGPTL3;APOA1;ABCB11
37                                                                                                                                         SOAT1;SOAT2;APOC1;MTTP;APOC3;APOB
38                                                                                                                                APOA2;ANGPTL3;APOA1;APOA4;PPARG;APOE;APOA5
39                                                                                                                                        ABCA1;APOA2;APOA1;APOA4;APOE;APOA5
40                                                                                                                                         SORT1;APOC1;ANGPTL3;APOC3;ANGPTL4
41                                                                                                                                            LRPAP1;APOC2;APOC1;APOC3;PCSK9
42                                                                                                                                             APOC2;APOA2;APOA1;APOC3;APOA5
43                                                                                                                                         ABCA1;NPC1;STAR;NPC2;LDLRAP1;LDLR
44                                                                                                                                      CETP;LRP1;LIPG;APOA1;PPARG;APOE;PLTP
45                                                                                                                                             ABCG8;ABCG5;APOA1;APOA4;APOA5
46                                                                                                                                              APOC2;APOH;APOA1;APOA4;APOA5
47                                                                                                                                      LIPC;LIPI;LIPG;APOA2;LPL;APOC3;APOA5
48                                                                                                                                  SCARB1;APOC2;APOA1;APOA4;APOE;LDLR;APOA5
49                                                                                                                                       SCARB1;APOC2;APOA1;APOA4;APOA5;LDLR
50                                                                                                                                              APOC2;APOH;APOA1;APOA4;APOA5
51                                                                                                                                    APOC1;APOA2;ANGPTL3;APOC3;ABCB11;APOA5
52                                                                                                                     CYP27A1;STARD3;NPC1;STAR;TSPO;LRP2;ABCB11;LIPA;CYP7A1
53                                                                                                                                     APOC2;APOA2;ANGPTL3;APOA1;APOA4;APOA5
54                                                                                                                                            LIPC;LIPI;LIPG;APOC3;LPL;APOA5
55                                                                                                                                         SCARB1;OSBPL5;NPC2;MTTP;LDLR;PLTP
56                                                                                                                              CETP;LIPC;APOA2;APOA1;LCAT;APOA4;APOA5;LPIN3
57                                                                                                                                             APOC2;APOA1;APOC3;APOA4;APOA5
58                                                                                                                        LIPC;LIPI;LIPG;ANGPTL3;LPL;PPARG;CD36;ABCB11;LPIN3
59                                                                                                                                       APOC2;APOC1;APOA1;APOC3;APOA4;APOA5
60                                                                                                                                                     LRP1;APOC1;TSPO;APOA4
61                                                                                                                                                 ABCA1;LPL;PPARG;CD36;LDLR
62                                                                                                                                                  CETP;LIPC;APOA2;APOB;LPA
63                                                                                                                                            ABCA1;CETP;LPL;PPARG;CD36;APOB
64                                                                                                                        ABCA1;ABCG8;CETP;ABCG5;APOA1;APOA4;LRP2;APOA5;PLTP
65                                                                                                                                           CETP;LRP1;APOA1;PPARG;APOE;PLTP
66                                                                                                                        SCARB1;LRP1;APOA1;CD36;LRP2;APOE;LDLRAP1;APOB;LDLR
67                                                                                                                                      NPC1L1;APOA1;APOA4;HMGCR;DHCR7;APOA5
68                                                                                                                                               ABCA1;SCARB1;LPL;PPARG;APOB
69                                                                                                                                                    SCARB1;APOA1;CD36;LDLR
70                                                                                                                                                    SCARB1;APOA1;CD36;LDLR
71                                                                                                                                  CYP27A1;LIPC;LIPI;LIPG;LPL;ABCB11;CYP7A1
72                                                                                                                                      NPC1L1;APOA1;APOA4;HMGCR;DHCR7;APOA5
73                                                                                                                            APOC1;APOA2;PCSK9;APOA1;APOA4;PPARG;APOE;APOA5
74                                                                                                                                      NPC1L1;APOA1;APOA4;HMGCR;DHCR7;APOA5
75                                                                                                                                             APOC2;APOA1;APOA4;PPARG;APOA5
76                                                                                                                                    LRPAP1;APOC2;APOC1;APOC3;LDLRAP1;APOA5
77                                                                                                                                      FADS3;LIPC;LIPI;EPHX2;LIPG;LPL;FADS1
78                                                                                                                                                    ABCA1;APOA1;APOC3;APOE
79                                                                                                                                                   APOC2;APOA1;APOA4;APOA5
80                                                                                                                                       LIPC;STAR;LIPI;LIPG;LPL;HMGCR;FADS1
81                                                                                                                                                LRP1;APOA1;PPARG;APOE;PLTP
82                                                                                                                                            LRPAP1;APOC2;APOC1;PCSK9;APOC3
83                                                                                                                                                      LRP1;PPARG;CD36;APOB
84                                                                                                                                  NPC2;APOC2;APOC1;APOC3;PPARG;HMGCR;DHCR7
85                                                                                                                            NPC1;ADH1B;ANGPTL3;LPL;PPARG;VDAC1;CD36;ABCB11
86                                                                                                                                                      LRP1;PPARG;CD36;APOB
87                                                                                                                                                  LIPC;LIPI;LIPG;LPL;APOA4
88                                                                                                                                                   APOC2;APOA1;APOA4;APOA5
89                                                                                                                                                      ABCA1;NPC1;STAR;NPC2
90                                                                                                                                    CYP27A1;STAR;HMGCR;DHCR7;ABCB11;CYP7A1
91                                                                                                                                               STAR;APOA1;APOA4;APOE;APOA5
92                                                                                                                                                    LIPC;APOA2;ANGPTL3;LPL
93                                                                                                                             SCARB1;STAR;APOC2;APOA1;APOA4;CD36;APOA5;LDLR
94                                                                                                                                                    LRPAP1;LRP1;HMGCR;APOE
95                                                                                                                                         LIPG;APOA2;ANGPTL3;LPL;LCAT;FADS1
96                                                                                                                                                         APOA1;APOA4;APOA5
97                                                                                                                                                            LRP1;LRP2;LDLR
98                                                                                                                                               APOA1;APOA4;APOE;CD36;APOA5
99                                                                                                                                                  EPHX2;APOE;LDLRAP1;KPNB1
100                                                                                                                                                        SOAT1;SOAT2;PPARG
101                                                                                                                                                          SCARB1;LPL;APOB
102                                                                                                                                                        SOAT1;SOAT2;PPARG
103                                                                                                                                        CYP27A1;HMGCR;DHCR7;ABCB11;CYP7A1
104                                                                                                                                                   STAR;EPHX2;APOE;ABCB11
105                                                                                                                                    VAPA;VAPB;APOA2;APOA1;LCAT;APOE;LPIN3
106                                                                                                                                                  APOC2;APOC1;APOA2;APOC3
107                                                                                                                                                           LRP1;LRP2;LDLR
108                                                                                                                                                         LRPAP1;LRP1;APOE
109                                                                                                                                                 LIPG;APOA2;ANGPTL3;LPIN3
110                                                                                                                                          CETP;ANGPTL3;APOA4;PPARG;ABCB11
111                                                                                                                                                      CYP27A1;APOE;CYP7A1
112                                                                                                                                                      CYP27A1;APOE;CYP7A1
113                                                                                                                                                   STARD3;STAR;TSPO;DHCR7
114                                                                                                                                                      APOC3;PCSK9;LDLRAP1
115                                                                                                                                               CYP27A1;NPC1;ABCB11;CYP7A1
116                                                                                                                                                   APOA2;LCAT;APOA1;LPIN3
117                                                                                                                                                      CYP27A1;APOE;CYP7A1
118                                                                                                                                                       LIPG;ANGPTL3;APOA2
119                                                                                                                                                       LRP1;APOC2;ANGPTL3
120                                                                                                                                                            LRP1;LPL;APOB
121                                                                                                                                                          CETP;APOA1;APOE
122                                                                                                                                              CETP;APOA1;LCAT;APOA4;APOA5
123                                                                                                                                                  ABCG8;ABCG5;NPC2;ABCB11
124                                                                                                                                                         ABCA1;CETP;PPARG
125                                                                                                                                                           CETP;LRP1;APOE
126                                                                                                                                                         STARD3;STAR;TSPO
127                                                                                                                                    NPC1;VAPA;VAPB;LRP2;LDLRAP1;APOB;LDLR
128                                                                                                                                                  LRP1;APOE;LDLRAP1;APOA5
129                                                                                                                              GHR;ABCA1;LRPAP1;LRP1;APOC2;CD36;APOE;APOA5
130                                                                                                                                                  APOC1;APOA2;APOC3;HMGCR
131                                                                                                                                                        APOC1;APOA2;APOC3
132                                                                                                                                                         SCARB1;NPC2;PLTP
133                                                                                                                                                            LPL;CD36;APOB
134                                                                                                                                ABCA1;LRP1;MTTP;PPARG;CD36;LRP2;APOE;APOB
135                                                                                                                                                          PPARG;APOE;CD36
136                                                                                                                                                          SCARB1;LPL;APOB
137                                                                                                                                                         STARD3;STAR;TSPO
138                                                                                                                                                       LIPG;APOA2;ANGPTL3
139                                                                                                                                                        APOC2;APOC1;APOC3
140                                                                                                                                              PPARG;HMGCR;APOE;DHCR7;LDLR
141                                                                                                                                     LRPAP1;APOA2;APOA1;APOC3;APOA4;HMGCR
142                                                                                                                                                    CYP27A1;ABCB11;CYP7A1
143                                                                                                                                                               PCSK9;APOE
144                                                                                                                                                   ABCA1;APOA1;APOC3;APOE
145                                                                                                                                                        EPHX2;APOE;ABCB11
146                                                                                                                                             APOC2;APOA1;APOA4;APOE;APOA5
147                                                                                                                                                        LRP1;ANGPTL3;LRP2
148                                                                                                                                                  APOA2;APOA1;APOC3;APOA4
149                                                                                                                                                                NPC2;PLTP
150                                                                                                                                                             LIPG;LDLRAP1
151                                                                                                                                                                CETP;LIPG
152                                                                                                                                                          PPARG;APOE;CD36
153                                                                                                                                                  SORT1;PCSK9;PPARG;LPIN3
154                                                                                                                                                            ABCB11;CYP7A1
155                                                                                                                                                               PCSK9;APOE
156                                                                                                                                                    LRP1;APOA2;APOA1;APOE
157                                                                                                                                                          APOH;PPARG;APOE
158                                                                                                                                                          APOH;PPARG;APOE
159                                                                                                                                                                APOE;LDLR
160                                                                                                                                                             LRPAP1;HMGCR
161                                                                                                                                                        LRPAP1;PCSK9;APOE
162                                                                                                                                              LIPI;APOA2;APOA1;LCAT;LPIN3
163                                                                                                                                                              APOA2;APOA1
164                                                                                                                                                              FADS3;FADS1
165                                                                                                                                                         TSPO;VDAC2;VDAC1
166                                                                                                                                                      PCSK9;LDLRAP1;APOA5
167                                                                                                                                                              ABCA1;PPARG
168                                                                                                                                                              STAR;CYP7A1
169                                                                                                                                                              APOA2;APOA1
170                                                                                                                                                              MYLIP;PCSK9
171                                                                                                                                                              MYLIP;PCSK9
172                                                                                                                                                              APOA2;APOA1
173                                                                                                                                                                VAPA;APOE
174                                                                                                                                                              SCARB1;LDLR
175                                                                                                                                                        LRP1;CD36;LDLRAP1
176                                                                                                                                                         APOA2;LPL;CYP7A1
177                                                                                                                                                    LRP1;APOC2;APOE;APOA5
178                                                                                                                                                              APOC1;APOC3
179                                                                                                                                                                APOH;APOE
180                                                                                                                                                              APOA2;APOA1
181                                                                                                                                                              ALDH2;ADH1B
182                                                                                                                                                                APOE;LDLR
183                                                                                                                                                          HMGCR;APOE;LDLR
184                                                                                                                                                        FADS3;FADS2;FADS1
185                                                                                                                                                              FADS2;FADS1
186                                                                                                                                                    ITIH4;APOH;APOA1;CD36
187                                                                                                                                                        APOC2;APOC1;APOC3
188                                                                                                                                                                APOE;LDLR
189                                                                                                                                                                APOH;APOE
190                                                                                                                                                                APOE;CD36
191                                                                                                                                                              NPC1L1;CD36
192                                                                                                                                                        LRP1;CD36;LDLRAP1
193                                                                                                                                                       SCARB1;APOA2;APOA1
194                                                                                                                                                                APOE;LDLR
195                                                                                                                                                                LPL;PPARG
196                                                                                                                                                              SCARB1;LDLR
197                                                                                                                                        APOA2;PCSK9;APOA1;APOE;APOB;APOA5
198                                                                                                                                                         LRPAP1;LRP1;APOE
199                                                                                                                                                         APOA1;APOA4;CD36
200                                                                                                                                                            PPARG;LDLRAP1
201                                                                                                                                                          PCSK9;LPL;FADS1
202                                                                                                                                                              APOA2;APOA1
203                                                                                                                                                              APOC1;APOC3
204                                                                                                                                                               APOE;KPNB1
205                                                                                                                                                              STAR;CYP7A1
206                                                                                                                                                      APOA2;ANGPTL3;APOA5
207                                                                                                                                                             APOE;LDLRAP1
208                                                                                                                                                                APOE;CD36
209                                                                                                                                                              SCARB1;APOE
210                                                                                                                                                              ALDH2;ADH1B
211                                                                                                                                                               PCSK9;APOE
212                                                                                                                                                                 LPL;CD36
213                                                                                                                                                                APOE;LDLR
214                                                                                                                                                              ABCA1;PPARG
215                                                                                                                                                              FADS2;FADS1
216                                                                                                                                                              APOC1;APOC3
217                                                                                                                                                                 LPL;APOB
218                                                                                                                                                           APOA1;LPL;CD36
219                                                                                                                                                        FADS2;EPHX2;FADS1
220                                                                                                                                                              APOA2;APOA1
221                                                                                                                                        APOA2;PCSK9;APOA1;APOE;APOB;APOA5
222                                                                                                                                                         APOA1;PPARG;APOE
223                                                                                                                                                           LRP1;CD36;LRP2
224                                                                                                                                                              MYLIP;PCSK9
225                                                                                                                                                                APOA2;LPL
226                                                                                                                                                    ITIH4;APOH;APOA1;CD36
227                                                                                                                                                         SCARB1;APOH;APOE
228                                                                                                                                                               HMGCR;APOE
229                                                                                                                                                          LRP1;PPARG;APOE
230                                                                                                                                                                APOH;APOE
231                                                                                                                                                              SCARB1;APOE
232                                                                                                                                                                APOH;APOE
233                                                                                                                                                   LRPAP1;PCSK9;APOE;LDLR
234                                                                                                                                                              EPHX2;FADS1
235                                                                                                                                                                 GHR;APOE
236                                                                                                                                                         LRPAP1;LRP1;CD36
237                                                                                                                                               APOH;ANGPTL3;PPARG;ANGPTL4
238                                                                                                                                                     APOA1;LPL;PPARG;APOE
239                                                                                                                                                              SCARB1;LRP1
240                                                                                                                                                        PCSK9;PPARG;LPIN3
241                                                                                                                                                               PPARG;APOE
242                                                                                                                                                   EPHX2;ANGPTL3;LPL;LCAT
243                                                                                                                                                                APOH;APOE
244                                                                                                                                                                LRP1;CD36
245                                                                                                                                                                APOE;CD36
246                                                                                                                                                             LRPAP1;PCSK9
247                                                                                                                                                         APOA4;PPARG;CD36
248                                                                                                                                                            PPARG;LDLRAP1
249                                                                                                                                                          ABCA1;CD36;APOE
250                                                                                                                                                         TSPO;VDAC2;VDAC1
251                                                                                                                                                         APOA1;PPARG;APOE
252                                                                                                                                                      LRPAP1;LRP1;LDLRAP1
253                                                                                                                                                                APOE;CD36
254                                                                                                                                                               HMGCR;APOE
255                                                                                                                                                               HMGCR;APOE
256                                                                                                                                                              SCARB1;APOE
257                                                                                                                                                                APOH;APOE
258                                                                                                                                                         GHR;LRP2;LDLRAP1
259                                                                                                                                                        PCSK9;PPARG;LPIN3
260                                                                                                                                                                LRP1;CD36
261                                                                                                                                                               ABCA1;MTTP
262                                                                                                                                                              NPC2;ABCB11
263                                                                                                                                                                APOE;LDLR
264                                                                                                                                                      LPL;PPARG;CD36;APOB
265                                                                                                                                                               MYLIP;APOE
266                                                                                                                                                                LPL;PPARG
267                                                                                                                                                               PPARG;LRP2
268                                                                                                                                                              APOC1;APOC3
269                                                                                                                                                              APOA2;APOA1
[1] "GO_Cellular_Component_2021"
                                                          Term Overlap
1               high-density lipoprotein particle (GO:0034364)   12/19
2                                     chylomicron (GO:0042627)   10/10
3   triglyceride-rich plasma lipoprotein particle (GO:0034385)   10/15
4           very-low-density lipoprotein particle (GO:0034361)   10/15
5                                  early endosome (GO:0005769)  13/266
6                low-density lipoprotein particle (GO:0034362)     4/7
7     spherical high-density lipoprotein particle (GO:0034366)     4/8
8                     endoplasmic reticulum lumen (GO:0005788)  10/285
9                      endocytic vesicle membrane (GO:0030666)   8/158
10                 endoplasmic reticulum membrane (GO:0005789)  14/712
11                                       lysosome (GO:0005764)  11/477
12                                  lytic vacuole (GO:0000323)   8/219
13                              endocytic vesicle (GO:0030139)   7/189
14     clathrin-coated endocytic vesicle membrane (GO:0030669)    5/69
15              clathrin-coated endocytic vesicle (GO:0045334)    5/85
16               clathrin-coated vesicle membrane (GO:0030665)    5/90
17                             lysosomal membrane (GO:0005765)   8/330
18                  intracellular organelle lumen (GO:0070013)  12/848
19       collagen-containing extracellular matrix (GO:0062023)   8/380
20                        endocytic vesicle lumen (GO:0071682)    3/21
21                       organelle outer membrane (GO:0031968)   5/142
22 ATP-binding cassette (ABC) transporter complex (GO:0043190)     2/6
23                         lytic vacuole membrane (GO:0098852)   6/267
24                              endosome membrane (GO:0010008)   6/325
25                   mitochondrial outer membrane (GO:0005741)   4/126
26                   platelet dense granule lumen (GO:0031089)    2/14
27                                        vesicle (GO:0031982)   5/226
28                          endolysosome membrane (GO:0036020)    2/17
29                    basolateral plasma membrane (GO:0016323)   4/151
30                   cytoplasmic vesicle membrane (GO:0030659)   6/380
31                         platelet dense granule (GO:0042827)    2/21
32                                lysosomal lumen (GO:0043202)    3/86
33                                   endolysosome (GO:0036019)    2/25
34                        secretory granule lumen (GO:0034774)   5/316
35                          brush border membrane (GO:0031526)    2/37
36                         mitochondrial envelope (GO:0005740)   3/127
37       extracellular membrane-bounded organelle (GO:0065010)    2/56
38                          extracellular vesicle (GO:1903561)    2/59
39                                 vacuolar lumen (GO:0005775)   3/161
40                                        caveola (GO:0005901)    2/60
   Adjusted.P.value
1      5.261200e-24
2      6.209923e-24
3      9.203512e-21
4      9.203512e-21
5      1.246888e-10
6      7.731648e-08
7      1.321996e-07
8      6.153361e-07
9      8.075627e-07
10     1.200431e-06
11     6.211359e-06
12     7.353950e-06
13     2.938912e-05
14     2.938912e-05
15     7.671871e-05
16     9.509306e-05
17     1.065748e-04
18     1.698308e-04
19     2.574496e-04
20     2.574496e-04
21     6.432532e-04
22     8.164449e-04
23     1.420908e-03
24     3.827987e-03
25     3.898444e-03
26     4.116966e-03
27     4.199032e-03
28     5.675277e-03
29     6.551600e-03
30     6.795770e-03
31     7.845057e-03
32     1.043474e-02
33     1.043474e-02
34     1.423039e-02
35     2.126720e-02
36     2.763580e-02
37     4.460396e-02
38     4.700422e-02
39     4.700422e-02
40     4.700422e-02
                                                                                Genes
1                  CETP;APOC2;APOH;APOC1;APOA2;APOA1;APOC3;LCAT;APOA4;APOE;APOA5;PLTP
2                            APOC2;APOH;APOC1;APOA2;APOA1;APOC3;APOA4;APOE;APOB;APOA5
3                            APOC2;APOH;APOC1;APOA2;APOA1;APOC3;APOA4;APOE;APOB;APOA5
4                            APOC2;APOH;APOC1;APOA2;APOA1;APOC3;APOA4;APOE;APOB;APOA5
5          LRP1;SORT1;APOA2;PCSK9;APOA1;APOC3;APOA4;APOC2;LIPG;APOE;LDLRAP1;APOB;LDLR
6                                                               APOC2;APOE;APOB;APOA5
7                                                             APOC2;APOA2;APOA1;APOC3
8                            LRPAP1;LIPC;MTTP;APOA2;PCSK9;APOA1;APOA4;APOE;APOB;APOA5
9                                        SCARB1;LRP1;CD36;LRP2;APOE;LDLRAP1;APOB;LDLR
10 ABCA1;STARD3;HMGCR;CYP7A1;FADS2;NCEH1;SOAT1;VAPA;SOAT2;VAPB;DHCR7;APOB;FADS1;LPIN3
11                       SCARB1;STARD3;NPC1;LRP1;NPC2;SORT1;PCSK9;LRP2;APOB;LIPA;LDLR
12                                        SCARB1;NPC1;NPC2;SORT1;PCSK9;LRP2;LIPA;LDLR
13                                             ABCA1;SCARB1;LRP1;APOA1;CD36;APOE;APOB
14                                                        LRP2;APOE;LDLRAP1;APOB;LDLR
15                                                        LRP2;APOE;LDLRAP1;APOB;LDLR
16                                                        LRP2;APOE;LDLRAP1;APOB;LDLR
17                                       SCARB1;STARD3;NPC1;LRP1;VAPA;PCSK9;LRP2;LDLR
18              CYP27A1;LIPC;ALDH2;MTTP;APOA2;PCSK9;APOA1;APOA4;APOE;APOB;APOA5;KPNB1
19                                  ITIH4;APOH;ANGPTL3;APOA1;APOC3;APOA4;ANGPTL4;APOE
20                                                                    APOA1;APOE;APOB
21                                                       VDAC3;TSPO;VDAC2;VDAC1;DHCR7
22                                                                        ABCG8;ABCG5
23                                                 SCARB1;STARD3;NPC1;LRP1;PCSK9;LRP2
24                                                STARD3;SORT1;PCSK9;ABCB11;APOB;LDLR
25                                                             VDAC3;TSPO;VDAC2;VDAC1
26                                                                         ITIH4;APOH
27                                                         ABCA1;CETP;VAPA;APOA1;APOE
28                                                                         PCSK9;LDLR
29                                                              LRP1;MTTP;ABCB11;LDLR
30                                                   SCARB1;LRP1;SORT1;CD36;APOB;LDLR
31                                                                         ITIH4;APOH
32                                                                     NPC2;APOB;LIPA
33                                                                         PCSK9;LDLR
34                                                        ITIH4;NPC2;APOH;APOA1;KPNB1
35                                                                          LRP2;CD36
36                                                                   STAR;VDAC2;VDAC1
37                                                                         APOA1;APOE
38                                                                         APOA1;APOE
39                                                                     NPC2;APOB;LIPA
40                                                                        SCARB1;CD36
[1] "GO_Molecular_Function_2021"
                                                                                                                                                                                Term
1                                                                                                                                                   cholesterol binding (GO:0015485)
2                                                                                                                                                        sterol binding (GO:0032934)
3                                                                                                                                         cholesterol transfer activity (GO:0120020)
4                                                                                                                                              sterol transfer activity (GO:0120015)
5                                                                                                                                 lipoprotein particle receptor binding (GO:0070325)
6                                                                                                       phosphatidylcholine-sterol O-acyltransferase activator activity (GO:0060228)
7                                                                                                                                          lipoprotein particle binding (GO:0071813)
8                                                                                                                              low-density lipoprotein particle binding (GO:0030169)
9                                                                                                                                             lipase inhibitor activity (GO:0055102)
10                                                                                                                    low-density lipoprotein particle receptor binding (GO:0050750)
11                                                                                                                                          lipoprotein lipase activity (GO:0004465)
12                                                                                                                                                 amyloid-beta binding (GO:0001540)
13                                                                                                                                         triglyceride lipase activity (GO:0004806)
14                                                                                                                                                      lipase activity (GO:0016298)
15                                                                                                                                                       lipase binding (GO:0035473)
16                                                                                                                                           apolipoprotein A-I binding (GO:0034186)
17                                                                                                                                      apolipoprotein receptor binding (GO:0034190)
18                                                                                                                                            phospholipase A1 activity (GO:0008970)
19                                                                                                                                            lipase activator activity (GO:0060229)
20                                                                                                                                  carboxylic ester hydrolase activity (GO:0052689)
21                                                                                                                                 voltage-gated anion channel activity (GO:0008308)
22                                                                                                                                   voltage-gated ion channel activity (GO:0005244)
23                                                                                                                             phosphatidylcholine transporter activity (GO:0008525)
24                                                                                                                                  protein heterodimerization activity (GO:0046982)
25                                                                                                                                phosphatidylcholine transfer activity (GO:0120019)
26                                                                                                                                               phospholipase activity (GO:0004620)
27                                                                                                                                           O-acyltransferase activity (GO:0008374)
28                                                                                                                            high-density lipoprotein particle binding (GO:0008035)
29                                                                                                                                           ceramide transfer activity (GO:0120017)
30                                                                                                                                         clathrin heavy chain binding (GO:0032050)
31                                                                                                                                     phospholipase inhibitor activity (GO:0004859)
32                                                                                                                                    protein homodimerization activity (GO:0042803)
33                                                                                                                                               anion channel activity (GO:0005253)
34                                                                                                                                       phospholipid transfer activity (GO:0120014)
35 oxidoreductase activity, acting on paired donors, with incorporation or reduction of molecular oxygen, NAD(P)H as one donor, and incorporation of one atom of oxygen (GO:0016709)
36                                                                                                                                         steroid hydroxylase activity (GO:0008395)
37                                                                                                                                                         NADP binding (GO:0050661)
38                                                                                                                                         peptidase inhibitor activity (GO:0030414)
39                                                                                                                                     endopeptidase regulator activity (GO:0061135)
   Overlap Adjusted.P.value
1    17/50     2.288174e-28
2    17/60     4.390322e-27
3    11/18     5.744987e-22
4    11/19     1.020647e-21
5    10/28     4.677379e-17
6      6/6     3.484605e-14
7     8/24     2.055320e-13
8     6/17     3.140441e-10
9     5/10     1.805253e-09
10    6/23     2.016360e-09
11     4/5     9.113232e-09
12    7/80     1.430772e-07
13    5/23     1.612041e-07
14    6/49     1.859889e-07
15     3/5     3.788104e-06
16     3/5     3.788104e-06
17     3/6     7.112969e-06
18    3/10     3.991032e-05
19    3/12     6.897596e-05
20    5/96     1.501407e-04
21    3/16     1.501407e-04
22    3/16     1.501407e-04
23    3/18     2.082322e-04
24   6/188     3.016202e-04
25     2/5     7.035280e-04
26    4/73     7.035280e-04
27    3/30     8.567836e-04
28     2/6     9.653527e-04
29     2/8     1.732107e-03
30     2/9     2.147965e-03
31    2/10     2.592555e-03
32   8/636     7.345938e-03
33    3/68     7.879809e-03
34    2/22     1.181407e-02
35    2/36     2.870121e-02
36    2/36     2.870121e-02
37    2/36     2.870121e-02
38    2/40     3.429432e-02
39    2/46     4.375411e-02
                                                                                                Genes
1  ABCA1;STARD3;CETP;OSBPL5;APOA2;APOA1;APOC3;APOA4;APOA5;NPC1;SOAT1;STAR;NPC2;SOAT2;TSPO;VDAC2;VDAC1
2  ABCA1;STARD3;CETP;OSBPL5;APOA2;APOA1;APOC3;APOA4;APOA5;NPC1;SOAT1;STAR;NPC2;SOAT2;TSPO;VDAC2;VDAC1
3                                        ABCA1;ABCG8;CETP;ABCG5;NPC2;MTTP;APOA2;APOA1;APOA4;APOB;PLTP
4                                        ABCA1;ABCG8;CETP;ABCG5;NPC2;MTTP;APOA2;APOA1;APOA4;APOB;PLTP
5                                         LRPAP1;LRP1;APOA2;PCSK9;APOA1;APOC3;APOE;APOB;LDLRAP1;APOA5
6                                                                  APOC1;APOA2;APOA1;APOA4;APOE;APOA5
7                                                          SCARB1;LIPC;APOA2;LPL;PCSK9;CD36;LDLR;PLTP
8                                                                    SCARB1;LIPC;PCSK9;CD36;LDLR;PLTP
9                                                                     APOC2;APOC1;ANGPTL3;APOA2;APOC3
10                                                               LRPAP1;PCSK9;APOE;APOB;LDLRAP1;APOA5
11                                                                                 LIPC;LIPI;LIPG;LPL
12                                                           LRPAP1;LRP1;APOA1;CD36;APOE;LDLRAP1;LDLR
13                                                                            LIPC;LIPI;LIPG;LCAT;LPL
14                                                                       LIPC;LIPI;LIPG;LCAT;LPL;LIPA
15                                                                                  LRPAP1;APOB;APOA5
16                                                                                  ABCA1;SCARB1;LCAT
17                                                                                  APOA2;APOA1;PCSK9
18                                                                                      LIPC;LIPG;LPL
19                                                                                   APOC2;APOH;APOA5
20                                                                            LIPC;LIPG;LPL;LCAT;LIPA
21                                                                                  VDAC3;VDAC2;VDAC1
22                                                                                  VDAC3;VDAC2;VDAC1
23                                                                                    ABCA1;MTTP;PLTP
24                                                                   ABCG8;ABCG5;VAPA;VAPB;MTTP;APOA2
25                                                                                          MTTP;PLTP
26                                                                                 LIPC;LIPI;LIPG;LPL
27                                                                                   SOAT1;SOAT2;LCAT
28                                                                                         APOA2;PLTP
29                                                                                          MTTP;PLTP
30                                                                                          LRP1;LDLR
31                                                                                      APOC1;ANGPTL3
32                                                         GHR;STARD3;VAPB;EPHX2;APOA2;LPL;APOA4;APOE
33                                                                                  VDAC3;VDAC2;VDAC1
34                                                                                          MTTP;PLTP
35                                                                                     CYP27A1;CYP7A1
36                                                                                     CYP27A1;CYP7A1
37                                                                                        HMGCR;DHCR7
38                                                                                          ITIH4;LPA
39                                                                                          ITIH4;LPA
GO_known_annotations <- do.call(rbind, GO_enrichment)
GO_known_annotations <- GO_known_annotations[GO_known_annotations$Adjusted.P.value<0.05,]

#GO enrichment analysis for cTWAS genes

genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]
GO_enrichment <- enrichr(genes, dbs)
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
GO_ctwas_genes <- do.call(rbind, GO_enrichment)

#optionally subset to only significant GO terms
#GO_ctwas_genes <- GO_ctwas_genes[GO_ctwas_genes$Adjusted.P.value<0.05,]

#identify cTWAS genes in silver standard enriched GO terms
GO_ctwas_genes <- GO_ctwas_genes[GO_ctwas_genes$Term %in% GO_known_annotations$Term,]

overlap_genes <- lapply(GO_ctwas_genes$Genes, function(x){unlist(strsplit(x, ";"))})
overlap_genes <- -sort(-table(unlist(overlap_genes)))

#ctwas genes in silver standard enriched GO terms, not already in silver standard
overlap_genes[!(names(overlap_genes) %in% known_annotations)]

    PGP   PSMB7    GNB4    PCCB WASHC2C   MSRB1  NKX2-5 
      4       4       3       2       2       1       1 
save(overlap_genes, file=paste0(results_dir, "/overlap_genes.Rd"))
load(paste0(results_dir, "/overlap_genes.Rd"))

overlap_genes <- overlap_genes[!(names(overlap_genes) %in% known_annotations)]
overlap_genes

    PGP   PSMB7    GNB4    PCCB WASHC2C   MSRB1  NKX2-5 
      4       4       3       2       2       1       1 
overlap_genes <- names(overlap_genes)
#ctwas_gene_res[ctwas_gene_res$genename %in% overlap_genes, report_cols,]

Results for Paper

out_table <- ctwas_gene_res

report_cols <- report_cols[!(report_cols %in% c("mu2", "PVE"))]
report_cols <- c(report_cols,"silver","GO_overlap_silver", "bystander")

#reload silver standard genes
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
* `` -> ...4
* `` -> ...5
known_annotations <- unique(known_annotations$`Gene Symbol`)

out_table$silver <- F
out_table$silver[out_table$genename %in% known_annotations] <- T

library(biomaRt)
library(GenomicRanges)
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:dplyr':

    combine, intersect, setdiff, union
The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min
Loading required package: S4Vectors

Attaching package: 'S4Vectors'
The following objects are masked from 'package:dplyr':

    first, rename
The following object is masked from 'package:tidyr':

    expand
The following object is masked from 'package:base':

    expand.grid
Loading required package: IRanges

Attaching package: 'IRanges'
The following objects are masked from 'package:dplyr':

    collapse, desc, slice
The following object is masked from 'package:purrr':

    reduce
Loading required package: GenomeInfoDb
ensembl <- useEnsembl(biomart="ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
G_list <- getBM(filters= "chromosome_name", attributes= c("hgnc_symbol","chromosome_name","start_position","end_position","gene_biotype"), values=1:22, mart=ensembl)
G_list <- G_list[G_list$hgnc_symbol!="",]
G_list <- G_list[G_list$gene_biotype %in% c("protein_coding","lncRNA"),]
G_list$start <- G_list$start_position
G_list$end <- G_list$end_position
G_list_granges <- makeGRangesFromDataFrame(G_list, keep.extra.columns=T)

known_annotations_positions <- G_list[G_list$hgnc_symbol %in% known_annotations,]
half_window <- 1000000
known_annotations_positions$start <- known_annotations_positions$start_position - half_window
known_annotations_positions$end <- known_annotations_positions$end_position + half_window
known_annotations_positions$start[known_annotations_positions$start<1] <- 1
known_annotations_granges <- makeGRangesFromDataFrame(known_annotations_positions, keep.extra.columns=T)

bystanders_extended <- findOverlaps(known_annotations_granges,G_list_granges)
bystanders_extended <- unique(subjectHits(bystanders_extended))
bystanders_extended <- G_list$hgnc_symbol[bystanders_extended]
bystanders_extended <- unique(bystanders_extended[!(bystanders_extended %in% known_annotations)])

save(bystanders_extended, file=paste0(results_dir, "/bystanders_extended.Rd"))

load(paste0(results_dir, "/bystanders_extended.Rd"))

#add extended bystanders list to output
out_table$bystander <- F
out_table$bystander[out_table$genename %in% bystanders_extended] <- T

#reload GO overlaps with silver standard
load(paste0(results_dir, "/overlap_genes.Rd"))

out_table$GO_overlap_silver <- NA
out_table$GO_overlap_silver[out_table$susie_pip>0.8] <- 0

for (i in names(overlap_genes)){
  out_table$GO_overlap_silver[out_table$genename==i] <- overlap_genes[i]
}

cTWAS identifies high-confidence liver genes associated with LDL cholesterol

full.gene.pip.summary <- data.frame(gene_name = ctwas_gene_res$genename, 
                                    gene_pip = ctwas_gene_res$susie_pip, 
                                    gene_id = ctwas_gene_res$id, 
                                    chr = as.integer(ctwas_gene_res$chrom),
                                    start = ctwas_gene_res$pos / 1e3,
                                    is_highlight = F, stringsAsFactors = F) %>% as_tibble()
full.gene.pip.summary$is_highlight <- full.gene.pip.summary$gene_pip > 0.80

don <- full.gene.pip.summary %>% 
  
  # Compute chromosome size
  group_by(chr) %>% 
  summarise(chr_len=max(start)) %>% 
  
  # Calculate cumulative position of each chromosome
  mutate(tot=cumsum(chr_len)-chr_len) %>%
  dplyr::select(-chr_len) %>%
  
  # Add this info to the initial dataset
  left_join(full.gene.pip.summary, ., by=c("chr"="chr")) %>%
  
  # Add a cumulative position of each SNP
  arrange(chr, start) %>%
  mutate( BPcum=start+tot)

axisdf <- don %>% group_by(chr) %>% summarize(center=( max(BPcum) + min(BPcum) ) / 2 )

x_axis_labels <- axisdf$chr
x_axis_labels[seq(1,21,2)] <- ""

ggplot(don, aes(x=BPcum, y=gene_pip)) +
  
  # Show all points
  ggrastr::geom_point_rast(aes(color=as.factor(chr)), size=2) +
  scale_color_manual(values = rep(c("grey", "skyblue"), 22 )) +
  
  # custom X axis:
  # scale_x_continuous(label = axisdf$chr, 
  #                    breaks= axisdf$center,
  #                    guide = guide_axis(n.dodge = 2)) +
  scale_x_continuous(label = x_axis_labels,
                     breaks = axisdf$center) +
  
  scale_y_continuous(expand = c(0, 0), limits = c(0,1.25), breaks=(1:5)*0.2, minor_breaks=(1:10)*0.1) + # remove space between plot area and x axis
  
  # Add highlighted points
  ggrastr::geom_point_rast(data=subset(don, is_highlight==T), color="orange", size=2) +
  
  # Add label using ggrepel to avoid overlapping
  ggrepel::geom_label_repel(data=subset(don, is_highlight==T), 
                            aes(label=gene_name), 
                            size=4,
                            min.segment.length = 0, 
                            label.size = NA,
                            fill = alpha(c("white"),0)) +
  
  # Custom the theme:
  theme_bw() +
  theme( 
    text = element_text(size = 14),
    legend.position="none",
    panel.border = element_blank(),
    panel.grid.major.x = element_blank(),
    panel.grid.minor.x = element_blank()
  ) +
  xlab("Chromosome") + 
  ylab("cTWAS PIP")

#number of SNPs at PIP>0.8 threshold
sum(out_table$susie_pip>0.8)
[1] 19
#number of SNPs at PIP>0.5 threshold
sum(out_table$susie_pip>0.5)
[1] 60
#genes with PIP>0.8
head(out_table[order(-out_table$susie_pip),report_cols], sum(out_table$susie_pip>0.8))
       genename region_tag susie_pip         z num_eqtl silver
3169      PRRX1       1_84 0.9999999 14.848088        2  FALSE
3147      WIPF1      2_105 0.9993101  8.987351        2  FALSE
2431    DNAJC12      10_44 0.9967458 -5.328244        1  FALSE
1214      GMCL1       2_46 0.9944249 -8.434995        2  FALSE
9840     NKX2-5      5_103 0.9942183 -9.616279        2  FALSE
10979     MSRB1       16_2 0.9667967  5.929412        1  FALSE
9417       PLEC       8_94 0.9666163  3.093844        2  FALSE
6663       JAM2       21_9 0.9633616  4.569598        2  FALSE
7794      KDM1B       6_14 0.9581444 -9.000000        1  FALSE
2987       GNB4      3_110 0.9537748 -5.869048        1  FALSE
11279      DPF3      14_34 0.9246749  6.100000        1  FALSE
2960       PCCB       3_84 0.9229236 -5.382353        1  FALSE
9960        PGP       16_2 0.9051693  5.943820        1  FALSE
1551    CCDC134      22_17 0.8683170 -5.180556        1  FALSE
12376 LINC01314      15_37 0.8300211 -4.379164        4  FALSE
4891        NPL       1_90 0.8251030 -3.825175        1  FALSE
5042      PSMB7       9_64 0.8211676 -4.820896        1  FALSE
8847    WASHC2C      10_31 0.8186904 -3.972152        1  FALSE
12133 LINC00964       8_82 0.8180590  4.554265        2  FALSE
      GO_overlap_silver bystander
3169                  0     FALSE
3147                  0     FALSE
2431                  0     FALSE
1214                  0     FALSE
9840                  1     FALSE
10979                 1     FALSE
9417                  0     FALSE
6663                  0     FALSE
7794                  0     FALSE
2987                  3     FALSE
11279                 0     FALSE
2960                  2     FALSE
9960                  4     FALSE
1551                  0     FALSE
12376                 0     FALSE
4891                  0     FALSE
5042                  4     FALSE
8847                  2     FALSE
12133                 0     FALSE
head(out_table[order(-out_table$susie_pip),report_cols[-(7:8)]], sum(out_table$susie_pip>0.8))
       genename region_tag susie_pip         z num_eqtl silver
3169      PRRX1       1_84 0.9999999 14.848088        2  FALSE
3147      WIPF1      2_105 0.9993101  8.987351        2  FALSE
2431    DNAJC12      10_44 0.9967458 -5.328244        1  FALSE
1214      GMCL1       2_46 0.9944249 -8.434995        2  FALSE
9840     NKX2-5      5_103 0.9942183 -9.616279        2  FALSE
10979     MSRB1       16_2 0.9667967  5.929412        1  FALSE
9417       PLEC       8_94 0.9666163  3.093844        2  FALSE
6663       JAM2       21_9 0.9633616  4.569598        2  FALSE
7794      KDM1B       6_14 0.9581444 -9.000000        1  FALSE
2987       GNB4      3_110 0.9537748 -5.869048        1  FALSE
11279      DPF3      14_34 0.9246749  6.100000        1  FALSE
2960       PCCB       3_84 0.9229236 -5.382353        1  FALSE
9960        PGP       16_2 0.9051693  5.943820        1  FALSE
1551    CCDC134      22_17 0.8683170 -5.180556        1  FALSE
12376 LINC01314      15_37 0.8300211 -4.379164        4  FALSE
4891        NPL       1_90 0.8251030 -3.825175        1  FALSE
5042      PSMB7       9_64 0.8211676 -4.820896        1  FALSE
8847    WASHC2C      10_31 0.8186904 -3.972152        1  FALSE
12133 LINC00964       8_82 0.8180590  4.554265        2  FALSE
head(out_table[order(-out_table$susie_pip),report_cols[c(1,7:8)]], sum(out_table$susie_pip>0.8))
       genename GO_overlap_silver bystander
3169      PRRX1                 0     FALSE
3147      WIPF1                 0     FALSE
2431    DNAJC12                 0     FALSE
1214      GMCL1                 0     FALSE
9840     NKX2-5                 1     FALSE
10979     MSRB1                 1     FALSE
9417       PLEC                 0     FALSE
6663       JAM2                 0     FALSE
7794      KDM1B                 0     FALSE
2987       GNB4                 3     FALSE
11279      DPF3                 0     FALSE
2960       PCCB                 2     FALSE
9960        PGP                 4     FALSE
1551    CCDC134                 0     FALSE
12376 LINC01314                 0     FALSE
4891        NPL                 0     FALSE
5042      PSMB7                 4     FALSE
8847    WASHC2C                 2     FALSE
12133 LINC00964                 0     FALSE

cTWAS avoids false positives when multiple genes are in a region

TNKS is a silver standard (assumed true positive gene) that is correctly detected. The bystander gene RP11-115J16.2 is significant using TWAS but has low PIP using cTWAS.

#TNKS gene
locus_plot4("8_12", label="cTWAS")

out_table[out_table$region_tag=="8_12",report_cols[-(7:8)]]
out_table[out_table$region_tag=="8_12",report_cols[c(1,7:8)]]

FADS1 is a silver standard gene (assumed true positive gene) that is correctly detected. There are 5 significant TWAS genes at this locus, including FADS2, another silver standard gene. FADS2 is not detected due to its high LD with FADS1. The remaining 3 bystander genes at this locus have low PIP using cTWAS.

#FADS1 gene
locus_plot3("11_34", focus="FADS1")

out_table[out_table$region_tag=="11_34",report_cols[-(7:8)]]
           genename region_tag  susie_pip           z num_eqtl silver
2584           DTX4      11_34 0.02781763  0.85897436        1  FALSE
2593         MS4A6A      11_34 0.03760719  1.25373134        1  FALSE
2594         MS4A4A      11_34 0.02309081 -0.32835821        1  FALSE
2597         CCDC86      11_34 0.03597023  1.04649029        2  FALSE
2621            CD5      11_34 0.03568699  1.11764706        1  FALSE
3883        SCGB1D2      11_34 0.03004532 -0.89156627        1  FALSE
4751          FADS2      11_34 0.10100488  2.36643571        2   TRUE
4752        TMEM258      11_34 0.03697381  1.39809594        2  FALSE
6292        TMEM138      11_34 0.07669069  1.96202532        1  FALSE
6293          FADS1      11_34 0.04673113 -1.81944444        1   TRUE
6296         INCENP      11_34 0.06319853  1.72072479        2  FALSE
6299          MS4A2      11_34 0.02622115 -0.79104478        1  FALSE
7256       CYB561A3      11_34 0.07669069  1.96202532        1  FALSE
7257        PPP1R32      11_34 0.04776414  1.49792139        2  FALSE
7258         ASRGL1      11_34 0.03557232  1.12328767        1  FALSE
8045        FAM111A      11_34 0.02248651  0.37903226        1  FALSE
8061          PATL1      11_34 0.02241093 -0.29903537        1  FALSE
8063           STX3      11_34 0.02639309  0.82994817        3  FALSE
8072         MS4A14      11_34 0.02767618  0.91549296        1  FALSE
8249           VWCE      11_34 0.02151883  0.02651515        1  FALSE
8250          BEST1      11_34 0.03609758  1.26126126        1  FALSE
10279       TMEM216      11_34 0.03789266 -1.24090909        1  FALSE
10481       FAM111B      11_34 0.02911441 -0.85853659        1  FALSE
10784         MPEG1      11_34 0.03036725 -0.96969697        1  FALSE
11219       LRRC10B      11_34 0.05600778 -1.60000000        1  FALSE
11466        MS4A4E      11_34 0.02832931  0.97058824        1  FALSE
11539         FADS3      11_34 0.23438823 -2.97402597        1   TRUE
12060    AP001258.4      11_34 0.03358240  1.10000000        1  FALSE
12307 RP11-794G24.1      11_34 0.02633199 -0.70680628        1  FALSE
12313 RP11-286N22.8      11_34 0.05730574 -1.61458333        1  FALSE
out_table[out_table$region_tag=="11_34",report_cols[c(1,7:8)]]
           genename GO_overlap_silver bystander
2584           DTX4                NA     FALSE
2593         MS4A6A                NA     FALSE
2594         MS4A4A                NA     FALSE
2597         CCDC86                NA      TRUE
2621            CD5                NA      TRUE
3883        SCGB1D2                NA      TRUE
4751          FADS2                NA     FALSE
4752        TMEM258                NA      TRUE
6292        TMEM138                NA      TRUE
6293          FADS1                NA     FALSE
6296         INCENP                NA      TRUE
6299          MS4A2                NA     FALSE
7256       CYB561A3                NA      TRUE
7257        PPP1R32                NA      TRUE
7258         ASRGL1                NA      TRUE
8045        FAM111A                NA     FALSE
8061          PATL1                NA     FALSE
8063           STX3                NA     FALSE
8072         MS4A14                NA     FALSE
8249           VWCE                NA      TRUE
8250          BEST1                NA      TRUE
10279       TMEM216                NA      TRUE
10481       FAM111B                NA     FALSE
10784         MPEG1                NA     FALSE
11219       LRRC10B                NA      TRUE
11466        MS4A4E                NA     FALSE
11539         FADS3                NA     FALSE
12060    AP001258.4                NA     FALSE
12307 RP11-794G24.1                NA     FALSE
12313 RP11-286N22.8                NA     FALSE
#number of significant TWAS genes at this locus
sum(abs(out_table$z[out_table$region_tag=="11_34"])>sig_thresh)
[1] 0

cTWAS avoids false positives when SNPs in a region are (considerably) more significant

POLK is a gene that is significant using TWAS but not detected using TWAS. cTWAS places a high posterior probability on SNPs are this locus. OpenTargets suggets that the causal gene at this locus is HMGCR (note: different GWAS, similar population), which is not imputed in our dataset. cTWAS selected the variants at this locus because the causal gene is not imputed. Note that MR-JTI claims POLK is causal using their method, and their paper includes a discussion of its potential relevance to LDL.

locus_plot("5_45", label="TWAS")

#locus_plot("5_45", label="TWAS", rerun_ctwas = T)

out_table[out_table$region_tag=="5_45",report_cols[-(7:8)]]
     genename region_tag  susie_pip           z num_eqtl silver
2891    PDE8B       5_45 0.31566331 -3.50495050        1  FALSE
4561    ZBED3       5_45 0.04067004 -0.81037007        2  FALSE
6015    CRHBP       5_45 0.03635826  0.67080227        2  FALSE
7654    F2RL2       5_45 0.03134154  0.02696569        2  FALSE
7660    F2RL1       5_45 0.03500783 -0.49283464        2  FALSE
7661    AGGF1       5_45 0.03208742 -0.31506849        1  FALSE
9671      F2R       5_45 0.04764434  0.97134670        1  FALSE
out_table[out_table$region_tag=="5_45",report_cols[c(1,7:8)]]
     genename GO_overlap_silver bystander
2891    PDE8B                NA     FALSE
4561    ZBED3                NA     FALSE
6015    CRHBP                NA     FALSE
7654    F2RL2                NA     FALSE
7660    F2RL1                NA     FALSE
7661    AGGF1                NA     FALSE
9671      F2R                NA     FALSE

cTWAS is more precise than TWAS in distinguishing silver standard and bystander genes

load(paste0(results_dir, "/known_annotations.Rd"))
load(paste0(results_dir, "/bystanders.Rd"))

#remove genes without imputed expression from bystander list
unrelated_genes <- unrelated_genes[unrelated_genes %in% ctwas_gene_res$genename]

#subset results to genes in known annotations or bystanders
ctwas_gene_res_subset <- ctwas_gene_res[ctwas_gene_res$genename %in% c(known_annotations, unrelated_genes),]

#assign ctwas and TWAS genes
ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>0.8]
twas_genes <- ctwas_gene_res_subset$genename[abs(ctwas_gene_res_subset$z)>sig_thresh]

#sensitivity / recall
sensitivity <- rep(NA,2)
names(sensitivity) <- c("ctwas", "TWAS")
sensitivity["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(known_annotations)
sensitivity["TWAS"] <- sum(twas_genes %in% known_annotations)/length(known_annotations)
sensitivity
ctwas  TWAS 
    0     0 
#specificity / (1 - False Positive Rate)
specificity <- rep(NA,2)
names(specificity) <- c("ctwas", "TWAS")
specificity["ctwas"] <- sum(!(unrelated_genes %in% ctwas_genes))/length(unrelated_genes)
specificity["TWAS"] <- sum(!(unrelated_genes %in% twas_genes))/length(unrelated_genes)
specificity
    ctwas      TWAS 
1.0000000 0.9886878 
#precision / PPV / (1 - False Discovery Rate)
precision <- rep(NA,2)
names(precision) <- c("ctwas", "TWAS")
precision["ctwas"] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
precision["TWAS"] <- sum(twas_genes %in% known_annotations)/length(twas_genes)
precision
ctwas  TWAS 
  NaN     0 
#store sensitivity and specificity calculations for plots
sensitivity_plot <- sensitivity
specificity_plot <- specificity

#precision / PPV by PIP threshold
pip_range <- c(0.5, 0.8, 1)
precision_range <- rep(NA, length(pip_range))
number_detected <- rep(NA, length(pip_range))

for (i in 1:length(pip_range)){
  pip_upper <- pip_range[i]

  if (i==1){
    pip_lower <- 0
  } else {
    pip_lower <- pip_range[i-1]
  }
  
  #assign ctwas genes using PIP threshold
  ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>=pip_lower]
  
  number_detected[i] <- length(ctwas_genes)
  precision_range[i] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
}

names(precision_range) <- paste0(">= ", c(0, pip_range[-length(pip_range)]))

precision_range <- precision_range*100

precision_range <- c(precision_range, precision["TWAS"]*100)
names(precision_range)[4] <- "TWAS Bonferroni"
number_detected <- c(number_detected, length(twas_genes))

barplot(precision_range, ylim=c(0,100), main="Precision for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% of Detected Genes in Silver Standard")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)

#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)

#false discovery rate by PIP threshold

barplot(100-precision_range, ylim=c(0,100), main="False Discovery Rate for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% Bystanders in Detected Genes")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(100-precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)

#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)

Undetected silver standard genes have low TWAS z-scores or stronger signal from nearby variants

For all 69 silver standard genes, sequentially bin each gene using the following criteria: 1) gene not imputed; 2) gene detected by cTWAS at PIP>0.8; 3) gene insignificant by TWAS; 4) gene nearby a detected silver standard gene; 5) gene nearby a detected bystander gene; 6) gene nearby a detected SNP; 7) inconclusive.

#reload silver standard genes
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
* `` -> ...4
* `` -> ...5
known_annotations <- unique(known_annotations$`Gene Symbol`)

#categorize silver standard genes by case
silver_standard_case <- c()
uncertain_regions <- matrix(NA, 0, 2)

for (i in 1:length(known_annotations)){
  current_gene <- known_annotations[i]
  
  if (current_gene %in% ctwas_gene_res$genename) {
    if (ctwas_gene_res$susie_pip[ctwas_gene_res$genename == current_gene] > 0.8){
      silver_standard_case <- c(silver_standard_case, "Detected (PIP > 0.8)")
    } else {
      if (abs(ctwas_gene_res$z[ctwas_gene_res$genename == current_gene]) < sig_thresh){
        silver_standard_case <- c(silver_standard_case, "Insignificant z-score")
      } else {
        current_region <- ctwas_gene_res$region_tag[ctwas_gene_res$genename == current_gene]
        current_gene_res <- ctwas_gene_res[ctwas_gene_res$region_tag==current_region,]
        current_snp_res <- ctwas_snp_res[ctwas_snp_res$region_tag==current_region,]
        
        if (any(current_gene_res$susie_pip>0.8)){
          if (any(current_gene_res$genename[current_gene_res$susie_pip>0.8] %in% known_annotations)){
            silver_standard_case <- c(silver_standard_case, "Nearby Silver Standard Gene")
          } else {
            silver_standard_case <- c(silver_standard_case, "Nearby Bystander Gene")
          }
        } else {
          #if (any(current_snp_res$susie_pip>0.8)){
          if (sum(current_snp_res$susie_pip)>0.8){
            silver_standard_case <- c(silver_standard_case, "Nearby SNP(s)")
          } else {
            silver_standard_case <- c(silver_standard_case, "Inconclusive")
            
            uncertain_regions <- rbind(uncertain_regions, c(current_gene, ctwas_gene_res$region_tag[ctwas_gene_res$genename == current_gene]))
            
            print(c(current_gene, ctwas_gene_res$region_tag[ctwas_gene_res$genename == current_gene]))
          }
        }
      }
    }
  } else {
    silver_standard_case <- c(silver_standard_case, "Not Imputed")
  }
}
names(silver_standard_case) <- known_annotations

#table of outcomes for silver standard genes
-sort(-table(silver_standard_case))
silver_standard_case
Insignificant z-score           Not Imputed 
                   37                    32 
#show inconclusive genes
silver_standard_case[silver_standard_case=="Inconclusive"]
named character(0)
# for (i in 1:nrow(uncertain_regions)){
#   locus_plot3(uncertain_regions[i,2], focus=uncertain_regions[i,1])
# }

#pie chart of outcomes for silver standard genes
df <- data.frame(-sort(-table(silver_standard_case)))
names(df) <- c("Outcome", "Frequency")
#df <- df[df$Outcome!="Not Imputed",] #exclude genes not imputed
df$Outcome <- droplevels(df$Outcome) #exclude genes not imputed

bp<- ggplot(df, aes(x=Outcome, y=Frequency, fill=Outcome)) + geom_bar(width = 1, stat = "identity", position=position_dodge()) + 
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust=1)) + theme(legend.position = "none")
bp

pie <- ggplot(df, aes(x="", y=Frequency, fill=Outcome)) + geom_bar(width = 1, stat = "identity")
pie <- pie + coord_polar("y", start=0) + theme_minimal() + theme(axis.title.y=element_blank())
pie

#locus_plot3(focus="KPNB1", region_tag="17_27")
#locus_plot3(focus="LPIN3", region_tag="20_25")
#locus_plot3(focus="LIPC", region_tag="15_26")

Some cTWAS genes share biological characteristics with silver standard genes

Perform GO enrichment analysis using silver standard genes. Identify detected cTWAS genes not already in silver standard that are also members of these GO terms.

#reload silver standard genes
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
* `` -> ...4
* `` -> ...5
known_annotations <- unique(known_annotations$`Gene Symbol`)

#GO enrichment analysis for silver standard genes
dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
genes <- known_annotations
GO_enrichment <- enrichr(genes, dbs)
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
# for (db in dbs){
#   print(db)
#   df <- GO_enrichment[[db]]
#   df <- df[df$Adjusted.P.value<0.05,c("Term", "Overlap", "Adjusted.P.value", "Genes")]
#   plotEnrich(GO_enrichment[[db]])
#   print(df)
# }

GO_known_annotations <- do.call(rbind, GO_enrichment)
GO_known_annotations <- GO_known_annotations[GO_known_annotations$Adjusted.P.value<0.05,]

#GO enrichment analysis for cTWAS genes

genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]
GO_enrichment <- enrichr(genes, dbs)
Uploading data to Enrichr... Done.
  Querying GO_Biological_Process_2021... Done.
  Querying GO_Cellular_Component_2021... Done.
  Querying GO_Molecular_Function_2021... Done.
Parsing results... Done.
GO_ctwas_genes <- do.call(rbind, GO_enrichment)

#identify cTWAS genes in silver standard enriched GO terms
GO_ctwas_genes <- GO_ctwas_genes[GO_ctwas_genes$Term %in% GO_known_annotations$Term,]

GO_ctwas_genes_byterms <- as.data.frame(matrix(NA, 0, 2))

for (i in 1:nrow(GO_ctwas_genes)){
  for (j in unlist(strsplit(GO_ctwas_genes$Genes[i], split=";"))){
    GO_ctwas_genes_byterms<- rbind(GO_ctwas_genes_byterms, c(j, GO_ctwas_genes$Term[i]))
  }
  colnames(GO_ctwas_genes_byterms) <- c("Gene", "GO_term")
}
Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "phospholipid metabolic process
(GO:0006644)"): invalid factor level, NA generated
GO_ctwas_genes_byterms <- GO_ctwas_genes_byterms[order(GO_ctwas_genes_byterms$Gene),]
GO_ctwas_genes_byterms <- GO_ctwas_genes_byterms[!(GO_ctwas_genes_byterms$Gene %in% known_annotations),]

#detected cTWAS genes (not on silver standard) that overlap with GO terms enriched for silver standard genes

GO_ctwas_genes_byterms
   Gene                                                           GO_term
1   PGP negative regulation of cellular biosynthetic process (GO:0031327)
2   PGP                                                              <NA>
4   PGP                                                              <NA>
7   PGP                                                              <NA>
3  <NA>                                                              <NA>
5  <NA>                                                              <NA>
6  <NA>                                                              <NA>
8  <NA>                                                              <NA>
9  <NA>                                                              <NA>
10 <NA>                                                              <NA>
11 <NA>                                                              <NA>
12 <NA>                                                              <NA>
13 <NA>                                                              <NA>
14 <NA>                                                              <NA>
15 <NA>                                                              <NA>
16 <NA>                                                              <NA>
17 <NA>                                                              <NA>

cTWAS detects some genes that are not significant using a stringent TWAS threshold

TTC39B is a member of the Dyslipidaemia term in the disease_GLAD4U. This gene was not included in our silver standard. This gene is not significant using TWAS but is detected by cTWAS.

#locus_plot3(focus="TTC39B", region_tag="9_13")

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux 7.4 (Nitrogen)

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

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] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] GenomicRanges_1.36.1 GenomeInfoDb_1.20.0  IRanges_2.18.1      
 [4] S4Vectors_0.22.1     BiocGenerics_0.30.0  biomaRt_2.40.1      
 [7] ctwas_0.1.31         forcats_0.5.1        stringr_1.4.0       
[10] dplyr_1.0.7          purrr_0.3.4          readr_2.1.1         
[13] tidyr_1.1.4          tidyverse_1.3.1      tibble_3.1.6        
[16] readxl_1.3.1         WebGestaltR_0.4.4    disgenet2r_0.99.2   
[19] enrichR_3.0          cowplot_1.0.0        ggplot2_3.3.5       
[22] workflowr_1.6.2     

loaded via a namespace (and not attached):
  [1] ggbeeswarm_0.6.0       colorspace_2.0-2       rjson_0.2.20          
  [4] ellipsis_0.3.2         rprojroot_2.0.2        XVector_0.24.0        
  [7] fs_1.5.2               rstudioapi_0.13        farver_2.1.0          
 [10] ggrepel_0.8.1          bit64_4.0.5            AnnotationDbi_1.46.0  
 [13] fansi_0.5.0            lubridate_1.8.0        xml2_1.3.3            
 [16] codetools_0.2-16       logging_0.10-108       doParallel_1.0.16     
 [19] cachem_1.0.6           knitr_1.36             jsonlite_1.7.2        
 [22] apcluster_1.4.8        Cairo_1.5-12.2         broom_0.7.10          
 [25] dbplyr_2.1.1           compiler_3.6.1         httr_1.4.2            
 [28] backports_1.4.1        assertthat_0.2.1       Matrix_1.2-18         
 [31] fastmap_1.1.0          cli_3.1.0              later_0.8.0           
 [34] prettyunits_1.1.1      htmltools_0.5.2        tools_3.6.1           
 [37] igraph_1.2.10          GenomeInfoDbData_1.2.1 gtable_0.3.0          
 [40] glue_1.5.1             reshape2_1.4.4         doRNG_1.8.2           
 [43] Rcpp_1.0.7             Biobase_2.44.0         cellranger_1.1.0      
 [46] jquerylib_0.1.4        vctrs_0.3.8            svglite_1.2.2         
 [49] iterators_1.0.13       xfun_0.29              rvest_1.0.2           
 [52] lifecycle_1.0.1        rngtools_1.5.2         XML_3.99-0.3          
 [55] zlibbioc_1.30.0        scales_1.1.1           vroom_1.5.7           
 [58] hms_1.1.1              promises_1.0.1         yaml_2.2.1            
 [61] curl_4.3.2             memoise_2.0.1          ggrastr_1.0.1         
 [64] gdtools_0.1.9          stringi_1.7.6          RSQLite_2.2.8         
 [67] highr_0.9              foreach_1.5.1          rlang_0.4.12          
 [70] pkgconfig_2.0.3        bitops_1.0-7           evaluate_0.14         
 [73] lattice_0.20-38        labeling_0.4.2         bit_4.0.4             
 [76] tidyselect_1.1.1       plyr_1.8.6             magrittr_2.0.1        
 [79] R6_2.5.1               generics_0.1.1         DBI_1.1.1             
 [82] pgenlibr_0.3.1         pillar_1.6.4           haven_2.4.3           
 [85] whisker_0.3-2          withr_2.4.3            RCurl_1.98-1.5        
 [88] modelr_0.1.8           crayon_1.4.2           utf8_1.2.2            
 [91] tzdb_0.2.0             rmarkdown_2.11         progress_1.2.2        
 [94] grid_3.6.1             data.table_1.14.2      blob_1.2.2            
 [97] git2r_0.26.1           reprex_2.0.1           digest_0.6.29         
[100] httpuv_1.5.1           munsell_0.5.0          beeswarm_0.2.3        
[103] vipor_0.4.5