Last updated: 2022-05-23

Checks: 6 1

Knit directory: ctwas_applied/

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.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210726) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

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

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version fddd181. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    analysis/figure/

Untracked files:
    Untracked:  group_enrichment_results.RData
    Untracked:  results_summary_ulcerative_colitis.csv
    Untracked:  temp.regionlist.RDS
    Untracked:  temp.regions.txt
    Untracked:  temp_LDR/
    Untracked:  temp_ld_R_chr1.txt
    Untracked:  temp_ld_R_chr10.txt
    Untracked:  temp_ld_R_chr11.txt
    Untracked:  temp_ld_R_chr12.txt
    Untracked:  temp_ld_R_chr13.txt
    Untracked:  temp_ld_R_chr14.txt
    Untracked:  temp_ld_R_chr15.txt
    Untracked:  temp_ld_R_chr16.txt
    Untracked:  temp_ld_R_chr17.txt
    Untracked:  temp_ld_R_chr18.txt
    Untracked:  temp_ld_R_chr19.txt
    Untracked:  temp_ld_R_chr2.txt
    Untracked:  temp_ld_R_chr20.txt
    Untracked:  temp_ld_R_chr21.txt
    Untracked:  temp_ld_R_chr22.txt
    Untracked:  temp_ld_R_chr3.txt
    Untracked:  temp_ld_R_chr4.txt
    Untracked:  temp_ld_R_chr5.txt
    Untracked:  temp_ld_R_chr6.txt
    Untracked:  temp_ld_R_chr7.txt
    Untracked:  temp_ld_R_chr8.txt
    Untracked:  temp_ld_R_chr9.txt
    Untracked:  temp_reg.txt
    Untracked:  z_snp_pos_ebi-a-GCST004132.RData
    Untracked:  z_snp_pos_ebi-a-GCST004133.RData

Unstaged changes:
    Modified:   analysis/ukb-d-30780_irnt_Liver_known.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/ukb-d-30780_irnt_Liver_known.Rmd) and HTML (docs/ukb-d-30780_irnt_Liver_known.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 fddd181 wesleycrouse 2022-05-23 locus plots, finally
html fddd181 wesleycrouse 2022-05-23 locus plots, finally
Rmd d4b4ae7 wesleycrouse 2022-05-23 more locus plots
html d4b4ae7 wesleycrouse 2022-05-23 more locus plots
Rmd 403720d wesleycrouse 2022-05-22 locus plots
html 403720d wesleycrouse 2022-05-22 locus plots
Rmd 6b3f6bf wesleycrouse 2022-05-20 gene tracks to locus plots
html 6b3f6bf wesleycrouse 2022-05-20 gene tracks to locus plots
Rmd ba857b1 wesleycrouse 2022-05-20 parameter figures
html ba857b1 wesleycrouse 2022-05-20 parameter figures
Rmd 5d013d9 wesleycrouse 2022-05-15 locus plots for colitis
Rmd 3eff970 wesleycrouse 2022-05-12 additional figure
html 3eff970 wesleycrouse 2022-05-12 additional figure
Rmd 5b57eba wesleycrouse 2022-05-07 plots again
html 5b57eba wesleycrouse 2022-05-07 plots again
Rmd 91b5513 wesleycrouse 2022-05-07 fixing gene positions for locus plots
html 91b5513 wesleycrouse 2022-05-07 fixing gene positions for locus plots
Rmd 3066a5b wesleycrouse 2022-05-07 still fixing plots
html 3066a5b wesleycrouse 2022-05-07 still fixing plots
Rmd 3652437 wesleycrouse 2022-05-07 maybe done with locus plots?
html 3652437 wesleycrouse 2022-05-07 maybe done with locus plots?
Rmd 9ca0532 wesleycrouse 2022-05-07 even more plots
html 9ca0532 wesleycrouse 2022-05-07 even more plots
Rmd f3b31aa wesleycrouse 2022-05-06 plots contd
html f3b31aa wesleycrouse 2022-05-06 plots contd
Rmd e11d1e4 wesleycrouse 2022-05-06 plots
html e11d1e4 wesleycrouse 2022-05-06 plots
Rmd e2fa41a wesleycrouse 2022-05-06 more plot tinkering
html e2fa41a wesleycrouse 2022-05-06 more plot tinkering
Rmd abc7e94 wesleycrouse 2022-05-06 tinkering with locus plots
html abc7e94 wesleycrouse 2022-05-06 tinkering with locus plots
Rmd c048c27 wesleycrouse 2022-05-02 Merge branch ‘master’ of https://github.com/wesleycrouse/ctwas_applied
Rmd 0fd1bd6 wesleycrouse 2022-05-02 genes nearby and nearest to peak
Rmd c73888b wesleycrouse 2022-02-28 adding all weight analysis for height
Rmd adb8b29 wesleycrouse 2022-02-28 adding all weight analysis for height
Rmd c8ff55d wesleycrouse 2022-02-05 multitissue analysis
Rmd 6541080 wesleycrouse 2022-02-05 multitissue analysis
html 6357b14 wesleycrouse 2021-11-12 generate SORT1 LDL
html b4b6166 wesleycrouse 2021-11-12 generate SORT1 LDL
Rmd 54233ee wesleycrouse 2021-11-12 SORT1 analysis
Rmd d7c5250 wesleycrouse 2021-11-12 SORT1 analysis
html c85187d wesleycrouse 2021-11-05 plots
html 6dd5332 wesleycrouse 2021-11-05 plots
Rmd 8a308df wesleycrouse 2021-11-05 plot change for LDL
Rmd f0aff77 wesleycrouse 2021-11-05 plot change for LDL
Rmd bdd4bb3 wesleycrouse 2021-11-02 LDL
Rmd 6163f3a wesleycrouse 2021-11-02 LDL
html bdd4bb3 wesleycrouse 2021-11-02 LDL
html 6163f3a wesleycrouse 2021-11-02 LDL
Rmd 2483f3e wesleycrouse 2021-11-01 ldl results for paper
Rmd f94fce6 wesleycrouse 2021-11-01 ldl results for paper
html 2483f3e wesleycrouse 2021-11-01 ldl results for paper
html f94fce6 wesleycrouse 2021-11-01 ldl results for paper
Rmd ee7b1c6 wesleycrouse 2021-11-01 LDL
Rmd 2fe4868 wesleycrouse 2021-11-01 LDL
Rmd 31ada3d wesleycrouse 2021-11-01 LDL
Rmd 5bec17a wesleycrouse 2021-11-01 LDL
html 31ada3d wesleycrouse 2021-11-01 LDL
html 5bec17a wesleycrouse 2021-11-01 LDL
Rmd ba15fc2 wesleycrouse 2021-11-01 more updates to ldl
Rmd 2c8dcaf wesleycrouse 2021-11-01 more updates to ldl
html ba15fc2 wesleycrouse 2021-11-01 more updates to ldl
html 2c8dcaf wesleycrouse 2021-11-01 more updates to ldl
html fc41ca9 wesleycrouse 2021-10-31 updating LDL
html 2d77b9c wesleycrouse 2021-10-31 updating LDL
Rmd a2b0753 wesleycrouse 2021-10-31 updating LDL results
Rmd 590f5b4 wesleycrouse 2021-10-31 updating LDL results
Rmd 99513b3 wesleycrouse 2021-10-31 adding 226k simulaton
Rmd c35a902 wesleycrouse 2021-10-31 adding 226k simulaton
Rmd 0d92549 wesleycrouse 2021-10-30 updated ldl report
Rmd 6b6bb1f wesleycrouse 2021-10-30 updated ldl report
html 0d92549 wesleycrouse 2021-10-30 updated ldl report
html 6b6bb1f wesleycrouse 2021-10-30 updated ldl report
Rmd ac17eee wesleycrouse 2021-10-29 new ldl section
Rmd 7116a6d wesleycrouse 2021-10-29 new ldl section
html 21931ca wesleycrouse 2021-10-07 tnks plot
html ac09012 wesleycrouse 2021-10-07 tnks plot
Rmd 1d823c8 wesleycrouse 2021-10-07 tnks plot
Rmd 3e5c97b wesleycrouse 2021-10-07 tnks plot
html 70ef8ca wesleycrouse 2021-10-06 eqtl stats
html 884ea20 wesleycrouse 2021-10-06 eqtl stats
Rmd c7f3ae7 wesleycrouse 2021-10-06 eqtl stats
Rmd 585ff6a wesleycrouse 2021-10-06 eqtl stats
html 30c7e5d wesleycrouse 2021-10-05 updating reports
html 04b2bb7 wesleycrouse 2021-10-05 updating reports
Rmd 5155bc7 wesleycrouse 2021-10-05 fixed error in plot
Rmd a3658e7 wesleycrouse 2021-10-05 fixed error in plot
Rmd ab4d7e5 wesleycrouse 2021-10-05 adding results for many eqtl
Rmd a621e29 wesleycrouse 2021-10-05 adding results for many eqtl
Rmd 6ac54ea wesleycrouse 2021-10-04 full locus plots
Rmd 014b1c7 wesleycrouse 2021-10-04 full locus plots
html 6ac54ea wesleycrouse 2021-10-04 full locus plots
html 014b1c7 wesleycrouse 2021-10-04 full locus plots
Rmd cdb0137 wesleycrouse 2021-10-04 full set of plots
Rmd 22acbec wesleycrouse 2021-10-04 full set of plots
html 685982d wesleycrouse 2021-10-04 new locus plots
html a703683 wesleycrouse 2021-10-04 new locus plots
Rmd 815a5fc wesleycrouse 2021-10-04 typo
Rmd 0055e38 wesleycrouse 2021-10-04 typo
Rmd 7a025f4 wesleycrouse 2021-10-04 typo
Rmd 4f5d6c3 wesleycrouse 2021-10-04 typo
Rmd ea786f2 wesleycrouse 2021-10-04 new locus plots
Rmd 1da45a5 wesleycrouse 2021-10-04 new locus plots
html 4f5d3cc wesleycrouse 2021-10-04 saving gene lists
html 4a57b1d wesleycrouse 2021-10-04 saving gene lists
Rmd c9e4e3f wesleycrouse 2021-10-04 additional plots
Rmd acceafa wesleycrouse 2021-10-04 additional plots
Rmd b86be36 wesleycrouse 2021-10-04 additional locus plots
Rmd ed18cf3 wesleycrouse 2021-10-04 additional locus plots
html b6558c0 wesleycrouse 2021-09-23 updating h2 plot
html ecc2632 wesleycrouse 2021-09-23 updating h2 plot
Rmd 93fe2bf wesleycrouse 2021-09-22 updated h2 report
Rmd ffe73a3 wesleycrouse 2021-09-22 updated h2 report
html 9bcbf7b wesleycrouse 2021-09-20 no label
html 286be0b wesleycrouse 2021-09-20 no label
Rmd 54147d0 wesleycrouse 2021-09-20 no label
Rmd eb55090 wesleycrouse 2021-09-20 no label
html 2372a08 wesleycrouse 2021-09-20 labels
html f44b453 wesleycrouse 2021-09-20 labels
Rmd 370c277 wesleycrouse 2021-09-20 fixing labels
Rmd 45ffab3 wesleycrouse 2021-09-20 fixing labels
Rmd 0ec536e wesleycrouse 2021-09-20 adjusting plots
Rmd 7d66382 wesleycrouse 2021-09-20 adjusting plots
html 0720fce wesleycrouse 2021-09-20 final plots
html a0a439f wesleycrouse 2021-09-20 final plots
Rmd 70ddb0a wesleycrouse 2021-09-20 plot function
Rmd 9e41320 wesleycrouse 2021-09-20 plot function
Rmd f351b4a wesleycrouse 2021-09-20 figure edits
Rmd ec99f1f wesleycrouse 2021-09-20 figure edits
html 567c3aa wesleycrouse 2021-09-20 plot tinkering
html a8310a3 wesleycrouse 2021-09-20 plot tinkering
Rmd 806dedb wesleycrouse 2021-09-20 tinkering
Rmd 4891a34 wesleycrouse 2021-09-20 tinkering
Rmd b908e43 wesleycrouse 2021-09-20 tinkering with plots
Rmd e329677 wesleycrouse 2021-09-20 tinkering with plots
html 5ed721e wesleycrouse 2021-09-20 more plot changes
html 5098b56 wesleycrouse 2021-09-20 more plot changes
Rmd de2466d wesleycrouse 2021-09-20 adjusting locus plots
Rmd 4d6695f wesleycrouse 2021-09-20 adjusting locus plots
html b62cf79 wesleycrouse 2021-09-20 plot adjustments
html 4bf6fa7 wesleycrouse 2021-09-20 plot adjustments
Rmd f3506f8 wesleycrouse 2021-09-20 adjusting PPV plot
Rmd 2540342 wesleycrouse 2021-09-20 adjusting PPV plot
html f1d1149 wesleycrouse 2021-09-20 locus plots
html d9a511d wesleycrouse 2021-09-20 locus plots
Rmd 2af7d7d wesleycrouse 2021-09-20 adding locus plots
Rmd 0766351 wesleycrouse 2021-09-20 adding locus plots
html d252632 wesleycrouse 2021-09-16 manhattan plot
html 541cce4 wesleycrouse 2021-09-16 manhattan plot
Rmd e50c7a3 wesleycrouse 2021-09-16 manhattan plot
Rmd 0596fea wesleycrouse 2021-09-16 manhattan plot
html 6392888 wesleycrouse 2021-09-16 ppv by pip
html e5441f9 wesleycrouse 2021-09-16 ppv by pip
Rmd 4563704 wesleycrouse 2021-09-16 bystander analysis and plots
Rmd 5cd5820 wesleycrouse 2021-09-16 bystander analysis and plots
html 5e40186 wesleycrouse 2021-09-16 h2 plots
html b2ff1b3 wesleycrouse 2021-09-16 h2 plots
html 0a08e3b wesleycrouse 2021-09-15 plots
html bd3ae27 wesleycrouse 2021-09-15 plots
Rmd 045ce1a wesleycrouse 2021-09-15 forcing plot
Rmd df0c888 wesleycrouse 2021-09-15 forcing plot
html 0bd64a0 wesleycrouse 2021-09-15 update report with plot
html f930e02 wesleycrouse 2021-09-15 update report with plot
Rmd 22a8cc1 wesleycrouse 2021-09-15 add enrichr plot
Rmd 4c89bf5 wesleycrouse 2021-09-15 add enrichr plot
html 3952612 wesleycrouse 2021-09-13 updated reports
html e5bba97 wesleycrouse 2021-09-13 updated reports
Rmd ef7b17d wesleycrouse 2021-09-13 changing mart for biomart
Rmd 72c8ef7 wesleycrouse 2021-09-13 changing mart for biomart
Rmd 76178c3 wesleycrouse 2021-09-13 updating with bystander analysis
Rmd a49c40e wesleycrouse 2021-09-13 updating with bystander analysis
html 57fd2c7 wesleycrouse 2021-09-13 updating reports
html 7e22565 wesleycrouse 2021-09-13 updating reports
html eacba36 wesleycrouse 2021-09-08 adding first two reports
html 0c9ef1c wesleycrouse 2021-09-08 adding first two reports
Rmd db3f58c wesleycrouse 2021-09-08 adding enrichment to reports
Rmd cbf7408 wesleycrouse 2021-09-08 adding enrichment to reports

Overview

These are the results of a ctwas analysis of the UK Biobank trait LDL direct using Liver gene weights.

The GWAS was conducted by the Neale Lab, and the biomarker traits we analyzed are discussed here. Summary statistics were obtained from IEU OpenGWAS using GWAS ID: ukb-d-30780_irnt. Results were obtained from from IEU rather than Neale Lab because they are in a standardard format (GWAS VCF). Note that 3 of the 34 biomarker traits were not available from IEU and were excluded from analysis.

The weights are mashr GTEx v8 models on Liver eQTL obtained from PredictDB. We performed a full harmonization of the variants, including recovering strand ambiguous variants. This procedure is discussed in a separate document. (TO-DO: add report that describes harmonization)

LD matrices were computed from a 10% subset of Neale lab subjects. Subjects were matched using the plate and well information from genotyping. We included only biallelic variants with MAF>0.01 in the original Neale Lab GWAS. (TO-DO: add more details [number of subjects, variants, etc])

Weight QC

TO-DO: add enhanced QC reporting (total number of weights, why each variant was missing for all genes)

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] 10901
#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 
1070  768  652  417  494  611  548  408  405  434  634  629  195  365  354 
  16   17   18   19   20   21   22 
 526  663  160  859  306  114  289 
#proportion of imputed weights without missing variants
mean(qclist_all$nmiss==0)
[1] 0.8365288

Load ctwas results

Check convergence of parameters

library(ggplot2)
library(cowplot)

load(paste0(results_dir, "/", analysis_id, "_ctwas.s2.susieIrssres.Rd"))

group_size <- c(nrow(ctwas_gene_res), n_snps)

#estimated group prior (all iterations)
estimated_group_prior_all <- group_prior_rec
rownames(estimated_group_prior_all) <- c("gene", "snp")
estimated_group_prior_all["snp",] <- estimated_group_prior_all["snp",]*thin #adjust parameter to account for thin argument

#estimated group prior variance (all iterations)
estimated_group_prior_var_all <- group_prior_var_rec
rownames(estimated_group_prior_var_all) <- c("gene", "snp")

#estimated group PVE (all iterations)
estimated_group_pve_all <- estimated_group_prior_var_all*estimated_group_prior_all*group_size/sample_size #check PVE calculation
rownames(estimated_group_pve_all) <- c("gene", "snp")

#estimated enrichment of genes (all iterations)
estimated_enrichment_all <- estimated_group_prior_all["gene",]/estimated_group_prior_all["snp",]
  
df <- data.frame(niter = rep(1:ncol(estimated_group_prior_all), 2),
                 value = c(estimated_group_prior_all["gene",], estimated_group_prior_all["snp",]),
                 group = rep(c("Gene", "SNP"), each = ncol(estimated_group_prior_all)))
df$group <- as.factor(df$group)

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("Proportion Causal") +
  theme_cowplot()

df <- data.frame(niter = rep(1:ncol(estimated_group_prior_var_all ), 2),
                 value = c(estimated_group_prior_var_all["gene",], estimated_group_prior_var_all["snp",]),
                 group = rep(c("Gene", "SNP"), each = ncol(estimated_group_prior_var_all)))
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("Effect Size") +
  theme_cowplot()

df <- data.frame(niter = rep(1:ncol(estimated_group_pve_all ), 2),
                 value = c(estimated_group_pve_all["gene",], estimated_group_pve_all["snp",]),
                 group = rep(c("Gene", "SNP"), each = ncol(estimated_group_pve_all)))
df$group <- as.factor(df$group)
p_pve <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(h^2[G])) +
  ggtitle("PVE") +
  theme_cowplot()

df <- data.frame(niter = 1:length(estimated_enrichment_all),
                 value = estimated_enrichment_all,
                 group = rep("Gene", length(estimated_enrichment_all)))
df$group <- as.factor(df$group)
p_enrich <- ggplot(df, aes(x=niter, y=value, group=group)) +
  geom_line(aes(color=group)) +
  geom_point(aes(color=group)) +
  xlab("Iteration") + ylab(bquote(pi[G]/pi[S])) +
  ggtitle("Enrichment") +
  theme_cowplot()


plot_grid(p_pi, p_sigma2, p_enrich, p_pve)

Version Author Date
ba857b1 wesleycrouse 2022-05-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#estimated group prior
estimated_group_prior <- estimated_group_prior_all[,ncol(group_prior_rec)]
print(estimated_group_prior)
        gene          snp 
0.0097362431 0.0001740806 
#estimated group prior variance
estimated_group_prior_var <- estimated_group_prior_var_all[,ncol(group_prior_var_rec)]
print(estimated_group_prior_var)
     gene       snp 
44.804057  9.714622 
#estimated enrichment
estimated_enrichment <- estimated_enrichment_all[ncol(group_prior_var_rec)]
print(estimated_enrichment)
[1] 55.92953
#report sample size
print(sample_size)
[1] 343621
#report group size
print(group_size)
[1]   10901 8696600
#estimated group PVE
estimated_group_pve <- estimated_group_pve_all[,ncol(group_prior_rec)] #check PVE calculation
print(estimated_group_pve)
      gene        snp 
0.01383870 0.04280022 
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.0256885 0.3352573

Genes with highest PIPs

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

Version Author Date
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#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
4435        PSRC1       1_67 1.0000000 1673.67515 4.870701e-03 -41.687336
12008         HPR      16_38 1.0000000  209.84504 6.106875e-04 -17.240252
5563        ABCG8       2_27 0.9999667  313.61643 9.126508e-04 -20.293982
3721       INSIG2       2_69 0.9997835   62.50602 1.818646e-04  -9.364196
12687 RP4-781K5.7      1_121 0.9997323  203.71272 5.926826e-04 -15.108415
5544        CNIH4      1_114 0.9996225   48.38268 1.407493e-04   6.721857
5991        FADS1      11_34 0.9995362  160.57915 4.670980e-04  12.825883
10657      TRIM39       6_24 0.9986851   72.25250 2.099915e-04   8.848422
1999        PRKD2      19_33 0.9960498   32.48399 9.416092e-05   5.289849
7410        ABCA1       9_53 0.9953955   70.36805 2.038410e-04   7.982017
9390         GAS6      13_62 0.9881812   71.35449 2.052004e-04  -8.923688
1597         PLTP      20_28 0.9877967   61.56987 1.769930e-04  -5.732491
8531         TNKS       8_12 0.9843991   73.76705 2.113265e-04  11.026034
7040        INHBB       2_70 0.9822549   74.04747 2.116678e-04  -8.518936
2092          SP4       7_19 0.9770590  102.38291 2.911177e-04  10.693191
4704        DDX56       7_32 0.9746379   58.70499 1.665093e-04   9.446271
6093      CSNK1G3       5_75 0.9746218   84.22978 2.389033e-04   9.116291
6996         ACP6       1_73 0.9686714   25.67816 7.238702e-05   4.648193
6220         PELO       5_31 0.9671689   72.14658 2.030665e-04   8.426917
8865         FUT2      19_33 0.9654279  104.78613 2.944042e-04 -11.927107
233        NPC1L1       7_32 0.9639501   89.79964 2.519123e-04 -10.761931
11790      CYP2A6      19_28 0.9618748   32.00393 8.958643e-05   5.407028
3247         KDSR      18_35 0.9552678   24.68795 6.863262e-05  -4.526287
3562       ACVR1C       2_94 0.9388267   26.34289 7.197292e-05  -4.737778
6778         PKN3       9_66 0.9359867   47.70773 1.299507e-04  -6.620563
1114         SRRT       7_62 0.9266928   33.00834 8.901839e-05   5.547715
6391       TTC39B       9_13 0.9260006   23.04986 6.211548e-05  -4.287139
6957         USP1       1_39 0.8944442  253.87992 6.608485e-04  16.258211
3300     C10orf88      10_77 0.8796497   35.77483 9.158149e-05  -6.634448
9062      KLHDC7A       1_13 0.8184900   22.59307 5.381570e-05   4.124187
9072      SPTY2D1      11_13 0.8096237   33.54397 7.903473e-05  -5.557123
8931      CRACR2B       11_1 0.8018304   22.03486 5.141775e-05  -3.989585
8418         POP7       7_62 0.8015981   40.08303 9.350558e-05  -5.845258
      num_eqtl
4435         1
12008        2
5563         1
3721         3
12687        1
5544         2
5991         2
10657        3
1999         2
7410         1
9390         1
1597         1
8531         2
7040         1
2092         1
4704         2
6093         1
6996         2
6220         2
8865         1
233          1
11790        1
3247         1
3562         2
6778         1
1114         2
6391         3
6957         1
3300         2
9062         1
9072         1
8931         1
8418         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")

Version Author Date
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#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
4435          PSRC1       1_67 1.000000e+00 1673.6751 4.870701e-03
5436          PSMA5       1_67 7.971102e-03 1213.1736 2.814243e-05
4562          SRPK2       7_65 0.000000e+00  518.4649 0.000000e+00
6970        ATXN7L2       1_67 9.854884e-03  367.2816 1.053346e-05
5563          ABCG8       2_27 9.999667e-01  313.6164 9.126508e-04
11364 RP11-325F22.2       7_65 0.000000e+00  297.6090 0.000000e+00
781             PVR      19_32 0.000000e+00  295.7015 0.000000e+00
6957           USP1       1_39 8.944442e-01  253.8799 6.608485e-04
4317        ANGPTL3       1_39 1.149947e-01  249.6542 8.354820e-05
11684 RP11-136O12.2       8_83 3.004653e-03  235.9053 2.062777e-06
3441           POLK       5_45 4.086774e-03  217.4555 2.586255e-06
12008           HPR      16_38 1.000000e+00  209.8450 6.106875e-04
12687   RP4-781K5.7      1_121 9.997323e-01  203.7127 5.926826e-04
5431          SYPL2       1_67 1.646951e-02  198.6144 9.519447e-06
5377         GEMIN7      19_32 0.000000e+00  193.9778 0.000000e+00
5991          FADS1      11_34 9.995362e-01  160.5792 4.670980e-04
5240          NLRC5      16_31 8.890782e-02  159.6860 4.131684e-05
538          ZNF112      19_32 0.000000e+00  147.0608 0.000000e+00
11245    AC067959.1       2_13 3.200642e-09  145.4739 1.355009e-12
4507          FADS2      11_34 6.376841e-03  145.1987 2.694565e-06
                z num_eqtl
4435  -41.6873361        1
5436  -35.4138115        2
4562   -1.4622459        1
6970  -19.2427445        2
5563  -20.2939818        1
11364   0.9704489        2
781   -10.0782525        2
6957   16.2582110        1
4317   16.1322287        1
11684  14.4041325        1
3441   17.5157647        1
12008 -17.2402523        2
12687 -15.1084154        1
5431  -14.1478749        2
5377   10.9432287        2
5991   12.8258829        2
5240   11.8602110        1
538    10.3860543        1
11245  -2.3287171        1
4507   12.0726352        1

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
4435        PSRC1       1_67 1.0000000 1673.67515 0.0048707010 -41.687336
5563        ABCG8       2_27 0.9999667  313.61643 0.0009126508 -20.293982
6957         USP1       1_39 0.8944442  253.87992 0.0006608485  16.258211
12008         HPR      16_38 1.0000000  209.84504 0.0006106875 -17.240252
12687 RP4-781K5.7      1_121 0.9997323  203.71272 0.0005926826 -15.108415
5991        FADS1      11_34 0.9995362  160.57915 0.0004670980  12.825883
8865         FUT2      19_33 0.9654279  104.78613 0.0002944042 -11.927107
2092          SP4       7_19 0.9770590  102.38291 0.0002911177  10.693191
233        NPC1L1       7_32 0.9639501   89.79964 0.0002519123 -10.761931
6093      CSNK1G3       5_75 0.9746218   84.22978 0.0002389033   9.116291
7040        INHBB       2_70 0.9822549   74.04747 0.0002116678  -8.518936
8531         TNKS       8_12 0.9843991   73.76705 0.0002113265  11.026034
10657      TRIM39       6_24 0.9986851   72.25250 0.0002099915   8.848422
9390         GAS6      13_62 0.9881812   71.35449 0.0002052004  -8.923688
7410        ABCA1       9_53 0.9953955   70.36805 0.0002038410   7.982017
6220         PELO       5_31 0.9671689   72.14658 0.0002030665   8.426917
3721       INSIG2       2_69 0.9997835   62.50602 0.0001818646  -9.364196
1597         PLTP      20_28 0.9877967   61.56987 0.0001769930  -5.732491
4704        DDX56       7_32 0.9746379   58.70499 0.0001665093   9.446271
5544        CNIH4      1_114 0.9996225   48.38268 0.0001407493   6.721857
      num_eqtl
4435         1
5563         1
6957         1
12008        2
12687        1
5991         2
8865         1
2092         1
233          1
6093         1
7040         1
8531         2
10657        3
9390         1
7410         1
6220         2
3721         3
1597         1
4704         2
5544         2

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
4435          PSRC1       1_67 1.000000e+00 1673.6751 4.870701e-03
5436          PSMA5       1_67 7.971102e-03 1213.1736 2.814243e-05
5563          ABCG8       2_27 9.999667e-01  313.6164 9.126508e-04
6970        ATXN7L2       1_67 9.854884e-03  367.2816 1.053346e-05
3441           POLK       5_45 4.086774e-03  217.4555 2.586255e-06
12008           HPR      16_38 1.000000e+00  209.8450 6.106875e-04
6957           USP1       1_39 8.944442e-01  253.8799 6.608485e-04
4317        ANGPTL3       1_39 1.149947e-01  249.6542 8.354820e-05
12687   RP4-781K5.7      1_121 9.997323e-01  203.7127 5.926826e-04
9978        ANKDD1B       5_45 4.085199e-03  144.6235 1.719382e-06
11684 RP11-136O12.2       8_83 3.004653e-03  235.9053 2.062777e-06
5431          SYPL2       1_67 1.646951e-02  198.6144 9.519447e-06
1930        PPP1R37      19_32 0.000000e+00  125.3259 0.000000e+00
5991          FADS1      11_34 9.995362e-01  160.5792 4.670980e-04
4507          FADS2      11_34 6.376841e-03  145.1987 2.694565e-06
7955           FEN1      11_34 6.376841e-03  145.1987 2.694565e-06
4112          YIPF2       19_9 2.205398e-09  126.5640 8.123021e-13
8865           FUT2      19_33 9.654279e-01  104.7861 2.944042e-04
5240          NLRC5      16_31 8.890782e-02  159.6860 4.131684e-05
1053           APOB       2_13 1.618250e-11   62.9295 2.963604e-15
              z num_eqtl
4435  -41.68734        1
5436  -35.41381        2
5563  -20.29398        1
6970  -19.24274        2
3441   17.51576        1
12008 -17.24025        2
6957   16.25821        1
4317   16.13223        1
12687 -15.10842        1
9978   15.06698        2
11684  14.40413        1
5431  -14.14787        2
1930  -12.89212        2
5991   12.82588        2
4507   12.07264        1
7955   12.07264        1
4112   11.94206        1
8865  -11.92711        1
5240   11.86021        1
1053  -11.72589        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)

Version Author Date
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#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)

Version Author Date
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#proportion of significant z scores
mean(abs(ctwas_gene_res$z) > sig_thresh)
[1] 0.0198147
#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
4435          PSRC1       1_67 1.000000e+00 1673.6751 4.870701e-03
5436          PSMA5       1_67 7.971102e-03 1213.1736 2.814243e-05
5563          ABCG8       2_27 9.999667e-01  313.6164 9.126508e-04
6970        ATXN7L2       1_67 9.854884e-03  367.2816 1.053346e-05
3441           POLK       5_45 4.086774e-03  217.4555 2.586255e-06
12008           HPR      16_38 1.000000e+00  209.8450 6.106875e-04
6957           USP1       1_39 8.944442e-01  253.8799 6.608485e-04
4317        ANGPTL3       1_39 1.149947e-01  249.6542 8.354820e-05
12687   RP4-781K5.7      1_121 9.997323e-01  203.7127 5.926826e-04
9978        ANKDD1B       5_45 4.085199e-03  144.6235 1.719382e-06
11684 RP11-136O12.2       8_83 3.004653e-03  235.9053 2.062777e-06
5431          SYPL2       1_67 1.646951e-02  198.6144 9.519447e-06
1930        PPP1R37      19_32 0.000000e+00  125.3259 0.000000e+00
5991          FADS1      11_34 9.995362e-01  160.5792 4.670980e-04
4507          FADS2      11_34 6.376841e-03  145.1987 2.694565e-06
7955           FEN1      11_34 6.376841e-03  145.1987 2.694565e-06
4112          YIPF2       19_9 2.205398e-09  126.5640 8.123021e-13
8865           FUT2      19_33 9.654279e-01  104.7861 2.944042e-04
5240          NLRC5      16_31 8.890782e-02  159.6860 4.131684e-05
1053           APOB       2_13 1.618250e-11   62.9295 2.963604e-15
              z num_eqtl
4435  -41.68734        1
5436  -35.41381        2
5563  -20.29398        1
6970  -19.24274        2
3441   17.51576        1
12008 -17.24025        2
6957   16.25821        1
4317   16.13223        1
12687 -15.10842        1
9978   15.06698        2
11684  14.40413        1
5431  -14.14787        2
1930  -12.89212        2
5991   12.82588        2
4507   12.07264        1
7955   12.07264        1
4112   11.94206        1
8865  -11.92711        1
5240   11.86021        1
1053  -11.72589        1

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
14015     rs2495502       1_34 1.0000000  283.39934 8.247440e-04
68004     rs1042034       2_13 1.0000000  233.15942 6.785366e-04
68010      rs934197       2_13 1.0000000  415.42495 1.208963e-03
69740      rs780093       2_16 1.0000000  160.58198 4.673229e-04
365662   rs12208357      6_103 1.0000000  234.68289 6.829702e-04
402311  rs763798411       7_65 1.0000000 3396.76754 9.885215e-03
753628  rs113408695      17_39 1.0000000  143.15222 4.165992e-04
787044   rs73013176       19_9 1.0000000  237.05919 6.898856e-04
797185   rs62117204      19_32 1.0000000  825.46406 2.402251e-03
797203  rs111794050      19_32 1.0000000  763.45042 2.221780e-03
797236     rs814573      19_32 1.0000000 2204.07397 6.414259e-03
797238  rs113345881      19_32 1.0000000  772.04571 2.246794e-03
797241   rs12721109      19_32 1.0000000 1341.06697 3.902750e-03
1025547    rs964184      11_70 1.0000000  238.93817 6.953538e-04
753654    rs8070232      17_39 1.0000000  144.02728 4.191457e-04
789854    rs2285626      19_15 1.0000000  245.81655 7.153711e-04
807513   rs34507316      20_13 1.0000000   78.16444 2.274728e-04
67955    rs11679386       2_12 1.0000000  127.40762 3.707795e-04
68013      rs548145       2_13 1.0000000  656.37401 1.910168e-03
68090     rs1848922       2_13 1.0000000  229.85868 6.689308e-04
500307  rs115478735       9_70 1.0000000  302.07254 8.790864e-04
1097413   rs1800961      20_28 1.0000000   70.80786 2.060638e-04
752712    rs1801689      17_38 1.0000000   79.68995 2.319123e-04
796899   rs73036721      19_30 1.0000000   57.37655 1.669763e-04
75418    rs72800939       2_28 1.0000000   55.14440 1.604803e-04
440113    rs4738679       8_45 1.0000000  106.62327 3.102932e-04
787082  rs137992968       19_9 1.0000000  112.56051 3.275717e-04
582936    rs4937122      11_77 0.9999999   77.06489 2.242729e-04
14026    rs10888896       1_34 0.9999999  131.44559 3.825307e-04
365846   rs56393506      6_104 0.9999999   88.86744 2.586205e-04
7471     rs79598313       1_18 0.9999996   46.26129 1.346288e-04
459774   rs13252684       8_83 0.9999991  216.74704 6.307730e-04
52932     rs2807848      1_112 0.9999990   58.52578 1.703205e-04
438718  rs140753685       8_42 0.9999981   54.26666 1.579256e-04
796944   rs62115478      19_30 0.9999959  179.71694 5.230070e-04
789879    rs3794991      19_15 0.9999931  212.34130 6.179478e-04
13985    rs11580527       1_34 0.9999819   87.73831 2.553299e-04
14033      rs471705       1_34 0.9999643  207.61758 6.041836e-04
347099    rs9496567       6_67 0.9999493   38.26879 1.113635e-04
317884   rs11376017       6_13 0.9998645   64.29668 1.870898e-04
787108    rs4804149      19_10 0.9998583   45.33238 1.319068e-04
787068    rs3745677       19_9 0.9998138   88.64458 2.579239e-04
807512    rs6075251      20_13 0.9997609   51.26001 1.491403e-04
365810  rs117733303      6_104 0.9994569   97.23071 2.828055e-04
538661   rs17875416      10_71 0.9991968   37.10633 1.078995e-04
787073    rs1569372       19_9 0.9990931  268.63487 7.810676e-04
787161     rs322144      19_10 0.9989403   54.42872 1.582297e-04
603362    rs7397189      12_36 0.9988891   33.42234 9.715707e-05
789838   rs12981966      19_15 0.9986767   90.09531 2.618469e-04
787065  rs147985405       19_9 0.9984711 2244.60176 6.522215e-03
428445    rs1495743       8_20 0.9975054   40.03846 1.162286e-04
789519    rs2302209      19_14 0.9967822   42.18169 1.223614e-04
321970     rs454182       6_22 0.9961194   31.79162 9.216039e-05
279291    rs7701166       5_45 0.9959927   32.16847 9.324099e-05
440081   rs56386732       8_45 0.9953284   34.15929 9.894537e-05
401241    rs3197597       7_61 0.9951083   31.93653 9.248652e-05
812466   rs76981217      20_24 0.9948789   35.06140 1.015125e-04
607728  rs148481241      12_44 0.9919763   26.93594 7.775954e-05
619946     rs653178      12_67 0.9918978   91.31527 2.635910e-04
322407    rs3130253       6_23 0.9891937   28.48416 8.199834e-05
1052542  rs12445804      16_12 0.9889190   33.19456 9.553179e-05
136562     rs709149        3_9 0.9842268   35.13168 1.006270e-04
402322    rs4997569       7_65 0.9829562 3420.93741 9.785874e-03
728365    rs4396539      16_37 0.9817537   26.83980 7.668354e-05
279232   rs10062361       5_45 0.9809664  198.65388 5.671154e-04
143572    rs9834932       3_24 0.9787031   64.78789 1.845292e-04
812470   rs73124945      20_24 0.9782548   32.06394 9.128285e-05
812417    rs6029132      20_24 0.9779039   38.62868 1.099325e-04
624035   rs11057830      12_76 0.9778747   25.37372 7.220838e-05
243844  rs114756490      4_100 0.9644689   25.75685 7.229384e-05
459763   rs79658059       8_83 0.9607197  258.87980 7.237943e-04
564013    rs6591179      11_36 0.9597314   25.78497 7.201728e-05
385473  rs141379002       7_33 0.9597289   25.04659 6.995479e-05
820471   rs62219001       21_2 0.9590057   25.62945 7.152876e-05
221115    rs1458038       4_54 0.9578839   51.20629 1.427435e-04
475021    rs1556516       9_16 0.9540147   71.53697 1.986122e-04
756787    rs4969183      17_44 0.9529557   47.80072 1.325646e-04
588845   rs11048034       12_9 0.9494116   34.77369 9.607837e-05
467826    rs7024888        9_3 0.9442348   25.75506 7.077224e-05
321431   rs75080831       6_19 0.9414966   55.50208 1.520717e-04
622900    rs1169300      12_74 0.9403214   66.55855 1.821380e-04
322378   rs28986304       6_23 0.9401433   41.98187 1.148620e-04
618039    rs1196760      12_63 0.9388553   25.37042 6.931809e-05
68007    rs78610189       2_13 0.9210999   58.28829 1.562458e-04
349835   rs12199109       6_73 0.9187281   24.37643 6.517445e-05
192740    rs5855544      3_120 0.9183703   23.51560 6.284840e-05
424122  rs117037226       8_11 0.9089182   23.58514 6.238547e-05
14016     rs1887552       1_34 0.9064797  326.56618 8.614887e-04
365656    rs9456502      6_103 0.9048367   32.52891 8.565645e-05
194527   rs36205397        4_4 0.8917379   37.33941 9.690027e-05
505257   rs10905277       10_8 0.8890514   27.52767 7.122241e-05
168565     rs189174       3_74 0.8879803   42.98940 1.110926e-04
724473     rs821840      16_31 0.8876264  154.64189 3.994640e-04
538372   rs12244851      10_70 0.8848191   35.55360 9.155000e-05
803158   rs74273659       20_5 0.8839715   24.37800 6.271286e-05
787149     rs322125      19_10 0.8839095   98.44566 2.532356e-04
576653  rs201912654      11_59 0.8672202   39.31464 9.922110e-05
196752    rs2002574       4_10 0.8654705   24.48739 6.167584e-05
789928   rs12984303      19_15 0.8638358   24.54661 6.170822e-05
815969   rs10641149      20_32 0.8632500   26.79963 6.732644e-05
118659    rs7569317      2_120 0.8624284   43.75058 1.098063e-04
1058530    rs763665      16_38 0.8577437  137.83761 3.440690e-04
67807     rs6531234       2_12 0.8552413   41.73985 1.038867e-04
827712    rs2835302      21_17 0.8505271   25.61363 6.339859e-05
787118   rs58495388      19_10 0.8502360   33.27769 8.234039e-05
800968   rs34003091      19_39 0.8469891  101.75017 2.508033e-04
839800  rs145678077      22_17 0.8439363   24.90998 6.117914e-05
812435    rs6102034      20_24 0.8436945   95.23422 2.338291e-04
483007   rs11144506       9_35 0.8431096   26.72445 6.557119e-05
356038    rs9321207       6_86 0.8403147   30.12020 7.365803e-05
582939   rs74612335      11_77 0.8386661   75.15701 1.834336e-04
279255    rs3843482       5_45 0.8331416  389.97044 9.455201e-04
811211   rs11167269      20_21 0.8262416   55.46845 1.333747e-04
931949  rs535137438       5_31 0.8224773   31.27788 7.486547e-05
532551   rs10882161      10_59 0.8096988   29.44111 6.937420e-05
753639    rs9303012      17_39 0.8093217  135.16346 3.183470e-04
807493   rs78348000      20_13 0.8011589   29.84631 6.958723e-05
                 z
14015    -6.292225
68004   -16.573036
68010   -33.060888
69740    14.142603
365662  -12.282337
402311   -3.272149
753628  -12.768796
787044   16.232742
797185   44.672230
797203   33.599649
797236  -55.537887
797238   34.318568
797241   46.325818
1025547  16.661098
753654    8.091491
789854   18.215134
807513    6.814661
67955   -11.909428
68013   -33.086010
68090   -25.412292
500307  -19.011790
1097413   8.896957
752712   -9.396430
796899    7.787947
75418     7.845728
440113   11.699924
787082   10.752566
582936  -12.147947
14026   -11.893801
365846  -14.088321
7471     -7.024638
459774  -11.964411
52932     7.882775
438718   -7.799241
796944   14.326186
789879   21.492060
13985    11.167216
14033   -16.262997
347099    6.340216
317884    8.507919
787108   -6.519414
787068   -9.335807
807512    2.329832
365810  -10.097959
538661    6.266313
787073  -10.005506
787161   -3.946578
603362    5.770964
789838   -1.822895
787065   48.935175
428445    6.515969
789519   -6.636049
321970   -4.779053
279291    2.484790
440081    7.012272
401241    5.045242
812466   -7.692477
607728   -5.095452
619946  -11.050062
322407   -5.641451
1052542  -5.772374
136562    6.781974
402322    2.984117
728365    5.232860
279232  -20.320600
143572    8.481579
812470    7.775426
812417    6.762459
624035   -4.929635
243844   -4.988910
459763   16.022043
564013   -4.893333
385473   -4.896981
820471    4.948445
221115    7.417851
475021    8.992146
756787   -7.169275
588845   -6.133690
467826    5.055827
321431    7.906709
622900   -8.685477
322378   -7.382502
618039    4.866700
68007     8.385467
349835   -4.857045
192740    4.593724
424122   -4.192202
14016     9.868570
365656   -5.963991
194527   -6.159378
505257   -5.125802
168565   -6.767794
724473   13.475251
538372    4.883085
803158   -4.646762
787149    7.470403
576653    6.305597
196752    4.558284
789928   -4.516645
815969   -5.075761
118659   -7.900653
1058530  11.285714
67807     7.170830
827712    4.653743
787118   -5.531347
800968   10.423688
839800    4.868601
812435   11.189979
483007   -5.042667
356038   -5.401634
582939  -11.904831
279255  -25.034352
811211    7.795037
931949    5.067634
532551    5.475649
753639   -2.259115
807493   -5.220624

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
402322   rs4997569       7_65 9.829562e-01 3420.937 9.785874e-03
402314  rs10274607       7_65 6.568322e-02 3411.407 6.520910e-04
402317  rs13230660       7_65 1.763679e-01 3408.755 1.749587e-03
402329   rs6952534       7_65 7.708240e-03 3406.797 7.642260e-05
402328   rs4730069       7_65 1.970040e-03 3403.461 1.951264e-05
402311 rs763798411       7_65 1.000000e+00 3396.768 9.885215e-03
402321  rs10242713       7_65 6.068999e-05 3390.716 5.988649e-07
402324  rs10249965       7_65 8.713886e-07 3363.642 8.529860e-09
402336   rs1013016       7_65 0.000000e+00 3216.978 0.000000e+00
402361   rs8180737       7_65 0.000000e+00 3065.988 0.000000e+00
402354  rs17778396       7_65 0.000000e+00 3064.332 0.000000e+00
402355   rs2237621       7_65 0.000000e+00 3063.107 0.000000e+00
402388  rs10224564       7_65 0.000000e+00 3057.305 0.000000e+00
402326  rs71562637       7_65 0.000000e+00 3056.582 0.000000e+00
402373  rs10255779       7_65 0.000000e+00 3056.316 0.000000e+00
402390  rs78132606       7_65 0.000000e+00 3040.880 0.000000e+00
402393   rs4610671       7_65 0.000000e+00 3035.877 0.000000e+00
402395  rs12669532       7_65 0.000000e+00 2912.603 0.000000e+00
402352   rs2237618       7_65 0.000000e+00 2858.322 0.000000e+00
402397 rs118089279       7_65 0.000000e+00 2835.100 0.000000e+00
402384  rs73188303       7_65 0.000000e+00 2827.173 0.000000e+00
787065 rs147985405       19_9 9.984711e-01 2244.602 6.522215e-03
402394 rs560364150       7_65 0.000000e+00 2237.980 0.000000e+00
787060  rs73015020       19_9 8.949176e-04 2232.717 5.814829e-06
787058 rs138175288       19_9 4.220295e-04 2230.916 2.739973e-06
787061  rs77140532       19_9 6.329670e-05 2227.534 4.103228e-07
787059 rs138294113       19_9 1.041828e-04 2226.914 6.751805e-07
787063  rs10412048       19_9 1.308366e-05 2224.254 8.469035e-08
787062 rs112552009       19_9 3.159236e-05 2223.223 2.044021e-07
797236    rs814573      19_32 1.000000e+00 2204.074 6.414259e-03
787057  rs55997232       19_9 1.646887e-08 2203.739 1.056196e-10
402380  rs10261738       7_65 0.000000e+00 1848.229 0.000000e+00
787066  rs17248769       19_9 1.554475e-06 1690.833 7.649000e-09
787067   rs2228671       19_9 1.068461e-06 1679.769 5.223101e-09
797231  rs34878901      19_32 0.000000e+00 1526.407 0.000000e+00
874797  rs12740374       1_67 5.258327e-04 1447.111 2.214470e-06
874793   rs7528419       1_67 5.279146e-04 1443.106 2.217085e-06
874804    rs646776       1_67 4.548291e-04 1441.930 1.908590e-06
874803    rs629301       1_67 4.234869e-04 1438.277 1.772568e-06
797228   rs8106922      19_32 0.000000e+00 1437.535 0.000000e+00
874815    rs583104       1_67 4.585891e-04 1398.079 1.865846e-06
402335 rs368909701       7_65 0.000000e+00 1395.896 0.000000e+00
874818   rs4970836       1_67 4.509678e-04 1395.221 1.831086e-06
874820   rs1277930       1_67 4.598895e-04 1390.562 1.861076e-06
874821    rs599839       1_67 4.728917e-04 1389.624 1.912403e-06
874801   rs3832016       1_67 3.327406e-04 1351.220 1.308435e-06
874798    rs660240       1_67 3.319125e-04 1344.095 1.298296e-06
797241  rs12721109      19_32 1.000000e+00 1341.067 3.902750e-03
874816    rs602633       1_67 3.693678e-04 1323.029 1.422161e-06
797156  rs62120566      19_32 0.000000e+00 1321.045 0.000000e+00
                 z
402322   2.9841166
402314   2.8669582
402317   2.9479628
402329   2.8884240
402328   2.8658735
402311  -3.2721491
402321   2.8123983
402324   2.8497381
402336  -2.3988524
402361   2.8328454
402354   2.7980012
402355   2.8029605
402388   2.7911904
402326   2.6635936
402373   2.8135791
402390   2.7728082
402393   2.7249742
402395   2.7702573
402352   2.4663255
402397   2.6667208
402384   2.4217031
787065  48.9351750
402394   1.8694582
787060  48.7956295
787058  48.7806894
787061  48.7379874
787059  48.7519286
787063  48.7012269
787062  48.7051628
797236 -55.5378874
787057  48.5243103
402380   2.6665109
787066  40.8424908
787067  40.7026250
797231 -16.3492722
874797  41.7934744
874793  41.7369129
874804 -41.7333995
874803 -41.6873361
797228 -15.6770531
874815 -41.0870961
402335   0.7778883
874818 -41.0454951
874820 -40.9759931
874821 -40.9589874
874801 -40.3959842
874798 -40.2895814
797241  46.3258178
874816 -39.9564086
797156  33.7353904

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
402311  rs763798411       7_65 1.00000000 3396.76754 0.0098852152
402322    rs4997569       7_65 0.98295622 3420.93741 0.0097858737
787065  rs147985405       19_9 0.99847110 2244.60176 0.0065222148
797236     rs814573      19_32 1.00000000 2204.07397 0.0064142586
797241   rs12721109      19_32 1.00000000 1341.06697 0.0039027503
797185   rs62117204      19_32 1.00000000  825.46406 0.0024022515
797238  rs113345881      19_32 1.00000000  772.04571 0.0022467943
797203  rs111794050      19_32 1.00000000  763.45042 0.0022217805
68013      rs548145       2_13 1.00000000  656.37401 0.0019101685
402317   rs13230660       7_65 0.17636791 3408.75456 0.0017495873
68010      rs934197       2_13 1.00000000  415.42495 0.0012089626
279255    rs3843482       5_45 0.83314155  389.97044 0.0009455201
500307  rs115478735       9_70 1.00000000  302.07254 0.0008790864
14016     rs1887552       1_34 0.90647969  326.56618 0.0008614887
14015     rs2495502       1_34 1.00000000  283.39934 0.0008247440
787073    rs1569372       19_9 0.99909307  268.63487 0.0007810676
459763   rs79658059       8_83 0.96071974  258.87980 0.0007237943
789854    rs2285626      19_15 1.00000000  245.81655 0.0007153711
1025547    rs964184      11_70 1.00000000  238.93817 0.0006953538
787044   rs73013176       19_9 1.00000000  237.05919 0.0006898856
365662   rs12208357      6_103 1.00000000  234.68289 0.0006829702
68004     rs1042034       2_13 1.00000000  233.15942 0.0006785366
68090     rs1848922       2_13 1.00000000  229.85868 0.0006689308
402314   rs10274607       7_65 0.06568322 3411.40671 0.0006520910
459774   rs13252684       8_83 0.99999914  216.74704 0.0006307730
789879    rs3794991      19_15 0.99999308  212.34130 0.0006179478
14033      rs471705       1_34 0.99996426  207.61758 0.0006041836
279232   rs10062361       5_45 0.98096637  198.65388 0.0005671154
796944   rs62115478      19_30 0.99999589  179.71694 0.0005230070
907819    rs6544713       2_27 0.76455924  223.20989 0.0004966436
69740      rs780093       2_16 1.00000000  160.58198 0.0004673229
753654    rs8070232      17_39 1.00000000  144.02728 0.0004191457
365676    rs3818678      6_103 0.75522649  190.32678 0.0004183092
753628  rs113408695      17_39 1.00000000  143.15222 0.0004165992
724473     rs821840      16_31 0.88762642  154.64189 0.0003994640
14026    rs10888896       1_34 0.99999990  131.44559 0.0003825307
67955    rs11679386       2_12 1.00000000  127.40762 0.0003707795
1058530    rs763665      16_38 0.85774374  137.83761 0.0003440690
304134   rs12657266       5_92 0.74890935  153.04004 0.0003335452
1058537  rs77303550      16_38 0.70613003  160.90921 0.0003306632
787082  rs137992968       19_9 0.99999998  112.56051 0.0003275717
753639    rs9303012      17_39 0.80932168  135.16346 0.0003183470
440113    rs4738679       8_45 0.99999998  106.62327 0.0003102932
459762    rs2980875       8_83 0.57334810  184.71362 0.0003082035
365810  rs117733303      6_104 0.99945686   97.23071 0.0002828055
619946     rs653178      12_67 0.99189782   91.31527 0.0002635910
789838   rs12981966      19_15 0.99867674   90.09531 0.0002618469
365846   rs56393506      6_104 0.99999988   88.86744 0.0002586205
787068    rs3745677       19_9 0.99981383   88.64458 0.0002579239
13985    rs11580527       1_34 0.99998185   87.73831 0.0002553299
                 z
402311   -3.272149
402322    2.984117
787065   48.935175
797236  -55.537887
797241   46.325818
797185   44.672230
797238   34.318568
797203   33.599649
68013   -33.086010
402317    2.947963
68010   -33.060888
279255  -25.034352
500307  -19.011790
14016     9.868570
14015    -6.292225
787073  -10.005506
459763   16.022043
789854   18.215134
1025547  16.661098
787044   16.232742
365662  -12.282337
68004   -16.573036
68090   -25.412292
402314    2.866958
459774  -11.964411
789879   21.492060
14033   -16.262997
279232  -20.320600
796944   14.326186
907819   20.377651
69740    14.142603
753654    8.091491
365676    9.947776
753628  -12.768796
724473   13.475251
14026   -11.893801
67955   -11.909428
1058530  11.285714
304134  -13.894754
1058537  13.732910
787082   10.752566
753639   -2.259115
440113   11.699924
459762   22.102229
365810  -10.097959
619946  -11.050062
789838   -1.822895
365846  -14.088321
787068   -9.335807
13985    11.167216

SNPs with largest z scores

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

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
#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
797236    rs814573      19_32 1.000000e+00 2204.0740 6.414259e-03
787065 rs147985405       19_9 9.984711e-01 2244.6018 6.522215e-03
787060  rs73015020       19_9 8.949176e-04 2232.7167 5.814829e-06
787058 rs138175288       19_9 4.220295e-04 2230.9159 2.739973e-06
787059 rs138294113       19_9 1.041828e-04 2226.9140 6.751805e-07
787061  rs77140532       19_9 6.329670e-05 2227.5335 4.103228e-07
787062 rs112552009       19_9 3.159236e-05 2223.2228 2.044021e-07
787063  rs10412048       19_9 1.308366e-05 2224.2535 8.469035e-08
787057  rs55997232       19_9 1.646887e-08 2203.7393 1.056196e-10
797241  rs12721109      19_32 1.000000e+00 1341.0670 3.902750e-03
797185  rs62117204      19_32 1.000000e+00  825.4641 2.402251e-03
797172   rs1551891      19_32 0.000000e+00  505.0335 0.000000e+00
874797  rs12740374       1_67 5.258327e-04 1447.1112 2.214470e-06
874793   rs7528419       1_67 5.279146e-04 1443.1063 2.217085e-06
874804    rs646776       1_67 4.548291e-04 1441.9296 1.908590e-06
874803    rs629301       1_67 4.234869e-04 1438.2770 1.772568e-06
874815    rs583104       1_67 4.585891e-04 1398.0793 1.865846e-06
874818   rs4970836       1_67 4.509678e-04 1395.2209 1.831086e-06
874820   rs1277930       1_67 4.598895e-04 1390.5620 1.861076e-06
874821    rs599839       1_67 4.728917e-04 1389.6244 1.912403e-06
787066  rs17248769       19_9 1.554475e-06 1690.8330 7.649000e-09
787067   rs2228671       19_9 1.068461e-06 1679.7693 5.223101e-09
874801   rs3832016       1_67 3.327406e-04 1351.2199 1.308435e-06
874798    rs660240       1_67 3.319125e-04 1344.0945 1.298296e-06
874816    rs602633       1_67 3.693678e-04 1323.0289 1.422161e-06
787056   rs9305020       19_9 4.507505e-14 1277.3696 1.675611e-16
797232    rs405509      19_32 0.000000e+00  976.8097 0.000000e+00
874784   rs4970834       1_67 7.297850e-04  999.8354 2.123459e-06
797238 rs113345881      19_32 1.000000e+00  772.0457 2.246794e-03
797156  rs62120566      19_32 0.000000e+00 1321.0455 0.000000e+00
797203 rs111794050      19_32 1.000000e+00  763.4504 2.221780e-03
68013     rs548145       2_13 1.000000e+00  656.3740 1.910168e-03
797209   rs4802238      19_32 0.000000e+00  977.7256 0.000000e+00
68010     rs934197       2_13 1.000000e+00  415.4249 1.208963e-03
797150 rs188099946      19_32 0.000000e+00 1266.3246 0.000000e+00
797220   rs2972559      19_32 0.000000e+00 1298.6720 0.000000e+00
797144 rs201314191      19_32 0.000000e+00 1174.4714 0.000000e+00
874805   rs3902354       1_67 3.794228e-04  853.2594 9.421602e-07
874794  rs11102967       1_67 3.804886e-04  849.6587 9.408197e-07
874819   rs4970837       1_67 4.352324e-04  846.2013 1.071803e-06
797211  rs56394238      19_32 0.000000e+00  968.7925 0.000000e+00
797188   rs2965169      19_32 0.000000e+00  367.3409 0.000000e+00
797212   rs3021439      19_32 0.000000e+00  864.3579 0.000000e+00
874789    rs611917       1_67 3.613461e-04  800.7116 8.420149e-07
68040   rs12997242       2_13 5.728407e-11  384.1171 6.403506e-14
797219  rs12162222      19_32 0.000000e+00 1112.8957 0.000000e+00
68014     rs478588       2_13 1.461202e-10  604.3621 2.569969e-13
797149  rs62119327      19_32 0.000000e+00 1034.6882 0.000000e+00
68015   rs56350433       2_13 5.923373e-12  351.2369 6.054656e-15
68020   rs56079819       2_13 5.935363e-12  350.4365 6.053088e-15
               z
797236 -55.53789
787065  48.93517
787060  48.79563
787058  48.78069
787059  48.75193
787061  48.73799
787062  48.70516
787063  48.70123
787057  48.52431
797241  46.32582
797185  44.67223
797172  42.26680
874797  41.79347
874793  41.73691
874804 -41.73340
874803 -41.68734
874815 -41.08710
874818 -41.04550
874820 -40.97599
874821 -40.95899
787066  40.84249
787067  40.70262
874801 -40.39598
874798 -40.28958
874816 -39.95641
787056  34.84073
797232  34.63979
874784  34.62492
797238  34.31857
797156  33.73539
797203  33.59965
68013  -33.08601
797209 -33.07569
68010  -33.06089
797150  33.04407
797220 -32.28660
797144  32.06858
874805 -32.00383
874794 -31.93893
874819 -31.85593
797211 -31.55187
797188  31.38057
797212 -31.04506
874789  30.97527
68040  -30.81528
797219 -30.49671
68014  -30.48811
797149  30.41868
68015  -30.23229
68020  -30.19307

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] 33
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"

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
30c7e5d wesleycrouse 2021-10-05
04b2bb7 wesleycrouse 2021-10-05
                                                      Term Overlap
1             peptidyl-serine phosphorylation (GO:0018105)   5/156
2                peptidyl-serine modification (GO:0018209)   5/169
3                             lipid transport (GO:0006869)   4/109
4                       cholesterol transport (GO:0030301)    3/51
5           intestinal cholesterol absorption (GO:0030299)     2/9
6       cellular response to sterol depletion (GO:0071501)     2/9
7  negative regulation of cholesterol storage (GO:0010887)    2/10
8                     protein phosphorylation (GO:0006468)   6/496
9                 intestinal lipid absorption (GO:0098856)    2/11
10                    cholesterol homeostasis (GO:0042632)    3/71
11                         sterol homeostasis (GO:0055092)    3/72
12              cholesterol metabolic process (GO:0008203)    3/77
13          regulation of cholesterol storage (GO:0010885)    2/16
14         activin receptor signaling pathway (GO:0032924)    2/19
15       negative regulation of lipid storage (GO:0010888)    2/20
16                           sterol transport (GO:0015918)    2/21
17                         cholesterol efflux (GO:0033344)    2/24
18     regulation of DNA biosynthetic process (GO:2000278)    2/29
19      cellular protein modification process (GO:0006464)  7/1025
20           regulation of cholesterol efflux (GO:0010874)    2/33
21     secondary alcohol biosynthetic process (GO:1902653)    2/34
22                organic substance transport (GO:0071702)   3/136
23           cholesterol biosynthetic process (GO:0006695)    2/35
24                sterol biosynthetic process (GO:0016126)    2/38
   Adjusted.P.value                                    Genes
1       0.001778112             CSNK1G3;TNKS;PKN3;PRKD2;GAS6
2       0.001778112             CSNK1G3;TNKS;PKN3;PRKD2;GAS6
3       0.004505375                  ABCA1;ABCG8;NPC1L1;PLTP
4       0.007029494                       ABCA1;ABCG8;NPC1L1
5       0.007029494                             ABCG8;NPC1L1
6       0.007029494                            INSIG2;NPC1L1
7       0.007144915                             ABCA1;TTC39B
8       0.007144915      CSNK1G3;ACVR1C;TNKS;PKN3;PRKD2;GAS6
9       0.007144915                             ABCG8;NPC1L1
10      0.009177895                       ABCA1;ABCG8;TTC39B
11      0.009177895                       ABCA1;ABCG8;TTC39B
12      0.010261090                      ABCA1;INSIG2;NPC1L1
13      0.010736790                             ABCA1;TTC39B
14      0.014163171                             ACVR1C;INHBB
15      0.014672589                             ABCA1;TTC39B
16      0.015187830                             ABCG8;NPC1L1
17      0.018728919                              ABCA1;ABCG8
18      0.025886117                               TNKS;PRKD2
19      0.028304765 CSNK1G3;ACVR1C;TNKS;PKN3;PRKD2;FUT2;GAS6
20      0.029365079                              PLTP;TTC39B
21      0.029365079                            INSIG2;NPC1L1
22      0.029365079                         ABCA1;ABCG8;PLTP
23      0.029506425                            INSIG2;NPC1L1
24      0.033306505                            INSIG2;NPC1L1
[1] "GO_Cellular_Component_2021"

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
                                            Term Overlap Adjusted.P.value
1 high-density lipoprotein particle (GO:0034364)    2/19       0.01641280
2    endoplasmic reticulum membrane (GO:0005789)   6/712       0.01794926
                                 Genes
1                             HPR;PLTP
2 ABCA1;CYP2A6;INSIG2;KDSR;FADS1;CNIH4
[1] "GO_Molecular_Function_2021"
                                                   Term Overlap
1            cholesterol transfer activity (GO:0120020)    3/18
2                 sterol transfer activity (GO:0120015)    3/19
3 phosphatidylcholine transporter activity (GO:0008525)    2/18
  Adjusted.P.value            Genes
1     0.0001655238 ABCA1;ABCG8;PLTP
2     0.0001655238 ABCA1;ABCG8;PLTP
3     0.0112569839       ABCA1;PLTP
CSNK1G3 gene(s) from the input list not found in DisGeNET CURATEDTNKS gene(s) from the input list not found in DisGeNET CURATEDDDX56 gene(s) from the input list not found in DisGeNET CURATEDCRACR2B gene(s) from the input list not found in DisGeNET CURATEDRP4-781K5.7 gene(s) from the input list not found in DisGeNET CURATEDPOP7 gene(s) from the input list not found in DisGeNET CURATEDTRIM39 gene(s) from the input list not found in DisGeNET CURATEDPKN3 gene(s) from the input list not found in DisGeNET CURATEDC10orf88 gene(s) from the input list not found in DisGeNET CURATEDCNIH4 gene(s) from the input list not found in DisGeNET CURATEDACP6 gene(s) from the input list not found in DisGeNET CURATEDNPC1L1 gene(s) from the input list not found in DisGeNET CURATEDPSRC1 gene(s) from the input list not found in DisGeNET CURATEDSPTY2D1 gene(s) from the input list not found in DisGeNET CURATEDPELO gene(s) from the input list not found in DisGeNET CURATEDHPR gene(s) from the input list not found in DisGeNET CURATEDUSP1 gene(s) from the input list not found in DisGeNET CURATEDTTC39B gene(s) from the input list not found in DisGeNET CURATED
                        Description        FDR Ratio BgRatio
5          Blood Platelet Disorders 0.01214043  2/15 16/9703
21             Hypercholesterolemia 0.01214043  2/15 39/9703
22   Hypercholesterolemia, Familial 0.01214043  2/15 18/9703
36                  Opisthorchiasis 0.01214043  1/15  1/9703
43                  Tangier Disease 0.01214043  1/15  1/9703
57         Caliciviridae Infections 0.01214043  1/15  1/9703
63          Infections, Calicivirus 0.01214043  1/15  1/9703
77  Opisthorchis felineus Infection 0.01214043  1/15  1/9703
78 Opisthorchis viverrini Infection 0.01214043  1/15  1/9703
89        Hypoalphalipoproteinemias 0.01214043  1/15  1/9703
******************************************

*                                        *

*          Welcome to WebGestaltR !      *

*                                        *

******************************************

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
                    description size overlap          FDR       database
1       Coronary Artery Disease  153      10 1.274177e-07 disease_GLAD4U
2                 Dyslipidaemia   84       8 3.535758e-07 disease_GLAD4U
3              Coronary Disease  171       9 3.202353e-06 disease_GLAD4U
4              Arteriosclerosis  173       8 5.579161e-05 disease_GLAD4U
5           Myocardial Ischemia  181       8 6.337034e-05 disease_GLAD4U
6   Arterial Occlusive Diseases  174       7 5.907884e-04 disease_GLAD4U
7          Hypercholesterolemia   60       5 5.907884e-04 disease_GLAD4U
8                Heart Diseases  227       7 2.988516e-03 disease_GLAD4U
9       Cardiovascular Diseases  282       7 1.082847e-02 disease_GLAD4U
10 Fat digestion and absorption   23       3 1.407039e-02   pathway_KEGG
11              Hyperlipidemias   64       4 1.407039e-02 disease_GLAD4U
12            Vascular Diseases  234       6 2.609523e-02 disease_GLAD4U
13       Cholesterol metabolism   31       3 2.854433e-02   pathway_KEGG
14                      Obesity  172       5 4.854820e-02 disease_GLAD4U
                                                           userId
1  PSRC1;ABCG8;INSIG2;NPC1L1;TTC39B;ABCA1;SPTY2D1;FADS1;FUT2;PLTP
2               PSRC1;ABCG8;INSIG2;NPC1L1;TTC39B;ABCA1;FADS1;PLTP
3          PSRC1;ABCG8;INSIG2;NPC1L1;TTC39B;ABCA1;FADS1;FUT2;PLTP
4                  PSRC1;ABCG8;NPC1L1;TTC39B;ABCA1;FADS1;HPR;PLTP
5               PSRC1;ABCG8;INSIG2;NPC1L1;TTC39B;ABCA1;FADS1;PLTP
6                      PSRC1;ABCG8;NPC1L1;TTC39B;ABCA1;FADS1;PLTP
7                                  ABCG8;INSIG2;NPC1L1;ABCA1;PLTP
8                      PSRC1;ABCG8;NPC1L1;TTC39B;ABCA1;FADS1;PLTP
9                        PSRC1;ABCG8;TTC39B;ABCA1;FADS1;GAS6;PLTP
10                                             ABCG8;NPC1L1;ABCA1
11                                        ABCG8;NPC1L1;ABCA1;PLTP
12                             PSRC1;ABCG8;NPC1L1;ABCA1;GAS6;PLTP
13                                               ABCG8;ABCA1;PLTP
14                                 INSIG2;TTC39B;ABCA1;FADS1;PLTP

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] 46
#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.582853
#number of ctwas genes
length(ctwas_genes)
[1] 33
#number of TWAS genes
length(twas_genes)
[1] 216
#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
9062  KLHDC7A       1_13 0.8184900 22.59307 5.381570e-05  4.124187
6391   TTC39B       9_13 0.9260006 23.04986 6.211548e-05 -4.287139
8931  CRACR2B       11_1 0.8018304 22.03486 5.141775e-05 -3.989585
3247     KDSR      18_35 0.9552678 24.68795 6.863262e-05 -4.526287
     num_eqtl
9062        1
6391        3
8931        1
3247        1
#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.08695652 0.27536232 
#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.9975127 0.9818517 
#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.18181818 0.08796296 
#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)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
d3ba9fc wesleycrouse 2021-09-15
358d210 wesleycrouse 2021-09-15

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] 46
#number of bystander genes (with imputed expression)
print(length(unrelated_genes))
[1] 548
#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.582853
#number of ctwas genes (in known annotations or bystanders)
length(ctwas_genes)
[1] 8
#number of TWAS genes (in known annotations or bystanders)
length(twas_genes)
[1] 61
#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.1304348 0.4130435 
#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 
0.9963504 0.9233577 
#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 
0.7500000 0.3114754 
#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")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
eacba36 wesleycrouse 2021-09-08
0c9ef1c wesleycrouse 2021-09-08
#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)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
#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)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
#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")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20

PIP Manhattan Plot

library(tibble)
library(tidyverse)
── Attaching packages ────────────────────────────────── tidyverse 1.3.0 ──
✔ tidyr   1.1.0     ✔ dplyr   1.0.7
✔ readr   1.4.0     ✔ stringr 1.4.0
✔ purrr   0.3.4     ✔ forcats 0.4.0
── 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 )) +
  
  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")
Warning: ggrepel: 14 unlabeled data points (too many overlaps). Consider
increasing max.overlaps

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
f1d1149 wesleycrouse 2021-09-20
d9a511d wesleycrouse 2021-09-20
6392888 wesleycrouse 2021-09-16
e5441f9 wesleycrouse 2021-09-16

Load gene positions

#####load positions for all genes on autosomes in ENSEMBL, subset to only protein coding and lncRNA with non-missing HGNC symbol
# library(biomaRt)
# 
# 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", "ensembl_gene_id"), values=1:22, mart=ensembl)
# save(G_list, file=paste0("G_list_", trait_id, ".RData"))
load(paste0("G_list_", trait_id, ".RData"))

G_list <- G_list[G_list$gene_biotype %in% c("protein_coding","lncRNA"),]

Locus Plots - 1_67

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,]
  
  a$pos <- a$pos/1000000
  
  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(min(a$pos), y= 1 ,c("Gene", "SNP","Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = c(22,21,19,19,19), col = c("black", "black", "salmon", "purple", colorsall[1]), cex=0.7, 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 (Mb)"), frame.plot=FALSE, bg = colorsall[1], ylab = "-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_67", label="TWAS")

Locus Plots - 5_45 - Thin

locus_plot4 <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS", xlim=NULL){
  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$pos <- a$pos/1000000
  
  if (!is.null(xlim)){
    
    if (is.na(xlim[1])){
      xlim[1] <- min(a$pos)
    }
    
    if (is.na(xlim[2])){
      xlim[2] <- max(a$pos)
    }
    
    a <- a[a$pos>=xlim[1] & a$pos<=xlim[2],,drop=F]
  }
  
  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(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1.1 ,c("Gene", "SNP"), pch = c(22,21), title="", 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="", bty ='n', cex=0.6, title.adj = 0)
  
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1 ,c("Gene", "SNP","Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = c(22,21,19,19,19), col = c("black", "black", "salmon", "purple", colorsall[1]), cex=0.7, 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 (Mb)"), frame.plot=FALSE, bg = colorsall[1], ylab = "-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_plot6 <- function(region_tag, rerun_ctwas = F, plot_eqtl = T, label="cTWAS", xlim=NULL, return_table=F){
  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$pos[a$type=="gene"] <- G_list$start_position[match(sapply(a$id[a$type=="gene"], function(x){unlist(strsplit(x, "[.]"))[1]}) ,G_list$ensembl_gene_id)]
  a$pos <- a$pos/1000000
  
  if (!is.null(xlim)){
    
    if (is.na(xlim[1])){
      xlim[1] <- min(a$pos)
    }
    
    if (is.na(xlim[2])){
      xlim[2] <- max(a$pos)
    }
    
    a <- a[a$pos>=xlim[1] & a$pos<=xlim[2],,drop=F]
  }
  
  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 = 21, xlab=paste0("Chromosome ", region_tag1, " position (Mb)"), frame.plot=FALSE, bg = colorsall[1], ylab = "-log10(p value)", panel.first = grid(), ylim =c(-(1/6)*max(a$PVALUE), max(a$PVALUE)*1.2), xaxt = 'n')
  
  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 (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( -(1/6)*max(a$PVALUE), nrow(a[a$id %in% eqtls,])), pch = "|", col = "salmon", cex = 1.5)
    }
  }
  
  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)
  }
  
  par(mar = c(4.1, 4.1, 0.5, 2.1))

  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " position (Mb)"),frame.plot=FALSE, col = "white", ylim= c(0,1.1), ylab = "cTWAS PIP")
  
  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)
  
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1 ,c("Gene", "SNP","Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = c(22,21,19,19,19), col = c("black", "black", "salmon", "purple", colorsall[1]), cex=0.7, 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)
  }
  
  if (return_table){
    return(a)
  }
}
#locus_plot("5_45", label="TWAS")
#locus_plot4("5_45", label="TWAS",xlim=c(74.5,76.5))
locus_plot6("5_45", label="TWAS",xlim=c(75,76))

Locus Plots - 5_45 - Re-run

#locus_plot4("5_45", label="TWAS",rerun_ctwas = T,xlim=c(74.5,76.5))
locus_plot6("5_45", label="TWAS",rerun_ctwas = T,xlim=c(75,76))

Locus Plots - 8_12

#locus_plot4("8_12", label="cTWAS",xlim=c(NA, 9.6))
a <- locus_plot6("8_12", label="TWAS", xlim=c(NA, 9.7), return_table=T)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
5b57eba wesleycrouse 2022-05-07
91b5513 wesleycrouse 2022-05-07
3066a5b wesleycrouse 2022-05-07
3652437 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
21931ca wesleycrouse 2021-10-07
ac09012 wesleycrouse 2021-10-07
30c7e5d wesleycrouse 2021-10-05
04b2bb7 wesleycrouse 2021-10-05
6ac54ea wesleycrouse 2021-10-04
014b1c7 wesleycrouse 2021-10-04
a[a$type=="gene",c("genename", "r2max", "susie_pip")]
           genename     r2max   susie_pip
8531           TNKS 1.0000000 0.984399078
11738 RP11-115J16.2 0.2100029 0.004472713

Locus Plots - 19_33

locus_plot6("19_33", label="TWAS", xlim=c(NA,46.85))

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
5b57eba wesleycrouse 2022-05-07
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
6357b14 wesleycrouse 2021-11-12
b4b6166 wesleycrouse 2021-11-12
6ac54ea wesleycrouse 2021-10-04
014b1c7 wesleycrouse 2021-10-04

Locus Plots - Exploring known annotations

This section produces locus plots for all silver standard genes with known annotations. The highlighted gene at each region is the silver standard gene. Note that if no genes in a region have PIP>0.8, then only the result using thinned SNPs is displayed.

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,])
}

Version Author Date
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
[1] "ITIH4"
[1] "3_36"
      genename region_tag   susie_pip       mu2          PVE          z
158       PHF7       3_36 0.010706456  9.513164 2.964088e-07  1.0713405
159     SEMA3G       3_36 0.010799211  9.205092 2.892947e-07 -0.4278002
160      NISCH       3_36 0.006431247  5.078652 9.505260e-08  0.2448166
161      STAB1       3_36 0.089876013 21.813648 5.705483e-06  3.5822738
236       CHDH       3_36 0.006480493  5.067464 9.556943e-08  0.1444517
239     GLT8D1       3_36 0.025263333 17.372062 1.277210e-06  2.5357598
374      PARP3       3_36 0.008814101  7.946103 2.038227e-07  0.9395160
481      ITIH4       3_36 0.007120513  6.630772 1.374028e-07  0.8376918
482      ITIH1       3_36 0.079834327 27.969934 6.498325e-06  3.3942500
486     IL17RB       3_36 0.006663186  5.296065 1.026965e-07  0.1956411
2783     ACTR8       3_36 0.006661663  5.259447 1.019631e-07  0.3348511
2847      RRP9       3_36 0.008912866  8.053283 2.088866e-07 -0.9533837
2853     DNAH1       3_36 0.023206072 17.785922 1.201153e-06  2.8547462
2856     TNNC1       3_36 0.074838019 20.834317 4.537555e-06 -3.4591550
2861      NEK4       3_36 0.029870904 18.721193 1.627430e-06 -2.8779547
6912     ITIH3       3_36 0.114735498 31.481555 1.051173e-05  3.5156979
7200       TKT       3_36 0.017086649 13.589455 6.757394e-07  2.5841158
7201     PRKCD       3_36 0.007211188  6.210163 1.303257e-07 -0.6434864
7202    SFMBT1       3_36 0.009983053  9.825259 2.854485e-07  2.0068207
7203      GNL3       3_36 0.081280367 24.021707 5.682113e-06 -3.6426177
7204     PBRM1       3_36 0.008572816  6.953349 1.734754e-07 -0.8048656
7244     POC1A       3_36 0.006621721  5.439130 1.048143e-07  0.6100943
7245     PPM1M       3_36 0.008144686  7.075938 1.677176e-07 -1.0722712
7247     WDR82       3_36 0.006887572  5.638485 1.130183e-07 -0.3708077
7915    GLYCTK       3_36 0.020740490 14.425847 8.707242e-07 -1.6364989
7918    NT5DC2       3_36 0.006439573  5.124731 9.603919e-08 -0.5772516
10835  TMEM110       3_36 0.007528511  6.948471 1.522364e-07  1.5371064
11516     ACY1       3_36 0.007063735  5.902052 1.213271e-07 -0.5115172
11578     TWF2       3_36 0.010426651 10.279723 3.119224e-07 -1.4613887
12349   MUSTN1       3_36 0.009317489  8.974400 2.433462e-07  2.0802688
12386    DCP1A       3_36 0.007488664  6.484291 1.413146e-07  0.5186961
      num_eqtl
158          1
159          1
160          2
161          1
236          1
239          2
374          1
481          3
482          1
486          2
2783         3
2847         1
2853         2
2856         2
2861         1
6912         1
7200         1
7201         1
7202         1
7203         2
7204         1
7244         1
7245         3
7247         1
7915         1
7918         2
10835        2
11516        1
11578        2
12349        2
12386        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
[1] "EPHX2"
[1] "8_27"
      genename region_tag   susie_pip       mu2          PVE           z
1295    DPYSL2       8_27 0.006115808  4.894634 8.711530e-08  0.04738342
3371    ADRA1A       8_27 0.008801958  8.466690 2.168769e-07 -0.92728371
11425    PNMA2       8_27 0.006148025  4.946153 8.849596e-08 -0.21331428
1869    TRIM35       8_27 0.015125406 13.787489 6.068935e-07  1.42379941
3368       CLU       8_27 0.007487487  6.879414 1.499021e-07  0.59866869
3374     EPHX2       8_27 0.006430687  5.386956 1.008140e-07 -0.24570047
5838    CCDC25       8_27 0.012296147 11.750606 4.204841e-07  1.25261686
7893    SCARA3       8_27 0.019714379 16.397573 9.407690e-07 -1.50201507
7894       PBK       8_27 0.006767180  5.887176 1.159405e-07  0.48335074
7895    SCARA5       8_27 0.006113649  4.891171 8.702291e-08 -0.01387977
8304     ESCO2       8_27 0.010206151  9.920073 2.946437e-07  1.06980762
9998     NUGGC       8_27 0.037029210 22.632860 2.438957e-06  2.06999161
      num_eqtl
1295         1
3371         2
11425        1
1869         2
3368         1
3374         2
5838         1
7893         2
7894         1
7895         1
8304         2
9998         2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "ABCA1"
[1] "9_53"
     genename region_tag   susie_pip       mu2          PVE          z
1314  TMEM38B       9_53 0.001903962  7.860772 4.355558e-08  0.7019380
2193     FKTN       9_53 0.001193999  7.325907 2.545574e-08 -0.7642857
7410    ABCA1       9_53 0.995395540 70.368051 2.038410e-04  7.9820172
     num_eqtl
1314        1
2193        1
7410        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LPL"
[1] "8_21"
       genename region_tag   susie_pip       mu2          PVE          z
1906     INTS10       8_21 0.009985855  7.775823 2.259706e-07 -0.5466864
5836 CSGALNACT1       8_21 0.007456161  5.829327 1.264894e-07 -0.8624862
8739        LPL       8_21 0.023413977 16.909625 1.152204e-06 -1.8179375
     num_eqtl
1906        1
5836        1
8739        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "APOA5"
[1] "11_70"
     genename region_tag   susie_pip        mu2          PVE            z
2465    APOA5      11_70 0.032499310 145.137290 1.372693e-05 -11.35991043
2466   CEP164      11_70 0.004664335   5.763478 7.823385e-08  -0.30209785
3154    APOA1      11_70 0.004278433   6.652387 8.282903e-08   1.11150616
4868    BUD13      11_70 0.005760822  36.876896 6.182429e-07   4.11527976
4881    FXYD2      11_70 0.004684209   6.128819 8.354747e-08  -0.37435241
6005    SIDT2      11_70 0.004140080   5.468270 6.588385e-08   0.50104522
6006    TAGLN      11_70 0.004614747  18.478038 2.481556e-07  -1.55444774
6785    PCSK7      11_70 0.012766309  16.431533 6.104692e-07   0.97935688
7745   RNF214      11_70 0.004787469   6.579101 9.166273e-08  -0.52468931
7898 PAFAH1B2      11_70 0.005499613   7.725577 1.236469e-07  -0.01722766
9720    BACE1      11_70 0.004495796  21.121379 2.763434e-07  -4.13706265
     num_eqtl
2465        1
2466        2
3154        2
4868        1
4881        2
6005        1
6006        1
6785        1
7745        1
7898        2
9720        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "MTTP"
[1] "4_66"
           genename region_tag   susie_pip       mu2          PVE
5055           MTTP       4_66 0.010983292  8.019879 2.563425e-07
5686        TRMT10A       4_66 0.011475975  9.119571 3.045680e-07
6091          EIF4E       4_66 0.009482310  6.919569 1.909473e-07
7222         METAP1       4_66 0.007832110  5.097754 1.161924e-07
7980         TSPAN5       4_66 0.014674546 11.179398 4.774231e-07
8496           ADH6       4_66 0.009968692  7.562598 2.193964e-07
10057          ADH7       4_66 0.009291632 10.533599 2.848322e-07
10115         ADH1B       4_66 0.014780629 11.319472 4.868995e-07
11584         ADH1C       4_66 0.143199294 32.307624 1.346376e-05
12374 RP11-571L19.8       4_66 0.008322258  5.636996 1.365241e-07
               z num_eqtl
5055  -0.7972018        1
5686  -1.1240076        1
6091   0.9082871        1
7222  -0.1831346        1
7980  -1.2321573        2
8496   0.7334699        2
10057  1.9684512        2
10115 -1.1153042        1
11584 -3.1932254        3
12374 -0.4759060        3

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "DHCR7"
[1] "11_40"
          genename region_tag  susie_pip       mu2          PVE
2462         FOLR3      11_40 0.01725692  5.854649 2.940251e-07
4851        IL18BP      11_40 0.01565088  4.892748 2.228497e-07
4852         NUMA1      11_40 0.01679779  5.589052 2.732187e-07
4859        RNF121      11_40 0.08438256 21.653510 5.317424e-06
6613       FAM86C1      11_40 0.01812516  6.338253 3.343272e-07
6900          CLPB      11_40 0.02252729  8.482555 5.561038e-07
7453        INPPL1      11_40 0.01567352  4.906975 2.238209e-07
8486       NADSYN1      11_40 0.01846783  6.522823 3.505676e-07
8487         DHCR7      11_40 0.01773935  6.126266 3.162670e-07
9490        LRTOMT      11_40 0.01736413  5.915653 2.989344e-07
10650    KRTAP5-10      11_40 0.02462873  9.363332 6.711086e-07
11125    LINC01537      11_40 0.02069400  7.644954 4.604046e-07
11530     KRTAP5-7      11_40 0.05750397 17.790413 2.977174e-06
11744 RP11-849H4.2      11_40 0.01598488  5.100622 2.372755e-07
11761     KRTAP5-9      11_40 0.01702927  5.723845 2.836639e-07
                z num_eqtl
2462  -0.63775295        1
4851  -0.10323637        2
4852   0.44145029        1
4859   2.08692398        2
6613   0.45043836        1
6900   1.03637029        1
7453   0.05040952        1
8486   0.72652201        1
8487   0.65130261        1
9490  -0.65197454        1
10650 -1.13422621        2
11125 -0.84083998        1
11530  2.05073754        1
11744 -0.32070634        1
11761  0.41678412        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LIPA"
[1] "10_57"
         genename region_tag   susie_pip       mu2          PVE          z
2253         LIPA      10_57 0.014680477  9.664352 4.128889e-07  1.0134814
3294        IFIT3      10_57 0.009447374  5.332101 1.465986e-07 -0.3100521
3295        IFIT2      10_57 0.010965182  6.795436 2.168470e-07 -0.6053359
4960       KIF20B      10_57 0.013172781  8.598418 3.296221e-07 -1.5022578
6227        IFIT5      10_57 0.009249384  5.124157 1.379290e-07  0.2173750
6228        PANK1      10_57 0.015037848  9.901058 4.332989e-07 -1.6480922
9655        IFIT1      10_57 0.022964142 14.073764 9.405476e-07  1.4103375
10558      IFIT1B      10_57 0.010817088  6.661861 2.097134e-07 -0.6164140
11224   LINC00865      10_57 0.017716066 11.514925 5.936749e-07  1.6098123
11305 RP11-80H5.9      10_57 0.017494511 11.390739 5.799279e-07 -1.8221939
      num_eqtl
2253         1
3294         1
3295         1
4960         1
6227         3
6228         1
9655         2
10558        1
11224        1
11305        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LDLRAP1"
[1] "1_18"
          genename region_tag   susie_pip        mu2          PVE
525           PIGV       1_18 0.007152042  11.000301 2.289575e-07
3127          SYF2       1_18 0.007421621   6.668378 1.440255e-07
3129        MTFR1L       1_18 0.012751671  12.670218 4.701879e-07
3130        MAN1C1       1_18 0.006859349   6.059398 1.209575e-07
3132       RPS6KA1       1_18 0.006440679   5.224795 9.793124e-08
3133         DHDDS       1_18 0.010598769  13.547692 4.178699e-07
4099         CEP85       1_18 0.013538675  14.905761 5.872873e-07
5405      SH3BGRL3       1_18 0.022295601  18.546500 1.203376e-06
5406        CNKSR1       1_18 0.012521316  12.521559 4.562771e-07
5414          GPN2       1_18 0.008348764  13.689713 3.326112e-07
6571       LDLRAP1       1_18 0.007455590   8.855689 1.921430e-07
6581        UBXN11       1_18 0.015681218  13.740449 6.270484e-07
6933       SELENON       1_18 0.030657540  20.024240 1.786544e-06
8065          CD52       1_18 0.015681218  13.740449 6.270484e-07
8700        PDIK1L       1_18 0.035796858  23.470205 2.445018e-06
8795        ZNF683       1_18 0.006513423   5.410472 1.025569e-07
8797         AIM1L       1_18 0.006748156   5.518995 1.083841e-07
9453       TMEM50A       1_18 0.073988534  97.506077 2.099503e-05
9783           RHD       1_18 0.006831149  43.925915 8.732425e-07
9940          RHCE       1_18 0.007318127  64.649716 1.376851e-06
10206      FAM110D       1_18 0.007329777   6.264322 1.336242e-07
10473        HMGN2       1_18 0.006663479   5.607060 1.087318e-07
10574      ZDHHC18       1_18 0.006769287   8.649979 1.704034e-07
10578       TMEM57       1_18 0.384328056 100.841358 1.127875e-04
11070 RP11-70P17.1       1_18 0.017574101  17.547470 8.974452e-07
11698        TRNP1       1_18 0.033770666  19.267173 1.893555e-06
                z num_eqtl
525    -2.2722478        2
3127    0.7426202        1
3129    2.2702594        2
3130   -1.0646970        1
3132    0.3917090        1
3133    2.6796586        2
4099    2.3661103        1
5405   -2.8355236        1
5406    2.3608913        2
5414    2.5894296        1
6571    1.9336337        2
6581   -1.2648216        1
6933   -2.1819486        1
8065   -1.2648216        1
8700    3.2275633        1
8795    0.5504045        1
8797    0.4474766        1
9453   10.0815103        1
9783   -6.4603360        1
9940    8.1134433        2
10206   0.6465781        1
10473   0.5156134        1
10574   1.8553085        1
10578 -10.2641908        1
11070   2.9461337        1
11698   1.1357927        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "ANGPTL3"
[1] "1_39"
     genename region_tag   susie_pip        mu2          PVE          z
3024    DOCK7       1_39 0.010009214  24.336911 7.089013e-07  4.4594815
3733    ATG4C       1_39 0.024969936  81.344496 5.911067e-06 -8.6477262
4316    KANK4       1_39 0.008972585   5.075471 1.325300e-07  0.5123038
4317  ANGPTL3       1_39 0.114994714 249.654215 8.354820e-05 16.1322287
6956    TM2D1       1_39 0.056960127  23.071146 3.824375e-06  2.1432487
6957     USP1       1_39 0.894444213 253.879917 6.608485e-04 16.2582110
     num_eqtl
3024        1
3733        1
4316        1
4317        1
6956        1
6957        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "APOB"
[1] "2_13"
        genename region_tag    susie_pip      mu2          PVE          z
1053        APOB       2_13 1.618250e-11  62.9295 2.963604e-15 -11.725895
11245 AC067959.1       2_13 3.200642e-09 145.4739 1.355009e-12  -2.328717
      num_eqtl
1053         1
11245        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "APOE"
[1] "19_32"
      genename region_tag susie_pip        mu2 PVE           z num_eqtl
104      MARK4      19_32         0  24.156050   0  -2.2463768        1
109   TRAPPC6A      19_32         0  30.419699   0   1.8816459        1
196      ERCC1      19_32         0  14.630621   0  -0.2091619        1
538     ZNF112      19_32         0 147.060847   0  10.3860543        1
781        PVR      19_32         0 295.701527   0 -10.0782525        2
1930   PPP1R37      19_32         0 125.325866   0 -12.8921201        2
1933       CKM      19_32         0  15.790137   0  -1.5738464        1
1937     ERCC2      19_32         0  11.393498   0   2.3297330        2
1942      KLC3      19_32         0  10.261211   0   1.7718715        1
3143    CD3EAP      19_32         0  27.197872   0  -3.0806361        1
3738      FOSB      19_32         0  18.939018   0  -2.3658041        1
3739      OPA3      19_32         0  13.745586   0  -0.4654901        2
3741      RTN2      19_32         0  31.851472   0   5.5300783        1
3742      VASP      19_32         0  12.782944   0   1.8957985        1
4048   NECTIN2      19_32         0 109.049101   0   6.2443536        2
4049      APOE      19_32         0  47.814725   0  -2.0092826        1
4050    TOMM40      19_32         0  25.471834   0  -1.4020544        1
5377    GEMIN7      19_32         0 193.977845   0  10.9432287        2
6721    ZNF233      19_32         0 115.540185   0  -9.2725820        2
6722    ZNF235      19_32         0 106.459071   0  -9.2122953        1
7760    ZNF180      19_32         0  28.966715   0  -3.9159702        3
8231    ZNF296      19_32         0 111.900405   0   5.4593536        1
9745  CEACAM19      19_32         0  64.977411   0   9.4554813        2
9810      BCAM      19_32         0 109.853203   0   4.6421318        1
9989   BLOC1S3      19_32         0  11.134809   0   2.3014119        1
10862    PPM1N      19_32         0  31.392464   0   5.4808308        1
10863 CEACAM16      19_32         0   7.492019   0   1.8740580        1
10965   IGSF23      19_32         0  12.715131   0   1.9670520        1
11300    APOC2      19_32         0  57.109664   0  -9.1630690        2
12131    APOC4      19_32         0  49.134521   0   8.0662459        2
12133   ZNF285      19_32         0  14.844078   0   0.9962471        2
12637   ZNF229      19_32         0  91.589158   0  10.9591492        2
12704  EXOC3L2      19_32         0  25.621614   0  -1.3436507        1
189      QPCTL      19_32         0  24.612253   0  -2.0303487        2
190      PPP5C      19_32         0  13.448628   0   1.3374649        1
1949      DMPK      19_32         0  20.547016   0  -1.8090245        1
1963    CCDC61      19_32         0  21.113494   0   1.8414612        2
3628     HIF3A      19_32         0  20.433734   0  -1.8024680        2
3740    SNRPD2      19_32         0  10.032419   0   1.0366923        1
3743     SYMPK      19_32         0   4.904061   0  -0.0525717        1
6726     CALM3      19_32         0  54.624358   0   3.2242313        2
8073     CCDC8      19_32         0   7.392264   0   0.7230949        2
8809     MYPOP      19_32         0  21.246597   0   1.8490001        1
8908      GPR4      19_32         0  66.214978   0  -3.5802828        1
9281    PNMAL1      19_32         0  20.657755   0  -1.8154111        4
9659      DMWD      19_32         0  19.622421   0  -1.7547946        1
10682   PNMAL2      19_32         0   5.246628   0  -0.2727077        1
11190   PPP5D1      19_32         0   6.392914   0  -0.5603345        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "NPC1L1"
[1] "7_32"
        genename region_tag   susie_pip       mu2          PVE           z
233       NPC1L1       7_32 0.963950103 89.799637 2.519123e-04 -10.7619311
500       CAMK2B       7_32 0.011448883  9.069543 3.021822e-07  -1.5162371
541       MRPS24       7_32 0.007219919  6.241174 1.311351e-07   0.3827818
927       UBE2D4       7_32 0.009713358  9.447753 2.670658e-07   1.1906995
2101        OGDH       7_32 0.008233138 19.553105 4.684912e-07   0.1499623
2177        COA1       7_32 0.011779687  9.889778 3.390319e-07  -0.7042755
2178       BLVRA       7_32 0.006315409  5.151025 9.467068e-08   0.4660052
2179       URGCP       7_32 0.007395483  6.536479 1.406795e-07  -0.6697027
2183       AEBP1       7_32 0.022616310 20.450643 1.346012e-06  -2.6280619
2184       POLD2       7_32 0.014036536 13.082073 5.343881e-07  -1.4227083
2185        MYL7       7_32 0.007671677  6.668056 1.488709e-07   0.4396483
2186         GCK       7_32 0.006293048  5.111982 9.362043e-08  -0.2515709
3488        POLM       7_32 0.006250717  5.193247 9.446895e-08   0.5460441
4704       DDX56       7_32 0.974637917 58.704990 1.665093e-04   9.4462712
4706        DBNL       7_32 0.008351150  6.910009 1.679365e-07   0.1009981
6619       TMED4       7_32 0.011779787 45.305741 1.553141e-06   7.5475920
7330      STK17A       7_32 0.006414170  5.405180 1.008953e-07   0.5439997
11147 AC004951.6       7_32 0.009988428  8.243453 2.396220e-07   0.2209151
      num_eqtl
233          1
500          2
541          1
927          1
2101         2
2177         2
2178         1
2179         2
2183         1
2184         2
2185         1
2186         1
3488         3
4704         2
4706         2
6619         2
7330         1
11147        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "SOAT1"
[1] "1_89"
           genename region_tag   susie_pip       mu2          PVE
488           SOAT1       1_89 0.009183131  4.911512 1.312581e-07
3000         FAM20B       1_89 0.009870045  5.619833 1.614220e-07
3008          QSOX1       1_89 0.036019721 18.387044 1.927403e-06
3408           LHX4       1_89 0.010832554  6.533827 2.059770e-07
4640         CEP350       1_89 0.044026383 20.382823 2.611546e-06
5473           ABL2       1_89 0.009169187  4.896592 1.306607e-07
5474           XPR1       1_89 0.026065351 15.183135 1.151716e-06
5476       TOR1AIP1       1_89 0.009194225  4.923365 1.317339e-07
5477        FAM163A       1_89 0.009167381  4.894658 1.305834e-07
6245            MR1       1_89 0.009943726  5.692873 1.647407e-07
8120       TOR1AIP2       1_89 0.011770070  7.349450 2.517411e-07
9716          TOR3A       1_89 0.010998013  6.682761 2.138900e-07
11184         ACBD6       1_89 0.010824054  6.526115 2.055725e-07
11939 RP11-533E19.5       1_89 0.013686973  8.832932 3.518298e-07
                z num_eqtl
488   -0.14955596        1
3000   0.42412943        2
3008  -1.74016201        2
3408  -0.58114341        1
4640   2.27414775        2
5473  -0.04638378        1
5474   1.57571425        2
5476  -0.06998621        1
5477  -0.07283498        1
6245   0.40422440        1
8120   0.78824459        1
9716  -0.64642141        1
11184 -0.61546219        2
11939  1.29962295        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "MYLIP"
[1] "6_13"
          genename region_tag   susie_pip       mu2          PVE         z
124          MYLIP       6_13 0.005437827 39.355845 6.228091e-07 6.1101946
400         DTNBP1       6_13 0.024829519 19.136017 1.382739e-06 1.8923854
4817          GMPR       6_13 0.009852703  9.816486 2.814698e-07 0.2573808
12277 RP11-560J1.2       6_13 0.006258814  6.277862 1.143468e-07 0.5773850
      num_eqtl
124          2
400          1
4817         2
12277        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "OSBPL5"
[1] "11_2"
        genename region_tag   susie_pip       mu2          PVE          z
67        ZNF195       11_2 0.005812911 11.170728 1.889711e-07  1.1809650
264       OSBPL5       11_2 0.008807821 15.130543 3.878317e-07 -1.6475511
926       TOLLIP       11_2 0.005892306 11.279300 1.934139e-07 -1.1132790
2490    C11orf21       11_2 0.004270627  8.041760 9.994544e-08 -0.7150719
3146        CTSD       11_2 0.006278066 11.914519 2.176821e-07  1.2201456
4092       TNNT3       11_2 0.003111065  5.117300 4.633085e-08 -0.1271889
4093       TNNI2       11_2 0.003443432  6.123121 6.135990e-08  0.4977574
7744        IGF2       11_2 0.003170287  5.256744 4.849932e-08  0.1447958
9140          TH       11_2 0.017306143 22.322103 1.124231e-06  2.0988645
9251      PHLDA2       11_2 0.037010956 28.576162 3.077900e-06 -2.5765310
9307        MOB2       11_2 0.021035512 23.395345 1.432197e-06  2.2732312
9455       ASCL2       11_2 0.004706956  8.845564 1.211675e-07 -0.8044614
9508       TSSC4       11_2 0.004275553  8.294518 1.032057e-07 -0.9083240
9530       DUSP8       11_2 0.005017061  9.712886 1.418136e-07  1.2015225
10734     NAP1L4       11_2 0.020733330 23.353762 1.409114e-06 -2.2381727
10757   KRTAP5-6       11_2 0.003056402  4.950784 4.403569e-08  0.1958622
10758     FAM99A       11_2 0.003545484  6.356067 6.558196e-08  0.5299554
10759   KRTAP5-1       11_2 0.010207867 16.802540 4.991491e-07 -1.7341826
11117 AP006285.6       11_2 0.003969536  7.584437 8.761600e-08 -0.9091754
11209 AP006285.7       11_2 0.004604151  8.906719 1.193404e-07  0.8556168
11527    IFITM10       11_2 0.003760686  7.181076 7.859174e-08 -0.8538633
12709      PRR33       11_2 0.003103724  6.436120 5.813364e-08  1.2367544
      num_eqtl
67           2
264          1
926          2
2490         2
3146         2
4092         2
4093         1
7744         1
9140         1
9251         1
9307         2
9455         1
9508         1
9530         1
10734        1
10757        1
10758        2
10759        1
11117        3
11209        1
11527        1
12709        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "SCARB1"
[1] "12_76"
          genename region_tag   susie_pip       mu2          PVE
783         SCARB1      12_76 0.009051252  6.717000 1.769312e-07
989           AACS      12_76 0.008772227  4.959454 1.266089e-07
6070           UBC      12_76 0.013557663  9.017798 3.557998e-07
10916 RP11-83B20.1      12_76 0.087882050 27.427474 7.014655e-06
               z num_eqtl
783   -1.3579091        1
989   -0.1677513        1
6070   0.9059691        1
10916 -2.2707583        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "VDAC3"
[1] "8_37"
     genename region_tag   susie_pip       mu2          PVE          z
726     AP3M2       8_37 0.009690834  5.042459 1.422079e-07 -0.1640405
916     VDAC3       8_37 0.021066398 12.682985 7.775567e-07 -1.3606126
1883     PLAT       8_37 0.009714535  5.066447 1.432339e-07  0.2157926
3375   RNF170       8_37 0.037378600 18.357308 1.996882e-06  1.9222889
4215    THAP1       8_37 0.009696846  5.048549 1.424680e-07  0.2765875
7909    HOOK3       8_37 0.037378600 18.357308 1.996882e-06  1.9222889
7961  SLC20A2       8_37 0.009633597  4.984289 1.397372e-07 -0.1602583
8811   SMIM19       8_37 0.013405016  8.230778 3.210913e-07 -0.9418962
     num_eqtl
726         2
916         1
1883        1
3375        1
4215        2
7909        1
7961        1
8811        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LRP2"
[1] "2_103"
      genename region_tag  susie_pip       mu2          PVE           z
985       LRP2      2_103 0.02217816  7.636703 4.928920e-07  0.79845416
4981    METTL5      2_103 0.01683657  4.920085 2.410719e-07  0.11571328
4982       SSB      2_103 0.03091287 10.919773 9.823658e-07  1.22773041
4984      PPIG      2_103 0.02959263 10.487488 9.031822e-07 -1.40458148
4985   FASTKD1      2_103 0.02567419  9.082463 6.786106e-07  0.94743244
5601      UBR3      2_103 0.01683598  4.919739 2.410465e-07  0.07450539
5602  PHOSPHO2      2_103 0.01753038  5.317839 2.712981e-07  0.29104367
6343   CCDC173      2_103 0.02842263 10.088150 8.344417e-07 -1.44045674
7041      BBS5      2_103 0.02342293  8.175815 5.573044e-07  0.88589081
10808   KLHL23      2_103 0.04614375 14.899403 2.000793e-06  1.90247786
11395   KLHL41      2_103 0.01745468  5.275211 2.679613e-07 -0.32742036
      num_eqtl
985          1
4981         1
4982         1
4984         2
4985         1
5601         1
5602         1
6343         2
7041         1
10808        2
11395        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "CETP"
[1] "16_31"
          genename region_tag   susie_pip        mu2          PVE
52         CIAPIN1      16_31 0.012172803  20.135483 7.133012e-07
81          CX3CL1      16_31 0.003038236   6.159425 5.446054e-08
438        HERPUD1      16_31 0.006119818  24.441212 4.352929e-07
1120          CETP      16_31 0.056359804 121.048613 1.985407e-05
1122           MT3      16_31 0.002932059   5.273953 4.500174e-08
1124         GNAO1      16_31 0.003204895   6.140439 5.727083e-08
1154          COQ9      16_31 0.004452838   9.338381 1.210121e-07
1740         NUP93      16_31 0.021078424  24.521682 1.504211e-06
1745          PLLP      16_31 0.017878821  25.352192 1.319091e-06
1747         CCL17      16_31 0.004492906   8.998200 1.176531e-07
3681          BBS2      16_31 0.022263387  23.691782 1.535003e-06
3685          DOK4      16_31 0.003676614   7.914667 8.468393e-08
4628      CCDC102A      16_31 0.002926522   5.388758 4.589452e-08
5239         CPNE2      16_31 0.002979844   5.481557 4.753546e-08
5240         NLRC5      16_31 0.088907822 159.685991 4.131684e-05
6688         CES5A      16_31 0.002843532   5.460432 4.518616e-08
6695          AMFR      16_31 0.003883756   7.473988 8.447430e-08
6698        RSPRY1      16_31 0.004338369  11.198702 1.413886e-07
7710        NUDT21      16_31 0.003243429   6.413316 6.053511e-08
8094          MT1E      16_31 0.003038950   5.705952 5.046287e-08
8472       FAM192A      16_31 0.003111906   6.218456 5.631568e-08
9805          MT1X      16_31 0.002802348   5.055911 4.123271e-08
10386         MT1F      16_31 0.121677829  38.641782 1.368324e-05
10722       ADGRG1      16_31 0.008452869  15.679666 3.857103e-07
10725         MT1A      16_31 0.004544517  11.127913 1.471708e-07
10727         MT1M      16_31 0.004316577  12.028219 1.510988e-07
11561 RP11-461O7.1      16_31 0.003204228   5.972640 5.569421e-08
729         CFAP20      16_31 0.002875162   5.146632 4.306314e-08
730        CSNK2A2      16_31 0.002833650   5.007790 4.129644e-08
1753         MMP15      16_31 0.008726792  16.009511 4.065865e-07
1754          USB1      16_31 0.002938397   5.360701 4.584082e-08
1757         NDRG4      16_31 0.002839304   5.025066 4.152159e-08
1759       SLC38A7      16_31 0.005199398  10.880929 1.646415e-07
3680         CNOT1      16_31 0.028066896  27.090496 2.212746e-06
3684          GOT2      16_31 0.023689445  25.558033 1.761987e-06
5241        KATNB1      16_31 0.014466746  20.952885 8.821349e-07
5242         KIFC3      16_31 0.027079788  27.084922 2.134485e-06
7571        ZNF319      16_31 0.002825846   4.978055 4.093818e-08
9278         GINS3      16_31 0.003615861   7.395248 7.781885e-08
9366        ADGRG3      16_31 0.004909153  10.382720 1.483331e-07
               z num_eqtl
52    -2.0356089        2
81    -0.8286220        1
438    3.8389063        2
1120  10.0796427        1
1122   0.2341288        1
1124  -0.5287206        1
1154  -0.9549661        2
1740   2.2770780        2
1745  -2.6585007        2
1747   0.7431888        1
3681  -1.9263988        2
3685  -0.9956520        2
4628   0.4043649        2
5239   0.2383750        1
5240  11.8602110        1
6688  -0.6790309        2
6695  -0.1575098        1
6698  -1.8323801        1
7710  -0.6747743        2
8094   0.5732896        1
8472  -0.7860456        1
9805  -0.4099722        1
10386 -2.7354541        1
10722 -1.5429173        3
10725  1.5829980        2
10727  2.0216456        1
11561  0.1973122        1
729    0.2411647        2
730   -0.1322483        2
1753  -1.5466217        1
1754   0.3145636        1
1757   0.1679672        1
1759   1.2166483        1
3680  -2.4928488        2
3684   2.3111934        2
5241  -1.8723683        2
5242  -2.2243116        1
7571   0.1401284        1
9278  -0.7182699        2
9366  -1.0805254        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "PLTP"
[1] "20_28"
           genename region_tag   susie_pip       mu2          PVE
292          TOMM34      20_28 0.001882229  5.177951 2.836290e-08
1597           PLTP      20_28 0.987796690 61.569868 1.769930e-04
1598          PCIF1      20_28 0.001885348 21.324151 1.169994e-07
1600           MMP9      20_28 0.007202497 18.171308 3.808813e-07
1608           CD40      20_28 0.005660035 14.207612 2.340241e-07
1617           STK4      20_28 0.002029766  5.817991 3.436681e-08
1683        DNTTIP1      20_28 0.006783028 16.294172 3.216446e-07
1685          ACOT8      20_28 0.002380144  7.991865 5.535689e-08
3587          SNX21      20_28 0.029736783 30.060395 2.601411e-06
3588           SLPI      20_28 0.002117172  6.088000 3.751034e-08
3589          WFDC3      20_28 0.002509248 12.679435 9.258992e-08
3591           SDC4      20_28 0.593707041 24.729715 4.272791e-05
3594          MATN4      20_28 0.002006998  5.528551 3.229079e-08
3595          NCOA5      20_28 0.003370423 10.757172 1.055122e-07
3613          RBPJL      20_28 0.004630681 13.922257 1.876181e-07
3615         KCNK15      20_28 0.002246115  6.627412 4.332078e-08
3616        TP53TG5      20_28 0.002080456  7.348544 4.449182e-08
4309          OSER1      20_28 0.002214854  6.655706 4.290021e-08
4310        SERINC3      20_28 0.003697337 10.983819 1.181851e-07
6007           JPH2      20_28 0.001852837  4.974996 2.682565e-08
7691          YWHAB      20_28 0.002604430  7.952590 6.027560e-08
7964         ZSWIM1      20_28 0.275226581 30.975101 2.480981e-05
7974           PKIG      20_28 0.011661242 20.494321 6.955024e-07
8697          UBE2C      20_28 0.002805227 10.120372 8.261992e-08
10148           ADA      20_28 0.001900129  6.295138 3.481038e-08
10216         FITM2      20_28 0.001911390  7.639778 4.249623e-08
10331        ZNF335      20_28 0.001935322  5.281502 2.974617e-08
10561          SYS1      20_28 0.001857690  4.937690 2.669422e-08
11031     OSER1-AS1      20_28 0.003014828 10.290384 9.028475e-08
11528        DBNDD2      20_28 0.002261294  7.557785 4.973610e-08
12701 RP11-445H22.3      20_28 0.002347987  7.416846 5.067985e-08
                z num_eqtl
292   -0.21559970        1
1597  -5.73249075        1
1598   2.96018585        1
1600   1.76632544        1
1608  -1.05986939        1
1617  -0.65248556        1
1683   1.68660209        2
1685   0.21164457        2
3587  -2.25095415        1
3588  -0.43426645        2
3589   0.89942952        1
3591  -3.92072709        1
3594  -0.72142554        1
3595   1.06921473        1
3613   1.21973824        1
3615  -0.43953756        2
3616  -1.26808126        2
4309  -0.72359138        2
4310   1.06666707        2
6007   0.34475118        1
7691   0.92140948        1
7964  -0.64131988        1
7974  -1.92973723        1
8697  -1.29063071        1
10148 -1.11873945        1
10216  1.70850449        1
10331  0.03190689        1
10561 -0.53036749        1
11031  1.30139067        3
11528  0.76276385        1
12701 -0.77170625        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "VAPA"
[1] "18_7"
      genename region_tag   susie_pip       mu2          PVE            z
240     RALBP1       18_7 0.008844532  9.325863 2.400403e-07  1.171373949
1691      VAPA       18_7 0.006682268  6.575113 1.278638e-07  0.657289426
1703   ANKRD12       18_7 0.007509359  7.719824 1.687060e-07 -0.889300700
4446      NAPG       18_7 0.007219840  7.334086 1.540969e-07  0.841503954
7947     RAB31       18_7 0.005628677  4.892601 8.014315e-08 -0.002933481
8980    NDUFV2       18_7 0.014694259 14.314625 6.121361e-07  1.381942467
10773    RAB12       18_7 0.005669558  4.963549 8.189584e-08  0.123074043
      num_eqtl
240          1
1691         1
1703         2
4446         2
7947         2
8980         2
10773        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "KPNB1"
[1] "17_27"
          genename region_tag   susie_pip       mu2          PVE
41           CDC27      17_27 0.007920945  8.440667 1.945692e-07
802            NSF      17_27 0.010877400 10.526116 3.332066e-07
2301          WNT3      17_27 0.014728103 13.095710 5.613014e-07
2309         KPNB1      17_27 0.020782634 89.848444 5.434148e-06
2310         GOSR2      17_27 0.019774247 13.779858 7.929850e-07
3310        KANSL1      17_27 0.007337912  5.328458 1.137875e-07
5281        NPEPPS      17_27 0.010242282 15.882242 4.734007e-07
6678      ARHGAP27      17_27 0.009937653  8.187466 2.367847e-07
8499         DCAKD      17_27 0.007296093  5.154350 1.094421e-07
8846       LRRC37A      17_27 0.008112652  5.901095 1.393207e-07
9041       EFCAB13      17_27 0.011965377 57.621434 2.006461e-06
9663        ARL17A      17_27 0.009161844  7.315190 1.950423e-07
9773          MAPT      17_27 0.007952913  5.896542 1.364721e-07
10511       TBKBP1      17_27 0.016936726 90.170904 4.444431e-06
11062      PLEKHM1      17_27 0.007185589  4.929695 1.030867e-07
11381     LRRC37A2      17_27 0.013594956 10.712988 4.238466e-07
11884        ITGB3      17_27 0.009509126  9.519117 2.634253e-07
12113 RP11-798G7.6      17_27 0.007337912  5.328458 1.137875e-07
12583   AC142472.6      17_27 0.011448304  9.536377 3.177202e-07
                z num_eqtl
41    -1.62384444        1
802   -2.06053407        1
2301  -1.55730420        1
2309  -9.51317987        2
2310   1.29775360        2
3310  -0.08580432        1
5281  -3.02425642        1
6678   1.16027409        2
8499  -0.15093721        1
8846  -0.35529825        1
9041   7.36590043        4
9663   1.91935258        2
9773  -0.72635506        1
10511 -9.31233452        2
11062  0.03569373        1
11381  2.39235673        1
11884 -1.58019328        2
12113 -0.08580432        1
12583 -0.86874169        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "ALDH2"
[1] "12_67"
          genename region_tag   susie_pip       mu2          PVE
1191         ERP29      12_67 0.038334143 32.410682 3.615715e-06
2531         ARPC3      12_67 0.011906466  8.239786 2.855085e-07
2532          GPN3      12_67 0.011364443  8.543494 2.825556e-07
2533         VPS29      12_67 0.011444699  8.620615 2.871196e-07
2536         SH2B3      12_67 0.071502940 57.685360 1.200355e-05
2541         ALDH2      12_67 0.020766608 32.769820 1.980432e-06
2544         NAA25      12_67 0.041829948 33.498228 4.077833e-06
3515         IFT81      12_67 0.014682124 12.233359 5.227029e-07
3517         HVCN1      12_67 0.008921734  5.669697 1.472073e-07
5111          GIT2      12_67 0.028409436 15.795630 1.305930e-06
5112          TCHP      12_67 0.024551980 13.970120 9.981756e-07
8505        HECTD4      12_67 0.039386958 33.640772 3.856015e-06
8639      C12orf76      12_67 0.010065787  6.904102 2.022438e-07
9084        PTPN11      12_67 0.011489901 10.378257 3.470252e-07
9717        PPP1CC      12_67 0.008699391  5.274092 1.335232e-07
10093       ANAPC7      12_67 0.009610563  6.533550 1.827336e-07
10370      TMEM116      12_67 0.038334143 32.410682 3.615715e-06
10375      FAM109A      12_67 0.008732837  5.860945 1.489510e-07
10680        ATXN2      12_67 0.042797381 18.570783 2.312958e-06
10683        TCTN1      12_67 0.027202137 17.021101 1.347445e-06
10684      FAM216A      12_67 0.009063388  5.613736 1.480686e-07
11290 MAPKAPK5-AS1      12_67 0.020067343 31.847512 1.859883e-06
               z num_eqtl
1191  -5.8049447        1
2531   1.1143107        1
2532  -1.4783205        1
2533   1.4871406        1
2536  -7.8354247        1
2541  -6.4436064        1
2544   5.8544343        1
3515  -2.3268452        2
3517  -0.8757995        1
5111  -1.8046506        2
5112  -1.4944146        2
8505  -5.7749393        2
8639  -1.0008849        1
9084   2.2253869        1
9717   0.7231339        1
10093 -1.0505294        1
10370  5.8049447        1
10375  0.8704329        1
10680 -0.7777805        1
10683  2.1771229        1
10684 -0.6987263        1
11290  6.3728846        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "APOA1"
[1] "11_70"
     genename region_tag   susie_pip        mu2          PVE            z
2465    APOA5      11_70 0.032499310 145.137290 1.372693e-05 -11.35991043
2466   CEP164      11_70 0.004664335   5.763478 7.823385e-08  -0.30209785
3154    APOA1      11_70 0.004278433   6.652387 8.282903e-08   1.11150616
4868    BUD13      11_70 0.005760822  36.876896 6.182429e-07   4.11527976
4881    FXYD2      11_70 0.004684209   6.128819 8.354747e-08  -0.37435241
6005    SIDT2      11_70 0.004140080   5.468270 6.588385e-08   0.50104522
6006    TAGLN      11_70 0.004614747  18.478038 2.481556e-07  -1.55444774
6785    PCSK7      11_70 0.012766309  16.431533 6.104692e-07   0.97935688
7745   RNF214      11_70 0.004787469   6.579101 9.166273e-08  -0.52468931
7898 PAFAH1B2      11_70 0.005499613   7.725577 1.236469e-07  -0.01722766
9720    BACE1      11_70 0.004495796  21.121379 2.763434e-07  -4.13706265
     num_eqtl
2465        1
2466        2
3154        2
4868        1
4881        2
6005        1
6006        1
6785        1
7745        1
7898        2
9720        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "STARD3"
[1] "17_23"
           genename region_tag   susie_pip       mu2          PVE
16            LASP1      17_23 0.041861380 20.319036 2.475352e-06
793         SMARCE1      17_23 0.009140741  5.304815 1.411146e-07
1306           CDC6      17_23 0.010894737  7.028751 2.228513e-07
2297         FBXL20      17_23 0.019491393 12.752856 7.233869e-07
2299           CSF3      17_23 0.086518197 27.605061 6.950507e-06
2300       RAPGEFL1      17_23 0.013132084  8.864586 3.387758e-07
3731           MED1      17_23 0.013638584  9.236893 3.666194e-07
3799           CCR7      17_23 0.009538310  5.722827 1.588555e-07
3800          NR1D1      17_23 0.011906081  7.901064 2.737630e-07
4201           TNS4      17_23 0.008766071  4.893944 1.248488e-07
4202         STARD3      17_23 0.008991338  5.143029 1.345747e-07
5341          ERBB2      17_23 0.011726635  7.751888 2.645460e-07
5342           GRB7      17_23 0.009220244  5.389873 1.446243e-07
5343           PNMT      17_23 0.013071844  8.819483 3.355060e-07
5344         IGFBP4      17_23 0.010563321  6.725283 2.067433e-07
6848         PLXDC1      17_23 0.010327309  6.503364 1.954544e-07
6849          PGAP3      17_23 0.017423247 11.647419 5.905805e-07
6850          IKZF3      17_23 0.145212551 32.923269 1.391321e-05
7860          GSDMA      17_23 0.029114363 16.716109 1.416325e-06
8318          WIPF2      17_23 0.008763449  4.891009 1.247366e-07
8390         ORMDL3      17_23 0.027480692 16.144718 1.291155e-06
8601           TCAP      17_23 0.012254443  8.184619 2.918854e-07
9964           MSL1      17_23 0.011174800  7.278211 2.366926e-07
10827        KRT222      17_23 0.008796037  4.927445 1.261331e-07
12051     LINC00672      17_23 0.283905420 40.138431 3.316304e-05
12065 RP11-387H17.4      17_23 0.009107529  5.269052 1.396540e-07
12085  RP5-1028K7.2      17_23 0.034839879 18.495287 1.875245e-06
12450         CWC25      17_23 0.015484984 10.486086 4.725464e-07
12452          EPOP      17_23 0.008828988  4.964150 1.275487e-07
12575       PIP4K2B      17_23 0.013522951  9.153046 3.602114e-07
12620         PSMB3      17_23 0.027491746 16.148728 1.291995e-06
                z num_eqtl
16     2.06384703        1
793   -0.32396665        2
1306   0.50375876        2
2297   1.93901635        1
2299  -3.20456334        1
2300   0.89662465        1
3731  -1.49493107        2
3799  -0.44220762        1
3800   0.81175389        1
4201   0.02859681        1
4202  -0.38811898        2
5341  -1.13724896        2
5342   0.49199960        3
5343  -1.18909299        2
5344  -0.57588470        1
6848  -0.56588683        1
6849  -2.14338495        2
6850   3.46618563        1
7860   2.77074527        2
8318  -0.18843428        2
8390   2.64808902        2
8601   1.04770013        1
9964   0.98720359        1
10827  0.11407193        1
12051  3.53577816        2
12065  0.05180697        2
12085  1.93533443        1
12450  1.08708711        3
12452 -0.10662081        2
12575 -1.00157125        1
12620  1.72896001        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "PPARG"
[1] "3_9"
      genename region_tag   susie_pip       mu2          PVE          z
856      MKRN2        3_9 0.005642374 14.942827 2.453663e-07 -3.4863426
4230      RAF1        3_9 0.002819386  5.486403 4.501556e-08  0.8372135
4231     PPARG        3_9 0.002950485 10.891951 9.352319e-08 -2.5953663
5615    TAMM41        3_9 0.004285737  9.651752 1.203793e-07  1.3225877
5632     CAND2        3_9 0.021914159 27.707524 1.767026e-06 -3.2762482
5633     RPL32        3_9 0.003803236  7.956963 8.806856e-08 -0.8436264
6362     TSEN2        3_9 0.033838146 29.748877 2.929527e-06  4.4713068
6517     TIMP4        3_9 0.005068742  8.137216 1.200318e-07  0.2250754
10251     ATG7        3_9 0.005863180 11.279310 1.924581e-07  1.4232154
11068  MKRN2OS        3_9 0.039629153 28.911116 3.334264e-06 -4.7387006
      num_eqtl
856          2
4230         1
4231         1
5615         3
5632         1
5633         2
6362         1
6517         1
10251        2
11068        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LPIN3"
[1] "20_25"
      genename region_tag   susie_pip      mu2          PVE         z
3598      CHD6      20_25 0.010044295 11.65433 3.406648e-07 -2.247872
3599     PLCG1      20_25 0.046442781 22.49404 3.040227e-06  2.065730
4307     LPIN3      20_25 0.011921969 47.36111 1.643199e-06  6.600722
8628      ZHX3      20_25 0.007581275 12.81247 2.826803e-07 -2.767903
9463   EMILIN3      20_25 0.027281400 95.64735 7.593813e-06  9.450280
10499     TOP1      20_25 0.012373040 20.23535 7.286306e-07 -3.533405
      num_eqtl
3598         1
3599         2
4307         2
8628         1
9463         2
10499        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "FADS2"
[1] "11_34"
           genename region_tag   susie_pip        mu2          PVE
1196          GANAB      11_34 0.007548994  72.351363 1.589484e-06
2444           DTX4      11_34 0.004504383   5.112575 6.701859e-08
2453         MS4A6A      11_34 0.005002401   6.032977 8.782749e-08
2455         CCDC86      11_34 0.005785257   7.386090 1.243534e-07
2456         PRPF19      11_34 0.008961135  12.092998 3.153678e-07
2457        TMEM109      11_34 0.010242105  13.173164 3.926446e-07
2480        SLC15A3      11_34 0.004713832   6.044230 8.291544e-08
2481            CD5      11_34 0.004532471   5.291873 6.980151e-08
3676   DKFZP434K028      11_34 0.004413567   5.958616 7.653418e-08
4507          FADS2      11_34 0.006376841 145.198701 2.694565e-06
4508        TMEM258      11_34 0.034859388  66.046317 6.700214e-06
5990        TMEM138      11_34 0.005995945  10.249125 1.788400e-07
5991          FADS1      11_34 0.999536191 160.579155 4.670980e-04
5994         INCENP      11_34 0.004408534   5.798855 7.439723e-08
5996          CPSF7      11_34 0.005172902   9.944036 1.496984e-07
5997          MS4A2      11_34 0.008397542  10.906045 2.665261e-07
6902       CYB561A3      11_34 0.005995945  10.249125 1.788400e-07
6903        PPP1R32      11_34 0.005377428   6.576367 1.029155e-07
6904         ASRGL1      11_34 0.004535375   5.204784 6.869676e-08
7662        FAM111A      11_34 0.006610386   8.672720 1.668409e-07
7684          PATL1      11_34 0.062437407  30.278826 5.501792e-06
7687           STX3      11_34 0.004422897   4.937793 6.355650e-08
7688         MRPL16      11_34 0.006813434   8.877083 1.760178e-07
7697          MS4A7      11_34 0.004397739   4.910667 6.284783e-08
7698         MS4A14      11_34 0.025929290  21.804560 1.645350e-06
7874         VPS37C      11_34 0.005273219   6.314730 9.690606e-08
7875           VWCE      11_34 0.004740644   5.867787 8.095282e-08
7876          BEST1      11_34 0.004701647  18.832394 2.576771e-07
7955           FEN1      11_34 0.006376841 145.198701 2.694565e-06
9789        TMEM216      11_34 0.004401948   4.951548 6.343168e-08
9982        FAM111B      11_34 0.004473774   5.029480 6.548132e-08
10267         MPEG1      11_34 0.004535941   5.241119 6.918495e-08
10924        MS4A4E      11_34 0.005747856   7.597089 1.270789e-07
11004         FADS3      11_34 0.009838872  21.356691 6.115044e-07
11812 RP11-794G24.1      11_34 0.011356188  12.517088 4.136720e-07
11817 RP11-286N22.8      11_34 0.004941309   5.969001 8.583491e-08
                 z num_eqtl
1196  -8.204723304        1
2444   0.272926929        2
2453   0.544252801        1
2455  -0.651729299        3
2456   1.430603519        2
2457   1.421831985        1
2480   0.821410772        1
2481   0.346138465        1
3676   1.073921044        1
4507  12.072635202        1
4508  -6.946921109        2
5990  -1.782804562        1
5991  12.825882927        2
5994  -0.969291005        2
5996  -2.061044578        1
5997  -1.135206653        1
6902  -1.782804562        1
6903  -0.382653253        1
6904  -0.250084386        1
7662   0.788300174        2
7684   3.303999343        2
7687   0.001285218        2
7688   0.989371951        2
7697  -0.132073393        2
7698  -1.857701655        3
7874   0.024014132        1
7875  -0.638825054        2
7876  -3.744804132        1
7955  12.072635202        1
9789  -0.251085346        2
9982  -0.130372989        1
10267  0.288859011        1
10924  0.848247159        1
11004  3.289416818        1
11812  0.447753087        1
11817 -0.427047808        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "CD36"
[1] "7_51"
        genename region_tag  susie_pip      mu2          PVE          z
830       SEMA3C       7_51 0.01303565 7.524754 2.854600e-07 -0.8034967
4557        CD36       7_51 0.01019059 5.105036 1.513973e-07 -0.2565559
11275 AC003988.1       7_51 0.01031383 5.223113 1.567724e-07 -0.1655722
      num_eqtl
830          2
4557         1
11275        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "CYP27A1"
[1] "2_129"
           genename region_tag   susie_pip       mu2          PVE
243         SLC11A1      2_129 0.008170246  5.223184 1.241912e-07
758            SPEG      2_129 0.008027490  5.098422 1.191066e-07
813           BCS1L      2_129 0.008337616  6.052041 1.468466e-07
2934          PLCD4      2_129 0.021725141 18.250782 1.153890e-06
2936         ZNF142      2_129 0.008267736  5.945372 1.430494e-07
2941         CNPPD1      2_129 0.010657459  7.798460 2.418705e-07
2943          ABCB6      2_129 0.026427061 17.136093 1.317896e-06
3579           CHPF      2_129 0.008412077  5.622049 1.376316e-07
3580          DNPEP      2_129 0.025659471 16.697436 1.246860e-06
3582          OBSL1      2_129 0.013937842 10.874330 4.410810e-07
3880         TUBA4A      2_129 0.009769703  6.887491 1.958226e-07
3881           VIL1      2_129 0.763702740 27.026379 6.006653e-05
3882           AAMP      2_129 0.038310090 18.542766 2.067321e-06
3883           PNKD      2_129 0.054374352 22.024517 3.485145e-06
4649          USP37      2_129 0.035570979 20.587506 2.131179e-06
4654         DNAJB2      2_129 0.008698698  5.839547 1.478270e-07
4655         TMBIM1      2_129 0.040697376 19.094749 2.261521e-06
4656        CYP27A1      2_129 0.008274322  8.427973 2.029438e-07
5617        FAM134A      2_129 0.023178378 14.752820 9.951267e-07
5618          CNOT9      2_129 0.018681981 17.677947 9.611144e-07
5620          GMPPA      2_129 0.010075728  7.327311 2.148530e-07
7090          CXCR1      2_129 0.008884712  6.046204 1.563315e-07
7091          ARPC2      2_129 0.031842203 17.311662 1.604214e-06
7095          STK36      2_129 0.011916709 15.777601 5.471641e-07
7101         ANKZF1      2_129 0.013437085 10.384125 4.060647e-07
7104          GLB1L      2_129 0.008407433  5.452793 1.334144e-07
8699            DES      2_129 0.034829756 19.722337 1.999075e-06
9189          CXCR2      2_129 0.018287403 12.276366 6.533444e-07
9840          NHEJ1      2_129 0.025684583 17.265605 1.290549e-06
9895          RUFY4      2_129 0.011442921  9.066224 3.019143e-07
10508         ATG9A      2_129 0.012611063  9.734078 3.572456e-07
10864       SLC23A3      2_129 0.009736338  6.643066 1.882281e-07
12345 RP11-459I19.1      2_129 0.011464976 15.500744 5.171851e-07
12356   RP11-33O4.1      2_129 0.008714144  6.549258 1.660876e-07
                z num_eqtl
243    0.05100451        1
758    0.08326323        1
813   -0.95838574        1
2934  -3.71953627        1
2936   0.93284395        1
2941  -0.77901195        2
2943   1.84732093        1
3579   0.41418410        1
3580   1.83086497        2
3582  -1.30597047        1
3880  -0.56762321        1
3881   4.72553123        1
3882  -1.90836173        1
3883  -2.20803733        1
4649  -3.97558895        3
4654  -0.48915334        1
4655  -1.92761030        2
4656   1.82913381        2
5617  -1.33896546        1
5618   3.65097314        1
5620  -0.73851578        1
7090   0.56376400        1
7091  -1.94043222        1
7095   3.44963509        2
7101  -1.21232145        2
7104  -0.12917630        1
8699   2.01667108        1
9189  -1.47518963        1
9840   1.96641989        2
9895   1.02099255        2
10508 -1.13410218        1
10864  0.30848047        1
12345  3.40999367        1
12356 -0.93933690        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "NPC1"
[1] "18_12"
           genename region_tag  susie_pip       mu2          PVE
454           LAMA3      18_12 0.01015192  4.890869 1.444956e-07
1708          RIOK3      18_12 0.02100161 12.044514 7.361429e-07
4476        TMEM241      18_12 0.02805177 14.903656 1.216672e-06
4477        CABLES1      18_12 0.01032435  5.056288 1.519199e-07
5304        C18orf8      18_12 0.02842338 15.034149 1.243583e-06
5306           NPC1      18_12 0.06410632 23.134021 4.315909e-06
6311          CABYR      18_12 0.01015317  4.892075 1.445490e-07
7914         TTC39C      18_12 0.03939797 18.272008 2.094983e-06
12078 RP11-799B12.4      18_12 0.01019999  4.937264 1.465570e-07
                z num_eqtl
454    0.01316175        2
1708  -1.34902775        1
4476  -1.84256728        2
4477  -0.14555775        1
5304   1.67075330        2
5306  -2.39576123        1
6311  -0.02760888        1
7914   1.78195458        3
12078  0.06691488        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "ABCG8"
[1] "2_27"
        genename region_tag    susie_pip        mu2          PVE
2977       THADA       2_27 1.774123e-06   8.185088 4.225978e-11
4930    DYNC2LI1       2_27 8.642949e-07   8.220901 2.067767e-11
4943      LRPPRC       2_27 2.559012e-06  12.554560 9.349623e-11
5563       ABCG8       2_27 9.999667e-01 313.616431 9.126508e-04
6208     PLEKHH2       2_27 6.426698e-06  16.108345 3.012723e-10
11022 C1GALT1C1L       2_27 3.979770e-06  24.312848 2.815880e-10
12661  LINC01126       2_27 1.311463e-05  17.794474 6.791435e-10
                 z num_eqtl
2977   -2.34643541        2
4930   -0.02538894        1
4943   -0.91853212        1
5563  -20.29398177        1
6208   -2.96266114        2
11022   3.06095256        2
12661   0.91913800        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "NCEH1"
[1] "3_106"
       genename region_tag  susie_pip      mu2          PVE          z
5661      NCEH1      3_106 0.01190432 7.014945 2.430239e-07 -0.6532732
11015 LINC02068      3_106 0.01304684 7.915902 3.005564e-07  0.8738216
      num_eqtl
5661         1
11015        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "STAR"
[1] "8_34"
           genename region_tag   susie_pip       mu2          PVE
900           FGFR1       8_34 0.011971129  9.431660 3.285818e-07
4029          ASH2L       8_34 0.059082809 25.237287 4.339344e-06
5842           STAR       8_34 0.069926483 26.930293 5.480284e-06
5843          PROSC       8_34 0.016235992 12.429315 5.872815e-07
5846          TACC1       8_34 0.007567229  4.927740 1.085188e-07
5850           NSD3       8_34 0.007540932  4.893582 1.073921e-07
7411          LETM2       8_34 0.008060518  5.547421 1.301291e-07
7965          ADAM9       8_34 0.236224813 39.581579 2.721065e-05
8067          TM2D2       8_34 0.011056030  8.650101 2.783176e-07
8068        PLEKHA2       8_34 0.020595468 14.773199 8.854550e-07
8727           LSM1       8_34 0.007540263  4.892712 1.073634e-07
12297 RP11-350N15.5       8_34 0.007637402  5.018306 1.115381e-07
                z num_eqtl
900   -0.93406568        1
4029  -2.41270520        1
5842  -2.50033778        1
5843  -1.18549708        1
5846  -0.11708259        2
5850  -0.06923734        2
7411  -0.48761003        2
7965   3.23657677        2
8067   0.85605170        2
8068   1.82472982        1
8727   0.14152273        1
12297  0.26974556        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "FADS1"
[1] "11_34"
           genename region_tag   susie_pip        mu2          PVE
1196          GANAB      11_34 0.007548994  72.351363 1.589484e-06
2444           DTX4      11_34 0.004504383   5.112575 6.701859e-08
2453         MS4A6A      11_34 0.005002401   6.032977 8.782749e-08
2455         CCDC86      11_34 0.005785257   7.386090 1.243534e-07
2456         PRPF19      11_34 0.008961135  12.092998 3.153678e-07
2457        TMEM109      11_34 0.010242105  13.173164 3.926446e-07
2480        SLC15A3      11_34 0.004713832   6.044230 8.291544e-08
2481            CD5      11_34 0.004532471   5.291873 6.980151e-08
3676   DKFZP434K028      11_34 0.004413567   5.958616 7.653418e-08
4507          FADS2      11_34 0.006376841 145.198701 2.694565e-06
4508        TMEM258      11_34 0.034859388  66.046317 6.700214e-06
5990        TMEM138      11_34 0.005995945  10.249125 1.788400e-07
5991          FADS1      11_34 0.999536191 160.579155 4.670980e-04
5994         INCENP      11_34 0.004408534   5.798855 7.439723e-08
5996          CPSF7      11_34 0.005172902   9.944036 1.496984e-07
5997          MS4A2      11_34 0.008397542  10.906045 2.665261e-07
6902       CYB561A3      11_34 0.005995945  10.249125 1.788400e-07
6903        PPP1R32      11_34 0.005377428   6.576367 1.029155e-07
6904         ASRGL1      11_34 0.004535375   5.204784 6.869676e-08
7662        FAM111A      11_34 0.006610386   8.672720 1.668409e-07
7684          PATL1      11_34 0.062437407  30.278826 5.501792e-06
7687           STX3      11_34 0.004422897   4.937793 6.355650e-08
7688         MRPL16      11_34 0.006813434   8.877083 1.760178e-07
7697          MS4A7      11_34 0.004397739   4.910667 6.284783e-08
7698         MS4A14      11_34 0.025929290  21.804560 1.645350e-06
7874         VPS37C      11_34 0.005273219   6.314730 9.690606e-08
7875           VWCE      11_34 0.004740644   5.867787 8.095282e-08
7876          BEST1      11_34 0.004701647  18.832394 2.576771e-07
7955           FEN1      11_34 0.006376841 145.198701 2.694565e-06
9789        TMEM216      11_34 0.004401948   4.951548 6.343168e-08
9982        FAM111B      11_34 0.004473774   5.029480 6.548132e-08
10267         MPEG1      11_34 0.004535941   5.241119 6.918495e-08
10924        MS4A4E      11_34 0.005747856   7.597089 1.270789e-07
11004         FADS3      11_34 0.009838872  21.356691 6.115044e-07
11812 RP11-794G24.1      11_34 0.011356188  12.517088 4.136720e-07
11817 RP11-286N22.8      11_34 0.004941309   5.969001 8.583491e-08
                 z num_eqtl
1196  -8.204723304        1
2444   0.272926929        2
2453   0.544252801        1
2455  -0.651729299        3
2456   1.430603519        2
2457   1.421831985        1
2480   0.821410772        1
2481   0.346138465        1
3676   1.073921044        1
4507  12.072635202        1
4508  -6.946921109        2
5990  -1.782804562        1
5991  12.825882927        2
5994  -0.969291005        2
5996  -2.061044578        1
5997  -1.135206653        1
6902  -1.782804562        1
6903  -0.382653253        1
6904  -0.250084386        1
7662   0.788300174        2
7684   3.303999343        2
7687   0.001285218        2
7688   0.989371951        2
7697  -0.132073393        2
7698  -1.857701655        3
7874   0.024014132        1
7875  -0.638825054        2
7876  -3.744804132        1
7955  12.072635202        1
9789  -0.251085346        2
9982  -0.130372989        1
10267  0.288859011        1
10924  0.848247159        1
11004  3.289416818        1
11812  0.447753087        1
11817 -0.427047808        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "VDAC2"
[1] "10_49"
            genename region_tag   susie_pip       mu2          PVE
3503            PLAU      10_49 0.026685049 15.821854 1.228699e-06
5936        C10orf11      10_49 0.150382905 33.256580 1.455447e-05
6446             ADK      10_49 0.008847000  4.951811 1.274913e-07
7476           VDAC2      10_49 0.080940731 26.896946 6.335639e-06
7477          COMTD1      10_49 0.080367730 26.825060 6.273974e-06
8458           AGAP5      10_49 0.018577092 12.246854 6.620985e-07
9575           AP3M1      10_49 0.008830012  4.932941 1.267615e-07
11089     ZNF503-AS1      10_49 0.008952035  5.067676 1.320234e-07
12363 RP11-399K21.14      10_49 0.016953123 11.345631 5.597559e-07
               z num_eqtl
3503  -1.6531888        1
5936   2.9550655        2
6446   0.1263619        2
7476   2.9474923        1
7477   2.9437974        1
8458  -1.3182844        1
9575  -0.1414585        1
11089  0.3935661        1
12363 -1.4701044        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LIPC"
[1] "15_26"
     genename region_tag   susie_pip       mu2          PVE          z
4889     SLTM      15_26 0.004643298  5.487405 7.415045e-08 -0.7158866
4905   ADAM10      15_26 0.005389569  7.037329 1.103779e-07  0.8412995
6536   RNF111      15_26 0.004428133  4.975818 6.412177e-08 -0.2997052
7547     LIPC      15_26 0.004680422 41.827278 5.697245e-07 -5.9117767
8386  LDHAL6B      15_26 0.004475975  5.075357 6.611112e-08 -0.4439394
     num_eqtl
4889        1
4905        2
6536        1
7547        2
8386        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "SOAT2"
[1] "12_33"
            genename region_tag  susie_pip       mu2          PVE
203         CALCOCO1      12_33 0.02526014 13.337249 9.804428e-07
544            EIF4B      12_33 0.01103582  4.993669 1.603779e-07
1308            CBX5      12_33 0.01253538  6.268347 2.286708e-07
2519           KRT18      12_33 0.01610775  9.004347 4.220921e-07
2521            TNS2      12_33 0.01395171  7.347312 2.983158e-07
3549           SMUG1      12_33 0.01198187  5.829364 2.032667e-07
4579          ATP5G2      12_33 0.01309363  9.341398 3.559527e-07
4595           ESPL1      12_33 0.01870957 10.577787 5.759422e-07
5124          TARBP2      12_33 0.02387142 13.310904 9.247112e-07
5131           ITGB7      12_33 0.01091098  4.892335 1.553460e-07
5133            CSAD      12_33 0.02184860 11.197909 7.120014e-07
5138          ZNF740      12_33 0.07370442 22.925854 4.917443e-06
7834            KRT1      12_33 0.01346090  6.908481 2.706307e-07
7838          SPRYD3      12_33 0.02003718 10.432024 6.083108e-07
7839          IGFBP6      12_33 0.01109687  5.046585 1.629739e-07
7840           SOAT2      12_33 0.02416982 12.458524 8.763151e-07
8188            KRT8      12_33 0.03818459 17.190055 1.910230e-06
8189           KRT78      12_33 0.01112902  5.163404 1.672297e-07
9332           MFSD5      12_33 0.03955343 15.879693 1.827875e-06
10724          PRR13      12_33 0.15466067 18.801854 8.462543e-06
11586       FLJ12825      12_33 0.01295883  6.590987 2.485630e-07
11649  RP11-834C11.4      12_33 0.01144419  5.279918 1.758460e-07
11843 RP11-1136G11.8      12_33 0.01104293  5.025886 1.615167e-07
                 z num_eqtl
203   -1.413276345        1
544   -0.221941333        1
1308   0.652766171        1
2519   1.038536540        1
2521  -0.962272505        2
3549   0.396812394        1
4579   2.116508926        2
4595   1.636840591        3
5124  -3.023920328        1
5131   0.219057094        2
5133  -1.178701229        1
5138   2.546520305        2
7834  -0.570714701        1
7838   1.338767531        1
7839  -0.512279235        1
7840  -1.851220053        1
8188   2.113112572        1
8189  -0.349999201        1
9332   1.273981567        2
10724 -3.775263261        1
11586 -0.529012775        2
11649 -0.009489289        1
11843  0.012887459        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "CYP7A1"
[1] "8_45"
      genename region_tag   susie_pip      mu2          PVE         z
7859    CYP7A1       8_45 0.005477212 73.34548 1.169104e-06 -7.392476
10938   UBXN2B       8_45 0.009100891 25.96038 6.875673e-07 -3.437080
      num_eqtl
7859         1
10938        3

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "TNKS"
[1] "8_12"
           genename region_tag   susie_pip      mu2          PVE         z
8531           TNKS       8_12 0.984399078 73.76705 2.113265e-04 11.026034
11738 RP11-115J16.2       8_12 0.004472713 39.34124 5.120818e-07  7.146749
      num_eqtl
8531         2
11738        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "ADH1B"
[1] "4_66"
           genename region_tag   susie_pip       mu2          PVE
5055           MTTP       4_66 0.010983292  8.019879 2.563425e-07
5686        TRMT10A       4_66 0.011475975  9.119571 3.045680e-07
6091          EIF4E       4_66 0.009482310  6.919569 1.909473e-07
7222         METAP1       4_66 0.007832110  5.097754 1.161924e-07
7980         TSPAN5       4_66 0.014674546 11.179398 4.774231e-07
8496           ADH6       4_66 0.009968692  7.562598 2.193964e-07
10057          ADH7       4_66 0.009291632 10.533599 2.848322e-07
10115         ADH1B       4_66 0.014780629 11.319472 4.868995e-07
11584         ADH1C       4_66 0.143199294 32.307624 1.346376e-05
12374 RP11-571L19.8       4_66 0.008322258  5.636996 1.365241e-07
               z num_eqtl
5055  -0.7972018        1
5686  -1.1240076        1
6091   0.9082871        1
7222  -0.1831346        1
7980  -1.2321573        2
8496   0.7334699        2
10057  1.9684512        2
10115 -1.1153042        1
11584 -3.1932254        3
12374 -0.4759060        3

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "LPA"
[1] "6_104"
        genename region_tag    susie_pip       mu2          PVE          z
1074      MAP3K4      6_104 7.636629e-07  6.705598 1.490251e-11  0.7795492
3449         PLG      6_104 6.083374e-06 17.973714 3.182018e-10  2.4097623
5799     SLC22A3      6_104 1.427461e-06 33.716593 1.400646e-10 -6.5929784
10435        LPA      6_104 5.130046e-06 64.968931 9.699454e-10  8.1196160
11043 RP1-81D8.3      6_104 6.907518e-01 51.497857 1.035217e-04 -7.2217829
      num_eqtl
1074         1
3449         1
5799         1
10435        1
11043        2

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "VDAC1"
[1] "5_80"
          genename region_tag  susie_pip       mu2          PVE
102          CDKL3       5_80 0.01301362  7.111089 2.693113e-07
681          PITX1       5_80 0.01175939  6.114823 2.092613e-07
760           AFF4       5_80 0.01525810  8.676370 3.852643e-07
978           TCF7       5_80 0.02805264 14.684077 1.198784e-06
2759          SKP1       5_80 0.01871787 10.689162 5.822647e-07
2761        PPP2CA       5_80 0.02118127 11.908343 7.340467e-07
2763       C5orf15       5_80 0.01110393  5.551217 1.793846e-07
3214         UBE2B       5_80 0.01301362  7.111089 2.693113e-07
4283         PCBD2       5_80 0.01389214  7.753571 3.134666e-07
6400       ZCCHC10       5_80 0.01051893  5.019498 1.536569e-07
7311         SEPT8       5_80 0.02248072 12.495938 8.175220e-07
7312       SHROOM1       5_80 0.01402378  7.846342 3.202230e-07
7313          GDF9       5_80 0.01038689  4.895419 1.479775e-07
7340         CAMLG       5_80 0.01039064  4.898964 1.481381e-07
8217         HSPA4       5_80 0.01038610  4.894672 1.479437e-07
9275       C5orf24       5_80 0.01048463  4.987424 1.521772e-07
10837        VDAC1       5_80 0.04021915 18.256974 2.136889e-06
11352   CDKN2AIPNL       5_80 0.01907763 10.876816 6.038742e-07
11643 RP11-215P8.4       5_80 0.01208056  6.379658 2.242874e-07
11660    LINC01843       5_80 0.01097284  5.434536 1.735409e-07
                z num_eqtl
102    0.87889673        1
681    0.52096477        1
760    1.02990725        1
978    1.55983246        1
2759  -1.31317545        1
2761   1.40300081        2
2763   0.41873673        1
3214   0.87889673        1
4283   0.78727304        1
6400  -0.15509357        1
7311   1.30260276        1
7312   0.89963346        2
7313   0.03182872        1
7340   0.10493598        1
8217  -0.07597330        2
9275  -0.20162988        1
10837  1.82176093        1
11352 -1.07306079        2
11643  0.60776683        1
11660  0.36441021        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "FADS3"
[1] "11_34"
           genename region_tag   susie_pip        mu2          PVE
1196          GANAB      11_34 0.007548994  72.351363 1.589484e-06
2444           DTX4      11_34 0.004504383   5.112575 6.701859e-08
2453         MS4A6A      11_34 0.005002401   6.032977 8.782749e-08
2455         CCDC86      11_34 0.005785257   7.386090 1.243534e-07
2456         PRPF19      11_34 0.008961135  12.092998 3.153678e-07
2457        TMEM109      11_34 0.010242105  13.173164 3.926446e-07
2480        SLC15A3      11_34 0.004713832   6.044230 8.291544e-08
2481            CD5      11_34 0.004532471   5.291873 6.980151e-08
3676   DKFZP434K028      11_34 0.004413567   5.958616 7.653418e-08
4507          FADS2      11_34 0.006376841 145.198701 2.694565e-06
4508        TMEM258      11_34 0.034859388  66.046317 6.700214e-06
5990        TMEM138      11_34 0.005995945  10.249125 1.788400e-07
5991          FADS1      11_34 0.999536191 160.579155 4.670980e-04
5994         INCENP      11_34 0.004408534   5.798855 7.439723e-08
5996          CPSF7      11_34 0.005172902   9.944036 1.496984e-07
5997          MS4A2      11_34 0.008397542  10.906045 2.665261e-07
6902       CYB561A3      11_34 0.005995945  10.249125 1.788400e-07
6903        PPP1R32      11_34 0.005377428   6.576367 1.029155e-07
6904         ASRGL1      11_34 0.004535375   5.204784 6.869676e-08
7662        FAM111A      11_34 0.006610386   8.672720 1.668409e-07
7684          PATL1      11_34 0.062437407  30.278826 5.501792e-06
7687           STX3      11_34 0.004422897   4.937793 6.355650e-08
7688         MRPL16      11_34 0.006813434   8.877083 1.760178e-07
7697          MS4A7      11_34 0.004397739   4.910667 6.284783e-08
7698         MS4A14      11_34 0.025929290  21.804560 1.645350e-06
7874         VPS37C      11_34 0.005273219   6.314730 9.690606e-08
7875           VWCE      11_34 0.004740644   5.867787 8.095282e-08
7876          BEST1      11_34 0.004701647  18.832394 2.576771e-07
7955           FEN1      11_34 0.006376841 145.198701 2.694565e-06
9789        TMEM216      11_34 0.004401948   4.951548 6.343168e-08
9982        FAM111B      11_34 0.004473774   5.029480 6.548132e-08
10267         MPEG1      11_34 0.004535941   5.241119 6.918495e-08
10924        MS4A4E      11_34 0.005747856   7.597089 1.270789e-07
11004         FADS3      11_34 0.009838872  21.356691 6.115044e-07
11812 RP11-794G24.1      11_34 0.011356188  12.517088 4.136720e-07
11817 RP11-286N22.8      11_34 0.004941309   5.969001 8.583491e-08
                 z num_eqtl
1196  -8.204723304        1
2444   0.272926929        2
2453   0.544252801        1
2455  -0.651729299        3
2456   1.430603519        2
2457   1.421831985        1
2480   0.821410772        1
2481   0.346138465        1
3676   1.073921044        1
4507  12.072635202        1
4508  -6.946921109        2
5990  -1.782804562        1
5991  12.825882927        2
5994  -0.969291005        2
5996  -2.061044578        1
5997  -1.135206653        1
6902  -1.782804562        1
6903  -0.382653253        1
6904  -0.250084386        1
7662   0.788300174        2
7684   3.303999343        2
7687   0.001285218        2
7688   0.989371951        2
7697  -0.132073393        2
7698  -1.857701655        3
7874   0.024014132        1
7875  -0.638825054        2
7876  -3.744804132        1
7955  12.072635202        1
9789  -0.251085346        2
9982  -0.130372989        1
10267  0.288859011        1
10924  0.848247159        1
11004  3.289416818        1
11812  0.447753087        1
11817 -0.427047808        1

Version Author Date
9ca0532 wesleycrouse 2022-05-07
[1] "APOC2"
[1] "19_32"
      genename region_tag susie_pip        mu2 PVE           z num_eqtl
104      MARK4      19_32         0  24.156050   0  -2.2463768        1
109   TRAPPC6A      19_32         0  30.419699   0   1.8816459        1
196      ERCC1      19_32         0  14.630621   0  -0.2091619        1
538     ZNF112      19_32         0 147.060847   0  10.3860543        1
781        PVR      19_32         0 295.701527   0 -10.0782525        2
1930   PPP1R37      19_32         0 125.325866   0 -12.8921201        2
1933       CKM      19_32         0  15.790137   0  -1.5738464        1
1937     ERCC2      19_32         0  11.393498   0   2.3297330        2
1942      KLC3      19_32         0  10.261211   0   1.7718715        1
3143    CD3EAP      19_32         0  27.197872   0  -3.0806361        1
3738      FOSB      19_32         0  18.939018   0  -2.3658041        1
3739      OPA3      19_32         0  13.745586   0  -0.4654901        2
3741      RTN2      19_32         0  31.851472   0   5.5300783        1
3742      VASP      19_32         0  12.782944   0   1.8957985        1
4048   NECTIN2      19_32         0 109.049101   0   6.2443536        2
4049      APOE      19_32         0  47.814725   0  -2.0092826        1
4050    TOMM40      19_32         0  25.471834   0  -1.4020544        1
5377    GEMIN7      19_32         0 193.977845   0  10.9432287        2
6721    ZNF233      19_32         0 115.540185   0  -9.2725820        2
6722    ZNF235      19_32         0 106.459071   0  -9.2122953        1
7760    ZNF180      19_32         0  28.966715   0  -3.9159702        3
8231    ZNF296      19_32         0 111.900405   0   5.4593536        1
9745  CEACAM19      19_32         0  64.977411   0   9.4554813        2
9810      BCAM      19_32         0 109.853203   0   4.6421318        1
9989   BLOC1S3      19_32         0  11.134809   0   2.3014119        1
10862    PPM1N      19_32         0  31.392464   0   5.4808308        1
10863 CEACAM16      19_32         0   7.492019   0   1.8740580        1
10965   IGSF23      19_32         0  12.715131   0   1.9670520        1
11300    APOC2      19_32         0  57.109664   0  -9.1630690        2
12131    APOC4      19_32         0  49.134521   0   8.0662459        2
12133   ZNF285      19_32         0  14.844078   0   0.9962471        2
12637   ZNF229      19_32         0  91.589158   0  10.9591492        2
12704  EXOC3L2      19_32         0  25.621614   0  -1.3436507        1
189      QPCTL      19_32         0  24.612253   0  -2.0303487        2
190      PPP5C      19_32         0  13.448628   0   1.3374649        1
1949      DMPK      19_32         0  20.547016   0  -1.8090245        1
1963    CCDC61      19_32         0  21.113494   0   1.8414612        2
3628     HIF3A      19_32         0  20.433734   0  -1.8024680        2
3740    SNRPD2      19_32         0  10.032419   0   1.0366923        1
3743     SYMPK      19_32         0   4.904061   0  -0.0525717        1
6726     CALM3      19_32         0  54.624358   0   3.2242313        2
8073     CCDC8      19_32         0   7.392264   0   0.7230949        2
8809     MYPOP      19_32         0  21.246597   0   1.8490001        1
8908      GPR4      19_32         0  66.214978   0  -3.5802828        1
9281    PNMAL1      19_32         0  20.657755   0  -1.8154111        4
9659      DMWD      19_32         0  19.622421   0  -1.7547946        1
10682   PNMAL2      19_32         0   5.246628   0  -0.2727077        1
11190   PPP5D1      19_32         0   6.392914   0  -0.5603345        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]
}

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
[1] "USP1"
[1] "1_39"
     genename region_tag   susie_pip        mu2          PVE          z
3024    DOCK7       1_39 0.010009214  24.336911 7.089013e-07  4.4594815
3733    ATG4C       1_39 0.024969936  81.344496 5.911067e-06 -8.6477262
4316    KANK4       1_39 0.008972585   5.075471 1.325300e-07  0.5123038
4317  ANGPTL3       1_39 0.114994714 249.654215 8.354820e-05 16.1322287
6956    TM2D1       1_39 0.056960127  23.071146 3.824375e-06  2.1432487
6957     USP1       1_39 0.894444213 253.879917 6.608485e-04 16.2582110
     num_eqtl
3024        1
3733        1
4316        1
4317        1
6956        1
6957        1

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
[1] "DDX56"
[1] "7_32"
        genename region_tag   susie_pip       mu2          PVE           z
233       NPC1L1       7_32 0.963950103 89.799637 2.519123e-04 -10.7619311
500       CAMK2B       7_32 0.011448883  9.069543 3.021822e-07  -1.5162371
541       MRPS24       7_32 0.007219919  6.241174 1.311351e-07   0.3827818
927       UBE2D4       7_32 0.009713358  9.447753 2.670658e-07   1.1906995
2101        OGDH       7_32 0.008233138 19.553105 4.684912e-07   0.1499623
2177        COA1       7_32 0.011779687  9.889778 3.390319e-07  -0.7042755
2178       BLVRA       7_32 0.006315409  5.151025 9.467068e-08   0.4660052
2179       URGCP       7_32 0.007395483  6.536479 1.406795e-07  -0.6697027
2183       AEBP1       7_32 0.022616310 20.450643 1.346012e-06  -2.6280619
2184       POLD2       7_32 0.014036536 13.082073 5.343881e-07  -1.4227083
2185        MYL7       7_32 0.007671677  6.668056 1.488709e-07   0.4396483
2186         GCK       7_32 0.006293048  5.111982 9.362043e-08  -0.2515709
3488        POLM       7_32 0.006250717  5.193247 9.446895e-08   0.5460441
4704       DDX56       7_32 0.974637917 58.704990 1.665093e-04   9.4462712
4706        DBNL       7_32 0.008351150  6.910009 1.679365e-07   0.1009981
6619       TMED4       7_32 0.011779787 45.305741 1.553141e-06   7.5475920
7330      STK17A       7_32 0.006414170  5.405180 1.008953e-07   0.5439997
11147 AC004951.6       7_32 0.009988428  8.243453 2.396220e-07   0.2209151
      num_eqtl
233          1
500          2
541          1
927          1
2101         2
2177         2
2178         1
2179         2
2183         1
2184         2
2185         1
2186         1
3488         3
4704         2
4706         2
6619         2
7330         1
11147        1

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 
7236 3251  389   20    5 
#all genes with 4+ eQTL
ctwas_gene_res[ctwas_gene_res$num_eqtl>3,]
      chrom                 id       pos type region_tag1 region_tag2
9872      3 ENSG00000188086.13  46740510 gene           3          33
9154      3 ENSG00000180376.16  56557027 gene           3          39
5031      4 ENSG00000138744.14  75919602 gene           4          51
7252      4 ENSG00000164111.14 121685788 gene           4          78
9089      6 ENSG00000179344.16  32668036 gene           6          26
11216     6  ENSG00000231852.6  32037872 gene           6          26
3487      7 ENSG00000122674.11   5882180 gene           7           9
10043     7 ENSG00000196247.11  64665954 gene           7          44
2211      9 ENSG00000107099.15    211762 gene           9           1
4764      9 ENSG00000136866.13 113056669 gene           9          58
4473     10 ENSG00000134463.14  11740178 gene          10          10
3820     14 ENSG00000126790.11  59473099 gene          14          27
11861    14  ENSG00000258572.1  95515864 gene          14          49
9432     16 ENSG00000183549.10  20409006 gene          16          19
5259     16 ENSG00000140995.16  89919436 gene          16          54
7826     17 ENSG00000167723.14   3557863 gene          17           3
9041     17 ENSG00000178852.15  47322830 gene          17          27
9330     17 ENSG00000182534.13  76686803 gene          17          43
8584     17 ENSG00000173818.16  80415678 gene          17          45
9281     19 ENSG00000182013.17  46471505 gene          19          32
11086    20  ENSG00000225978.3  63102057 gene          20          37
1478     22 ENSG00000100299.17  50625049 gene          22          24
4432      1 ENSG00000134201.10 109704237 gene           1          67
9631     11  ENSG00000185522.8    559466 gene          11           1
3791     13 ENSG00000126231.13 113146308 gene          13          62
      cs_index   susie_pip       mu2 region_tag          PVE
9872         0 0.009863635  5.773608       3_33 1.657313e-07
9154         0 0.013519773  6.218517       3_39 2.446676e-07
5031         0 0.009322192  5.941196       4_51 1.611804e-07
7252         0 0.019523857 13.423355       4_78 7.626882e-07
9089         0 0.003276310 24.319539       6_26 2.318785e-07
11216        0 0.009027360 26.703548       6_26 7.015361e-07
3487         0 0.017259842 18.888882        7_9 9.487753e-07
10043        0 0.005324925  6.312501       7_44 9.782170e-08
2211         0 0.014732416  7.493706        9_1 3.212853e-07
4764         0 0.022576841  9.775594       9_58 6.422833e-07
4473         0 0.142024830 34.074240      10_10 1.408351e-05
3820         0 0.014623138  5.068624      14_27 2.157004e-07
11861        0 0.009145074  5.139738      14_49 1.367882e-07
9432         0 0.011139280  5.648711      16_19 1.831162e-07
5259         0 0.064535804 20.326696      16_54 3.817577e-06
7826         0 0.011933385  8.059570       17_3 2.798954e-07
9041         0 0.011965377 57.621434      17_27 2.006461e-06
9330         0 0.008853663  5.284859      17_43 1.361685e-07
8584         0 0.011760985  4.906819      17_45 1.679438e-07
9281         0 0.000000000 20.657755      19_32 0.000000e+00
11086        0 0.014281972  7.966534      20_37 3.311143e-07
1478         0 0.010575328  5.389965      22_24 1.658823e-07
4432         0 0.014457105 14.940793       1_67 6.286013e-07
9631         0 0.011363856  5.542446       11_1 1.832937e-07
3791         0 0.016664327 13.265322      13_62 6.433182e-07
            genename      gene_type           z num_eqtl
9872          PRSS45 protein_coding  0.44793194        4
9154          CCDC66 protein_coding -0.92699620        4
5031            NAAA protein_coding -0.45129769        4
7252           ANXA5 protein_coding -1.37617072        5
9089        HLA-DQB1 protein_coding  5.01066331        4
11216        CYP21A2 protein_coding  3.53603409        4
3487            CCZ1 protein_coding  1.62284981        5
10043         ZNF107 protein_coding -0.52202720        4
2211           DOCK8 protein_coding -0.79491899        5
4764           ZFP37 protein_coding -1.16499741        4
4473          ECHDC3 protein_coding  3.24989823        5
3820         L3HYPDH protein_coding -0.25254601        4
11861 RP11-1070N10.3        lincRNA  0.25358234        4
9432           ACSM5 protein_coding -0.21729721        4
5259            DEF8 protein_coding  1.97803190        4
7826           TRPV3 protein_coding  0.89399610        4
9041         EFCAB13 protein_coding  7.36590043        4
9330           MXRA7 protein_coding -0.27986200        4
8584           ENDOV protein_coding  0.06847957        4
9281          PNMAL1 protein_coding -1.81541107        4
11086          HAR1A        lincRNA  0.85044108        4
1478            ARSA protein_coding  0.08026791        4
4432           GSTM5 protein_coding  2.37982269        5
9631          LMNTD2 protein_coding  0.63337315        4
3791            PROZ protein_coding  2.48358935        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          3 
0.57575758 0.33333333 0.09090909 
#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
6996      1 ENSG00000162836.11 147646379 gene           1          73
5544      1 ENSG00000143771.11 224356827 gene           1         114
3721      2 ENSG00000125629.14 118088372 gene           2          69
3562      2 ENSG00000123612.15 157625480 gene           2          94
6220      5 ENSG00000152684.10  52787392 gene           5          31
10657     6 ENSG00000204599.14  30324306 gene           6          24
4704      7 ENSG00000136271.10  44575121 gene           7          32
1114      7 ENSG00000087087.18 100875204 gene           7          62
8531      8 ENSG00000173273.15   9315699 gene           8          12
6391      9 ENSG00000155158.20  15280189 gene           9          13
3300     10 ENSG00000119965.12 122945179 gene          10          77
5991     11 ENSG00000149485.18  61829161 gene          11          34
12008    16  ENSG00000261701.6  72063820 gene          16          38
1999     19 ENSG00000105287.12  46713856 gene          19          33
      cs_index susie_pip       mu2 region_tag          PVE genename
6996         1 0.9686714  25.67816       1_73 7.238702e-05     ACP6
5544         1 0.9996225  48.38268      1_114 1.407493e-04    CNIH4
3721         1 0.9997835  62.50602       2_69 1.818646e-04   INSIG2
3562         1 0.9388267  26.34289       2_94 7.197292e-05   ACVR1C
6220         1 0.9671689  72.14658       5_31 2.030665e-04     PELO
10657        1 0.9986851  72.25250       6_24 2.099915e-04   TRIM39
4704         2 0.9746379  58.70499       7_32 1.665093e-04    DDX56
1114         2 0.9266928  33.00834       7_62 8.901839e-05     SRRT
8531         1 0.9843991  73.76705       8_12 2.113265e-04     TNKS
6391         0 0.9260006  23.04986       9_13 6.211548e-05   TTC39B
3300         1 0.8796497  35.77483      10_77 9.158149e-05 C10orf88
5991         1 0.9995362 160.57915      11_34 4.670980e-04    FADS1
12008        1 1.0000000 209.84504      16_38 6.106875e-04      HPR
1999         2 0.9960498  32.48399      19_33 9.416092e-05    PRKD2
           gene_type          z num_eqtl
6996  protein_coding   4.648193        2
5544  protein_coding   6.721857        2
3721  protein_coding  -9.364196        3
3562  protein_coding  -4.737778        2
6220  protein_coding   8.426917        2
10657 protein_coding   8.848422        3
4704  protein_coding   9.446271        2
1114  protein_coding   5.547715        2
8531  protein_coding  11.026034        2
6391  protein_coding  -4.287139        3
3300  protein_coding  -6.634448        2
5991  protein_coding  12.825883        2
12008 protein_coding -17.240252        2
1999  protein_coding   5.289849        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)
# 
# 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)
# 
# 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)]
# 
# 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

   GAS6  INSIG2  TTC39B   INHBB    ACP6     HPR   PRKD2  CYP2A6  ACVR1C 
     14      12      10       8       5       4       4       3       2 
   KDSR   CNIH4 CSNK1G3 SPTY2D1 
      2       1       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

#create extended bystanders list (all silver standard, not just imputed silver standard)
# 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)
# 
# 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]
}

#report number of weights before imputation
nrow(gene_info)
[1] 12714

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")
Warning: ggrepel: 14 unlabeled data points (too many overlaps). Consider
increasing max.overlaps

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
9ca0532 wesleycrouse 2022-05-07
6357b14 wesleycrouse 2021-11-12
b4b6166 wesleycrouse 2021-11-12
31ada3d wesleycrouse 2021-11-01
5bec17a wesleycrouse 2021-11-01
ba15fc2 wesleycrouse 2021-11-01
2c8dcaf wesleycrouse 2021-11-01
#number of SNPs at PIP>0.8 threshold
sum(out_table$susie_pip>0.8)
[1] 33
#number of SNPs at PIP>0.5 threshold
sum(out_table$susie_pip>0.5)
[1] 59
#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
4435        PSRC1       1_67 1.0000000 -41.687336        1  FALSE
12008         HPR      16_38 1.0000000 -17.240252        2  FALSE
5563        ABCG8       2_27 0.9999667 -20.293982        1   TRUE
3721       INSIG2       2_69 0.9997835  -9.364196        3  FALSE
12687 RP4-781K5.7      1_121 0.9997323 -15.108415        1  FALSE
5544        CNIH4      1_114 0.9996225   6.721857        2  FALSE
5991        FADS1      11_34 0.9995362  12.825883        2   TRUE
10657      TRIM39       6_24 0.9986851   8.848422        3  FALSE
1999        PRKD2      19_33 0.9960498   5.289849        2  FALSE
7410        ABCA1       9_53 0.9953955   7.982017        1   TRUE
9390         GAS6      13_62 0.9881812  -8.923688        1  FALSE
1597         PLTP      20_28 0.9877967  -5.732491        1   TRUE
8531         TNKS       8_12 0.9843991  11.026034        2   TRUE
7040        INHBB       2_70 0.9822549  -8.518936        1  FALSE
2092          SP4       7_19 0.9770590  10.693191        1  FALSE
4704        DDX56       7_32 0.9746379   9.446271        2  FALSE
6093      CSNK1G3       5_75 0.9746218   9.116291        1  FALSE
6996         ACP6       1_73 0.9686714   4.648193        2  FALSE
6220         PELO       5_31 0.9671689   8.426917        2  FALSE
8865         FUT2      19_33 0.9654279 -11.927107        1  FALSE
233        NPC1L1       7_32 0.9639501 -10.761931        1   TRUE
11790      CYP2A6      19_28 0.9618748   5.407028        1  FALSE
3247         KDSR      18_35 0.9552678  -4.526287        1  FALSE
3562       ACVR1C       2_94 0.9388267  -4.737778        2  FALSE
6778         PKN3       9_66 0.9359867  -6.620563        1  FALSE
1114         SRRT       7_62 0.9266928   5.547715        2  FALSE
6391       TTC39B       9_13 0.9260006  -4.287139        3  FALSE
6957         USP1       1_39 0.8944442  16.258211        1  FALSE
3300     C10orf88      10_77 0.8796497  -6.634448        2  FALSE
9062      KLHDC7A       1_13 0.8184900   4.124187        1  FALSE
9072      SPTY2D1      11_13 0.8096237  -5.557123        1  FALSE
8931      CRACR2B       11_1 0.8018304  -3.989585        1  FALSE
8418         POP7       7_62 0.8015981  -5.845258        1  FALSE
      GO_overlap_silver bystander
4435                  0      TRUE
12008                 4     FALSE
5563                 16     FALSE
3721                 12     FALSE
12687                 0     FALSE
5544                  1     FALSE
5991                 11     FALSE
10657                 0     FALSE
1999                  4     FALSE
7410                 38     FALSE
9390                 14     FALSE
1597                 20     FALSE
8531                  0     FALSE
7040                  8     FALSE
2092                  0     FALSE
4704                  0      TRUE
6093                  1     FALSE
6996                  5     FALSE
6220                  0     FALSE
8865                  0     FALSE
233                  11     FALSE
11790                 3     FALSE
3247                  2     FALSE
3562                  2     FALSE
6778                  0     FALSE
1114                  0     FALSE
6391                 10     FALSE
6957                  0      TRUE
3300                  0     FALSE
9062                  0     FALSE
9072                  1     FALSE
8931                  0     FALSE
8418                  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
4435        PSRC1       1_67 1.0000000 -41.687336        1  FALSE
12008         HPR      16_38 1.0000000 -17.240252        2  FALSE
5563        ABCG8       2_27 0.9999667 -20.293982        1   TRUE
3721       INSIG2       2_69 0.9997835  -9.364196        3  FALSE
12687 RP4-781K5.7      1_121 0.9997323 -15.108415        1  FALSE
5544        CNIH4      1_114 0.9996225   6.721857        2  FALSE
5991        FADS1      11_34 0.9995362  12.825883        2   TRUE
10657      TRIM39       6_24 0.9986851   8.848422        3  FALSE
1999        PRKD2      19_33 0.9960498   5.289849        2  FALSE
7410        ABCA1       9_53 0.9953955   7.982017        1   TRUE
9390         GAS6      13_62 0.9881812  -8.923688        1  FALSE
1597         PLTP      20_28 0.9877967  -5.732491        1   TRUE
8531         TNKS       8_12 0.9843991  11.026034        2   TRUE
7040        INHBB       2_70 0.9822549  -8.518936        1  FALSE
2092          SP4       7_19 0.9770590  10.693191        1  FALSE
4704        DDX56       7_32 0.9746379   9.446271        2  FALSE
6093      CSNK1G3       5_75 0.9746218   9.116291        1  FALSE
6996         ACP6       1_73 0.9686714   4.648193        2  FALSE
6220         PELO       5_31 0.9671689   8.426917        2  FALSE
8865         FUT2      19_33 0.9654279 -11.927107        1  FALSE
233        NPC1L1       7_32 0.9639501 -10.761931        1   TRUE
11790      CYP2A6      19_28 0.9618748   5.407028        1  FALSE
3247         KDSR      18_35 0.9552678  -4.526287        1  FALSE
3562       ACVR1C       2_94 0.9388267  -4.737778        2  FALSE
6778         PKN3       9_66 0.9359867  -6.620563        1  FALSE
1114         SRRT       7_62 0.9266928   5.547715        2  FALSE
6391       TTC39B       9_13 0.9260006  -4.287139        3  FALSE
6957         USP1       1_39 0.8944442  16.258211        1  FALSE
3300     C10orf88      10_77 0.8796497  -6.634448        2  FALSE
9062      KLHDC7A       1_13 0.8184900   4.124187        1  FALSE
9072      SPTY2D1      11_13 0.8096237  -5.557123        1  FALSE
8931      CRACR2B       11_1 0.8018304  -3.989585        1  FALSE
8418         POP7       7_62 0.8015981  -5.845258        1  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
4435        PSRC1                 0      TRUE
12008         HPR                 4     FALSE
5563        ABCG8                16     FALSE
3721       INSIG2                12     FALSE
12687 RP4-781K5.7                 0     FALSE
5544        CNIH4                 1     FALSE
5991        FADS1                11     FALSE
10657      TRIM39                 0     FALSE
1999        PRKD2                 4     FALSE
7410        ABCA1                38     FALSE
9390         GAS6                14     FALSE
1597         PLTP                20     FALSE
8531         TNKS                 0     FALSE
7040        INHBB                 8     FALSE
2092          SP4                 0     FALSE
4704        DDX56                 0      TRUE
6093      CSNK1G3                 1     FALSE
6996         ACP6                 5     FALSE
6220         PELO                 0     FALSE
8865         FUT2                 0     FALSE
233        NPC1L1                11     FALSE
11790      CYP2A6                 3     FALSE
3247         KDSR                 2     FALSE
3562       ACVR1C                 2     FALSE
6778         PKN3                 0     FALSE
1114         SRRT                 0     FALSE
6391       TTC39B                10     FALSE
6957         USP1                 0      TRUE
3300     C10orf88                 0     FALSE
9062      KLHDC7A                 0     FALSE
9072      SPTY2D1                 1     FALSE
8931      CRACR2B                 0     FALSE
8418         POP7                 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")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
6357b14 wesleycrouse 2021-11-12
b4b6166 wesleycrouse 2021-11-12
31ada3d wesleycrouse 2021-11-01
5bec17a wesleycrouse 2021-11-01
out_table[out_table$region_tag=="8_12",report_cols[-(7:8)]]
           genename region_tag   susie_pip         z num_eqtl silver
8531           TNKS       8_12 0.984399078 11.026034        2   TRUE
11738 RP11-115J16.2       8_12 0.004472713  7.146749        1  FALSE
out_table[out_table$region_tag=="8_12",report_cols[c(1,7:8)]]
           genename GO_overlap_silver bystander
8531           TNKS                 0     FALSE
11738 RP11-115J16.2                NA     FALSE

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")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
6357b14 wesleycrouse 2021-11-12
b4b6166 wesleycrouse 2021-11-12
c85187d wesleycrouse 2021-11-05
6dd5332 wesleycrouse 2021-11-05
31ada3d wesleycrouse 2021-11-01
5bec17a wesleycrouse 2021-11-01
out_table[out_table$region_tag=="11_34",report_cols[-(7:8)]]
           genename region_tag   susie_pip            z num_eqtl silver
1196          GANAB      11_34 0.007548994 -8.204723304        1  FALSE
2444           DTX4      11_34 0.004504383  0.272926929        2  FALSE
2453         MS4A6A      11_34 0.005002401  0.544252801        1  FALSE
2455         CCDC86      11_34 0.005785257 -0.651729299        3  FALSE
2456         PRPF19      11_34 0.008961135  1.430603519        2  FALSE
2457        TMEM109      11_34 0.010242105  1.421831985        1  FALSE
2480        SLC15A3      11_34 0.004713832  0.821410772        1  FALSE
2481            CD5      11_34 0.004532471  0.346138465        1  FALSE
3676   DKFZP434K028      11_34 0.004413567  1.073921044        1  FALSE
4507          FADS2      11_34 0.006376841 12.072635202        1   TRUE
4508        TMEM258      11_34 0.034859388 -6.946921109        2  FALSE
5990        TMEM138      11_34 0.005995945 -1.782804562        1  FALSE
5991          FADS1      11_34 0.999536191 12.825882927        2   TRUE
5994         INCENP      11_34 0.004408534 -0.969291005        2  FALSE
5996          CPSF7      11_34 0.005172902 -2.061044578        1  FALSE
5997          MS4A2      11_34 0.008397542 -1.135206653        1  FALSE
6902       CYB561A3      11_34 0.005995945 -1.782804562        1  FALSE
6903        PPP1R32      11_34 0.005377428 -0.382653253        1  FALSE
6904         ASRGL1      11_34 0.004535375 -0.250084386        1  FALSE
7662        FAM111A      11_34 0.006610386  0.788300174        2  FALSE
7684          PATL1      11_34 0.062437407  3.303999343        2  FALSE
7687           STX3      11_34 0.004422897  0.001285218        2  FALSE
7688         MRPL16      11_34 0.006813434  0.989371951        2  FALSE
7697          MS4A7      11_34 0.004397739 -0.132073393        2  FALSE
7698         MS4A14      11_34 0.025929290 -1.857701655        3  FALSE
7874         VPS37C      11_34 0.005273219  0.024014132        1  FALSE
7875           VWCE      11_34 0.004740644 -0.638825054        2  FALSE
7876          BEST1      11_34 0.004701647 -3.744804132        1  FALSE
7955           FEN1      11_34 0.006376841 12.072635202        1  FALSE
9789        TMEM216      11_34 0.004401948 -0.251085346        2  FALSE
9982        FAM111B      11_34 0.004473774 -0.130372989        1  FALSE
10267         MPEG1      11_34 0.004535941  0.288859011        1  FALSE
10924        MS4A4E      11_34 0.005747856  0.848247159        1  FALSE
11004         FADS3      11_34 0.009838872  3.289416818        1   TRUE
11812 RP11-794G24.1      11_34 0.011356188  0.447753087        1  FALSE
11817 RP11-286N22.8      11_34 0.004941309 -0.427047808        1  FALSE
out_table[out_table$region_tag=="11_34",report_cols[c(1,7:8)]]
           genename GO_overlap_silver bystander
1196          GANAB                NA      TRUE
2444           DTX4                NA     FALSE
2453         MS4A6A                NA     FALSE
2455         CCDC86                NA      TRUE
2456         PRPF19                NA      TRUE
2457        TMEM109                NA      TRUE
2480        SLC15A3                NA      TRUE
2481            CD5                NA      TRUE
3676   DKFZP434K028                NA     FALSE
4507          FADS2                NA     FALSE
4508        TMEM258                NA      TRUE
5990        TMEM138                NA      TRUE
5991          FADS1                11     FALSE
5994         INCENP                NA      TRUE
5996          CPSF7                NA      TRUE
5997          MS4A2                NA     FALSE
6902       CYB561A3                NA      TRUE
6903        PPP1R32                NA      TRUE
6904         ASRGL1                NA      TRUE
7662        FAM111A                NA     FALSE
7684          PATL1                NA     FALSE
7687           STX3                NA     FALSE
7688         MRPL16                NA     FALSE
7697          MS4A7                NA     FALSE
7698         MS4A14                NA     FALSE
7874         VPS37C                NA      TRUE
7875           VWCE                NA      TRUE
7876          BEST1                NA      TRUE
7955           FEN1                NA      TRUE
9789        TMEM216                NA      TRUE
9982        FAM111B                NA     FALSE
10267         MPEG1                NA     FALSE
10924        MS4A4E                NA     FALSE
11004         FADS3                NA     FALSE
11812 RP11-794G24.1                NA     FALSE
11817 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] 5

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")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
f34f764 wesleycrouse 2021-11-12
e6dc4d4 wesleycrouse 2021-11-12
#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
3441          POLK       5_45 0.004086774  17.5157647        1  FALSE
5717        IQGAP2       5_45 0.005524107   2.5652287        2  FALSE
6186          POC5       5_45 0.004045695  -7.0119331        1  FALSE
7306          NSA2       5_45 0.002589334  -2.0511430        3  FALSE
7307          GFM2       5_45 0.001320894  -0.4062418        2  FALSE
8340          ENC1       5_45 0.001035365  -0.4000089        1  FALSE
9978       ANKDD1B       5_45 0.004085199  15.0669830        2  FALSE
10458      FAM169A       5_45 0.001100258  -0.9826944        2  FALSE
11757   AC113404.1       5_45 0.001796941   2.3250769        1  FALSE
12287 CTC-366B18.4       5_45 0.049948385 -10.7732063        2  FALSE
2729         PDE8B       5_45 0.001128461   0.4406481        3  FALSE
4313         AP3B1       5_45 0.004176086   1.7055957        1  FALSE
4314         ZBED3       5_45 0.005669082  -1.8752115        1  FALSE
5718         CRHBP       5_45 0.001234934  -0.6287222        2  FALSE
7281         F2RL2       5_45 0.001225424   0.5923159        1  FALSE
7287         F2RL1       5_45 0.011051398   2.2468261        3  FALSE
7288         AGGF1       5_45 0.001164420  -0.5067707        2  FALSE
7289         WDR41       5_45 0.001113334  -0.4097230        1  FALSE
9219           F2R       5_45 0.002030926  -1.2065901        2  FALSE
out_table[out_table$region_tag=="5_45",report_cols[c(1,7:8)]]
          genename GO_overlap_silver bystander
3441          POLK                NA      TRUE
5717        IQGAP2                NA     FALSE
6186          POC5                NA      TRUE
7306          NSA2                NA      TRUE
7307          GFM2                NA      TRUE
8340          ENC1                NA      TRUE
9978       ANKDD1B                NA      TRUE
10458      FAM169A                NA      TRUE
11757   AC113404.1                NA     FALSE
12287 CTC-366B18.4                NA     FALSE
2729         PDE8B                NA     FALSE
4313         AP3B1                NA     FALSE
4314         ZBED3                NA     FALSE
5718         CRHBP                NA     FALSE
7281         F2RL2                NA     FALSE
7287         F2RL1                NA     FALSE
7288         AGGF1                NA     FALSE
7289         WDR41                NA     FALSE
9219           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.1304348 0.4130435 
#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 
0.9963504 0.9233577 
#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 
0.7500000 0.3114754 
#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)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
2483f3e wesleycrouse 2021-11-01
f94fce6 wesleycrouse 2021-11-01
#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)

Version Author Date
9ca0532 wesleycrouse 2022-05-07
e2fa41a wesleycrouse 2022-05-06
#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)

####################

number_detected <- number_detected[names(precision_range)!=">= 0.5"]
precision_range <- precision_range[names(precision_range)!=">= 0.5"]


names(precision_range)[names(precision_range)==">= 0"] <- "All Genes"
names(precision_range)[names(precision_range)==">= 0.8"] <- "cTWAS (PIP > 0.8)"
names(precision_range)[names(precision_range)=="TWAS Bonferroni"] <- "TWAS (Bonf.)"

barplot(precision_range, ylim=c(0,100), main="", xlab="", 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)

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
e2fa41a wesleycrouse 2022-05-06

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 
                         27                          23 
              Nearby SNP(s)        Detected (PIP > 0.8) 
                         11                           6 
      Nearby Bystander Gene Nearby Silver Standard Gene 
                          1                           1 
#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

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
f34f764 wesleycrouse 2021-11-12
e6dc4d4 wesleycrouse 2021-11-12
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

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
91b5513 wesleycrouse 2022-05-07
9ca0532 wesleycrouse 2022-05-07
locus_plot3(focus="KPNB1", region_tag="17_27")

Version Author Date
6b3f6bf wesleycrouse 2022-05-20
3eff970 wesleycrouse 2022-05-12
9ca0532 wesleycrouse 2022-05-07
locus_plot3(focus="LPIN3", region_tag="20_25")

Version Author Date
9ca0532 wesleycrouse 2022-05-07
locus_plot3(focus="LIPC", region_tag="15_26")

Version Author Date
9ca0532 wesleycrouse 2022-05-07

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")]
  print(df)
  plotEnrich(GO_enrichment[[db]])
}
[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)

#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 = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): invalid factor
level, NA generated

Warning in `[<-.factor`(`*tmp*`, ri, value = "ABCG8"): 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
2   <NA> lipid transport (GO:0006869)
3   <NA> lipid transport (GO:0006869)
4   <NA> lipid transport (GO:0006869)
6   <NA>                         <NA>
7   <NA>                         <NA>
8   <NA>                         <NA>
9   <NA>                         <NA>
11  <NA>                         <NA>
12  <NA>                         <NA>
13  <NA>                         <NA>
15  <NA>                         <NA>
16  <NA>                         <NA>
18  <NA>                         <NA>
19  <NA>                         <NA>
21  <NA>                         <NA>
22  <NA>                         <NA>
24  <NA>                         <NA>
26  <NA>                         <NA>
27  <NA>                         <NA>
28  <NA>                         <NA>
30  <NA>                         <NA>
31  <NA>                         <NA>
32  <NA>                         <NA>
33  <NA>                         <NA>
34  <NA>                         <NA>
36  <NA>                         <NA>
37  <NA>                         <NA>
38  <NA>                         <NA>
39  <NA>                         <NA>
40  <NA>                         <NA>
41  <NA>                         <NA>
43  <NA>                         <NA>
44  <NA>                         <NA>
45  <NA>                         <NA>
47  <NA>                         <NA>
48  <NA>                         <NA>
49  <NA>                         <NA>
50  <NA>                         <NA>
51  <NA>                         <NA>
52  <NA>                         <NA>
54  <NA>                         <NA>
55  <NA>                         <NA>
56  <NA>                         <NA>
57  <NA>                         <NA>
58  <NA>                         <NA>
59  <NA>                         <NA>
61  <NA>                         <NA>
62  <NA>                         <NA>
63  <NA>                         <NA>
64  <NA>                         <NA>
67  <NA>                         <NA>
71  <NA>                         <NA>
75  <NA>                         <NA>
76  <NA>                         <NA>
77  <NA>                         <NA>
78  <NA>                         <NA>
79  <NA>                         <NA>
80  <NA>                         <NA>
81  <NA>                         <NA>
82  <NA>                         <NA>
83  <NA>                         <NA>
84  <NA>                         <NA>
85  <NA>                         <NA>
86  <NA>                         <NA>
87  <NA>                         <NA>
88  <NA>                         <NA>
90  <NA>                         <NA>
91  <NA>                         <NA>
92  <NA>                         <NA>
93  <NA>                         <NA>
94  <NA>                         <NA>
96  <NA>                         <NA>
98  <NA>                         <NA>
99  <NA>                         <NA>
100 <NA>                         <NA>
101 <NA>                         <NA>
102 <NA>                         <NA>
104 <NA>                         <NA>
105 <NA>                         <NA>
107 <NA>                         <NA>
108 <NA>                         <NA>
109 <NA>                         <NA>
110 <NA>                         <NA>
111 <NA>                         <NA>
112 <NA>                         <NA>
113 <NA>                         <NA>
114 <NA>                         <NA>
115 <NA>                         <NA>
117 <NA>                         <NA>
118 <NA>                         <NA>
119 <NA>                         <NA>
120 <NA>                         <NA>
121 <NA>                         <NA>
122 <NA>                         <NA>
123 <NA>                         <NA>
124 <NA>                         <NA>
125 <NA>                         <NA>
127 <NA>                         <NA>
128 <NA>                         <NA>
130 <NA>                         <NA>
131 <NA>                         <NA>
132 <NA>                         <NA>
133 <NA>                         <NA>
134 <NA>                         <NA>
135 <NA>                         <NA>
136 <NA>                         <NA>
139 <NA>                         <NA>
140 <NA>                         <NA>
141 <NA>                         <NA>
142 <NA>                         <NA>
144 <NA>                         <NA>
145 <NA>                         <NA>
147 <NA>                         <NA>
148 <NA>                         <NA>
150 <NA>                         <NA>
152 <NA>                         <NA>
153 <NA>                         <NA>
155 <NA>                         <NA>
156 <NA>                         <NA>
157 <NA>                         <NA>
158 <NA>                         <NA>
159 <NA>                         <NA>
160 <NA>                         <NA>
162 <NA>                         <NA>
163 <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")

Version Author Date
9ca0532 wesleycrouse 2022-05-07

False positives by TWAS are frequently due to nearby causal variants, not genes

pip_threshold <- 0.5

false_positives <- ctwas_gene_res$genename[abs(ctwas_gene_res$z)>sig_thresh & ctwas_gene_res$susie_pip<pip_threshold]

df_plot <- data.frame(Outcome=c("SNPs", "Genes", "Both", "Neither"), Frequency=rep(0,4))



for (i in 1:length(false_positives)){
  gene <- false_positives[i]
  region <- ctwas_gene_res$region_tag[ctwas_gene_res$genename==gene]

  gene_pip <- sum(ctwas_gene_res$susie_pip[ctwas_gene_res$region_tag==region]) - ctwas_gene_res$susie_pip[ctwas_gene_res$genename==gene]
  snp_pip <- sum(ctwas_snp_res$susie_pip[ctwas_snp_res$region_tag==region])

  if (gene_pip < 0.5 & snp_pip < 0.5){
    df_plot$Frequency[df_plot$Outcome=="Neither"] <- df_plot$Frequency[df_plot$Outcome=="Neither"] + 1
  } else if (gene_pip >= 0.5 & snp_pip >= 0.5){
    df_plot$Frequency[df_plot$Outcome=="Both"] <- df_plot$Frequency[df_plot$Outcome=="Both"] + 1
  } else if (gene_pip < 0.5 & snp_pip >= 0.5){
    df_plot$Frequency[df_plot$Outcome=="SNPs"] <- df_plot$Frequency[df_plot$Outcome=="SNPs"] + 1
  } else if (gene_pip >= 0.5 & snp_pip < 0.5){
    df_plot$Frequency[df_plot$Outcome=="Genes"] <- df_plot$Frequency[df_plot$Outcome=="Both"] + 1
  }
}

pie <- ggplot(df_plot, 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

Version Author Date
fddd181 wesleycrouse 2022-05-23
91b5513 wesleycrouse 2022-05-07

Updated locus plots

locus_plot_final <- function(region_tag, xlim=NULL, return_table=F, focus=NULL, label_panel="TWAS", label_genes=NULL, label_pos=NULL, plot_eqtl=NULL, draw_gene_track=T, rerun_ctwas=F, rerun_load_only=F){
  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,]
    
    if (!rerun_load_only){
      ctwas::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_bkup <- a         
    a <- as.data.frame(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$genename <- NA
    a$gene_type <- NA

    a[a$type=="gene",c("genename", "gene_type")] <- a_bkup[match(a$id[a$type=="gene"], a_bkup$id),c("genename","gene_type")]
    
    a$z <- NA
    a$z[a$type=="SNP"] <- z_snp_temp$z
    a$z[a$type=="gene"] <- z_gene_temp$z
  }
  
  a_pos_bkup <- a$pos
  a$pos[a$type=="gene"] <- G_list$start_position[match(sapply(a$id[a$type=="gene"], function(x){unlist(strsplit(x, "[.]"))[1]}) ,G_list$ensembl_gene_id)]
  a$pos[is.na(a$pos)] <- a_pos_bkup[is.na(a$pos)]
  a$pos <- a$pos/1000000
  
  if (!is.null(xlim)){
    
    if (is.na(xlim[1])){
      xlim[1] <- min(a$pos)
    }
    
    if (is.na(xlim[2])){
      xlim[2] <- max(a$pos)
    }
    
    a <- a[a$pos>=xlim[1] & a$pos<=xlim[2],,drop=F]
  }
  
  if (is.null(focus)){
    focus <- a$genename[a$z==max(abs(a$z)[a$type=="gene"])]
  }
  
  if (is.null(label_genes)){
    label_genes <- focus
  }
  
  if (is.null(label_pos)){
    label_pos <- rep(3, length(label_genes))
  }
  
  if (is.null(plot_eqtl)){
    plot_eqtl <- focus
  }
  
  focus <- a$id[which(a$genename==focus)]
  a$focus <- 0
  a$focus <- 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")
  
  start <- min(a$pos)
  end <- max(a$pos)
  
  if (draw_gene_track){
    layout(matrix(1:4, ncol = 1), widths = 1, heights = c(1.5,0.25,1.5,0.75), respect = FALSE)
  } else {
    layout(matrix(1:3, ncol = 1), widths = 1, heights = c(1.5,0.25,1.5), respect = FALSE)
  }
  
  par(mar = c(0, 4.1, 0, 2.1))
  
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 21, xlab=paste0("Chromosome ", region_tag1, " position (Mb)"), frame.plot=FALSE, bg = colorsall[1], ylab = "-log10(p value)", panel.first = grid(), ylim =c(0, max(a$PVALUE)*1.1), xaxt = 'n', xlim=c(start, end))
  
  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$focus == 1], a$PVALUE[a$type == "SNP" & a$focus == 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$focus == 1], a$PVALUE[a$type == "gene" & a$focus == 1], pch = 22, bg = "salmon", cex = 2)
  abline(h=-log10(alpha/nrow(ctwas_gene_res)), col ="red", lty = 2)
  
  if (label_panel=="TWAS"){
    for (i in 1:length(label_genes)){
      text(a$pos[a$genename==label_genes[i]], a$PVALUE[a$genename==label_genes[i]], labels=label_genes[i], pos=label_pos[i], cex=0.7)
    }
  }
  
  par(mar = c(0.25, 4.1, 0.25, 2.1))
  
  plot(NA, xlim = c(start, end), ylim = c(0, length(plot_eqtl)), frame.plot = F, axes = F, xlab = NA, ylab = NA)
  
  for (i in 1:length(plot_eqtl)){
    cgene <- a$id[which(a$genename==plot_eqtl[i])]
    load(paste0(results_dir, "/",analysis_id, "_expr_chr", region_tag1, ".exprqc.Rd"))
    eqtls <- rownames(wgtlist[[cgene]])
    eqtl_pos <- a$pos[a$id %in% eqtls]
    
    
    # if (cgene==focus){
    #   col="salmon"
    # } else {
    #   col="grey"
    # }
    
    col="grey"
    
    rect(start, length(plot_eqtl)+1-i-0.8, end, length(plot_eqtl)+1-i-0.2, col = col, border = T, lwd = 1)
  
    if (length(eqtl_pos)>0){
      for (j in 1:length(eqtl_pos)){
        segments(x0=eqtl_pos[j], x1=eqtl_pos[j], y0=length(plot_eqtl)+1-i-0.2, length(plot_eqtl)+1-i-0.8, lwd=1.5)  
      }
    }
  }
  
  text(start, length(plot_eqtl)-(1:length(plot_eqtl))+0.5,  
       labels = plot_eqtl, srt = 0, pos = 2, xpd = TRUE, cex=0.7)
  
  par(mar = c(4.1, 4.1, 0, 2.1))
  
  plot(a$pos[a$type=="SNP"], a$PVALUE[a$type == "SNP"], pch = 19, xlab=paste0("Chromosome ", region_tag1, " position (Mb)"),frame.plot=FALSE, col = "white", ylim= c(0,1.1), ylab = "cTWAS PIP")
  
  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$focus == 1], a$susie_pip[a$type == "SNP" & a$focus == 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$focus == 1], a$susie_pip[a$type == "gene" & a$focus == 1], pch = 22, bg = "salmon", cex = 2)
  
  legend(max(a$pos)-0.2*(max(a$pos)-min(a$pos)), y= 1 ,c("Gene", "SNP","Lead TWAS Gene", "R2 > 0.4", "R2 <= 0.4"), pch = c(22,21,19,19,19), col = c("black", "black", "salmon", "purple", colorsall[1]), cex=0.7, title.adj = 0)
  
  if (label_panel=="cTWAS"){
    for (i in 1:length(label_genes)){
      text(a$pos[a$genename==label_genes[i]], a$susie_pip[a$genename==label_genes[i]], labels=label_genes[i], pos=label_pos[i], cex=0.7)
    }
  }
  
  if (draw_gene_track){
    source("code/trackplot.R")
  
    query_ucsc = TRUE
    build = "hg38"
    col = "gray70"
    txname = NULL
    genename = NULL
    collapse_txs = TRUE
    gene_model = "data/hg38.ensGene.gtf.gz"
    isGTF = T
    
    ##########
    start <- min(a$pos)*1000000
    end <- max(a$pos)*1000000
    chr <- paste0("chr",as.character(unique(a$chrom)))
  
    #collect gene models
    if(is.null(gene_model)){
      if(query_ucsc){
        message("Missing gene model. Trying to query UCSC genome browser..")
        etbl = .extract_geneModel_ucsc(chr, start = start, end = end, refBuild = build, txname = txname, genename = genename)
      } else{
        etbl = NULL
      }
    } else{
      if(isGTF){
        etbl = .parse_gtf(gtf = gene_model, chr = chr, start = start, end = end, txname = txname, genename = genename)  
      } else{
        etbl = .extract_geneModel(ucsc_tbl = gene_model, chr = chr, start = start, end = end, txname = txname, genename = genename)  
      }
    }
    
    #draw gene models
    if(!is.null(etbl)){
      if(collapse_txs){
        etbl = .collapse_tx(etbl)
      }
      
      #subset to protein coding genes in ensembl and lincRNAs included in the analysis
      #etbl <- etbl[names(etbl) %in% G_list$ensembl_gene_id]
      etbl <- etbl[names(etbl) %in% c(G_list$ensembl_gene_id[G_list$gene_biotype=="protein_coding"], sapply(a$id[a$type=="gene"], function(x){unlist(strsplit(x, split="[.]"))[1]}))]
      
      for (i in 1:length(etbl)){
        ensembl_name <- attr(etbl[[i]], "gene")
        gene_name <- G_list$hgnc_symbol[match(ensembl_name, G_list$ensembl_gene_id)]
        if (gene_name==""){
          gene_name <- a$genename[sapply(a$id, function(x){unlist(strsplit(x,split="[.]"))[1]})==ensembl_name]
        }
        if (length(gene_name)>0){
          attr(etbl[[i]], "gene") <- gene_name
        }
        
        attr(etbl[[i]], "imputed") <- ensembl_name %in% sapply(ctwas_gene_res$id, function(x){unlist(strsplit(x, split="[.]"))[1]})
        
      }
      
      par(mar = c(0, 4.1, 0, 2.1))
      
      plot(NA, xlim = c(start, end), ylim = c(0, length(etbl)), frame.plot = FALSE, axes = FALSE, xlab = NA, ylab = NA)
      
      etbl <- etbl[order(-sapply(etbl, function(x){attr(x, "start")}))]
      
      for(tx_id in 1:length(etbl)){
        txtbl = etbl[[tx_id]]
        
        if (attr(txtbl, "imputed")){
          exon_col = "#192a56"
        } else {
          exon_col = "darkred"
        }

        segments(x0 = attr(txtbl, "start"), y0 = tx_id-0.45, x1 = attr(txtbl, "end"), y1 = tx_id-0.45, col = exon_col, lwd = 1)
    
        if(is.na(attr(txtbl, "tx"))){
          text(x = start, y = tx_id-0.45, labels = paste0(attr(txtbl, "gene")), cex = 0.7, adj = 0, srt = 0, pos = 2, xpd = TRUE)
        } else {
          text(x = start, y = tx_id-0.45, labels = paste0(attr(txtbl, "tx"), " [", attr(txtbl, "gene"), "]"), cex = 0.7, adj = 0, srt = 0, pos = 2, xpd = TRUE)
        }
        
        rect(xleft = txtbl[[1]], ybottom = tx_id-0.75, xright = txtbl[[2]], ytop = tx_id-0.25, col = exon_col, border = NA)
        if(attr(txtbl, "strand") == "+"){
          dirat = pretty(x = c(min(txtbl[[1]]), max(txtbl[[2]])))
          dirat[1] = min(txtbl[[1]]) #Avoid drawing arrows outside gene length
          dirat[length(dirat)] = max(txtbl[[2]])
          points(x = dirat, y = rep(tx_id-0.45, length(dirat)), pch = ">", col = exon_col)
        }else{
          dirat = pretty(x = c(min(txtbl[[1]]), max(txtbl[[2]])))
          dirat[1] = min(txtbl[[1]]) #Avoid drawing arrows outside gene length
          dirat[length(dirat)] = max(txtbl[[2]])
          points(x = dirat, y = rep(tx_id-0.45, length(dirat)), pch = "<", col = exon_col)
        }
      }
    }
  }
  
  if (return_table){
    return(a)
  }
}

TNKS

a <- locus_plot_final(region_tag = "8_12", focus="TNKS", label_genes=c("TNKS", "RP11-115J16.2"), label_pos=c(3,4), plot_eqtl=c("TNKS", "RP11-115J16.2"), return_table=T)
Parsing gtf file..
Registered S3 method overwritten by 'R.oo':
  method        from       
  throw.default R.methodsS3
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied

Version Author Date
fddd181 wesleycrouse 2022-05-23
d4b4ae7 wesleycrouse 2022-05-23
403720d wesleycrouse 2022-05-22

POLK

a <- locus_plot_final(region_tag = "5_45", xlim=c(75,76), return_table=T,
                      focus="POLK",
                      label_genes=c("POLK", "POC5", "ANKDD1B", "CTC-366B18.4"),
                      label_pos=c(3,2,1,1),
                      plot_eqtl=c("POLK", "POC5", "ANKDD1B", "CTC-366B18.4"), rerun_ctwas=T)
2022-05-23 19:02:36 INFO::ctwas started ...
2022-05-23 19:03:19 INFO::LD region file: temp_reg.txt
2022-05-23 19:03:19 INFO::No. LD regions: 1
2022-05-23 19:03:20 INFO::No. regions with at least one SNP/gene for chr1: 0
2022-05-23 19:03:20 INFO::No. regions with at least one SNP/gene for chr1 after merging: 0
2022-05-23 19:03:21 INFO::No. regions with at least one SNP/gene for chr2: 0
2022-05-23 19:03:21 INFO::No. regions with at least one SNP/gene for chr2 after merging: 0
2022-05-23 19:03:22 INFO::No. regions with at least one SNP/gene for chr3: 0
2022-05-23 19:03:22 INFO::No. regions with at least one SNP/gene for chr3 after merging: 0
2022-05-23 19:03:23 INFO::No. regions with at least one SNP/gene for chr4: 0
2022-05-23 19:03:23 INFO::No. regions with at least one SNP/gene for chr4 after merging: 0
2022-05-23 19:03:23 INFO::No. regions with at least one SNP/gene for chr5: 1
2022-05-23 19:03:23 INFO::No. regions with at least one SNP/gene for chr5 after merging: 1
2022-05-23 19:03:24 INFO::No. regions with at least one SNP/gene for chr6: 0
2022-05-23 19:03:24 INFO::No. regions with at least one SNP/gene for chr6 after merging: 0
2022-05-23 19:03:25 INFO::No. regions with at least one SNP/gene for chr7: 0
2022-05-23 19:03:25 INFO::No. regions with at least one SNP/gene for chr7 after merging: 0
2022-05-23 19:03:26 INFO::No. regions with at least one SNP/gene for chr8: 0
2022-05-23 19:03:26 INFO::No. regions with at least one SNP/gene for chr8 after merging: 0
2022-05-23 19:03:26 INFO::No. regions with at least one SNP/gene for chr9: 0
2022-05-23 19:03:26 INFO::No. regions with at least one SNP/gene for chr9 after merging: 0
2022-05-23 19:03:27 INFO::No. regions with at least one SNP/gene for chr10: 0
2022-05-23 19:03:27 INFO::No. regions with at least one SNP/gene for chr10 after merging: 0
2022-05-23 19:03:28 INFO::No. regions with at least one SNP/gene for chr11: 0
2022-05-23 19:03:28 INFO::No. regions with at least one SNP/gene for chr11 after merging: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr12: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr12 after merging: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr13: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr13 after merging: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr14: 0
2022-05-23 19:03:29 INFO::No. regions with at least one SNP/gene for chr14 after merging: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr15: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr15 after merging: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr16: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr16 after merging: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr17: 0
2022-05-23 19:03:30 INFO::No. regions with at least one SNP/gene for chr17 after merging: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr18: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr18 after merging: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr19: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr19 after merging: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr20: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr20 after merging: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr21: 0
2022-05-23 19:03:31 INFO::No. regions with at least one SNP/gene for chr21 after merging: 0
2022-05-23 19:03:32 INFO::No. regions with at least one SNP/gene for chr22: 0
2022-05-23 19:03:32 INFO::No. regions with at least one SNP/gene for chr22 after merging: 0
2022-05-23 19:03:32 INFO::Trim regions with SNPs more than Inf
2022-05-23 19:03:32 INFO::Adding R matrix info, as genotype is not given
2022-05-23 19:03:32 INFO::Adding R matrix info for chrom 1
2022-05-23 19:03:32 INFO::Adding R matrix info for chrom 2
2022-05-23 19:03:32 INFO::Adding R matrix info for chrom 3
2022-05-23 19:03:32 INFO::Adding R matrix info for chrom 4
2022-05-23 19:03:32 INFO::Adding R matrix info for chrom 5
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 6
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 7
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 8
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 9
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 10
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 11
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 12
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 13
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 14
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 15
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 16
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 17
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 18
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 19
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 20
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 21
2022-05-23 19:04:14 INFO::Adding R matrix info for chrom 22
2022-05-23 19:04:14 INFO::Run susie for all regions.
2022-05-23 19:04:14 INFO::run iteration 1
2022-05-23 19:06:15 INFO::After iteration 1, gene prior 0.00973624306880938:, SNP prior:0.000174080559942752
Parsing gtf file..
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied

Version Author Date
fddd181 wesleycrouse 2022-05-23
a <- locus_plot_final(region_tag = "5_45", xlim=c(75,76), return_table=T,
                      focus="POLK",
                      label_genes=c("POLK", "ANKDD1B"),
                      label_pos=c(3,1),
                      plot_eqtl=c("POLK", "ANKDD1B"), rerun_ctwas=T, rerun_load_only=T)
Parsing gtf file..
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied

a <- locus_plot_final(region_tag = "5_45", xlim=c(75,76), return_table=T,
                      focus="POLK",
                      label_genes=c("POLK", "ANKDD1B"),
                      label_pos=c(3,4),
                      plot_eqtl=c("POLK", "ANKDD1B"), rerun_ctwas=T, rerun_load_only=T)
Parsing gtf file..
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied

PRKD2

a <- locus_plot_final(region_tag="19_33", xlim=c(NA,46.85), return_table=T,
                      focus="PRKD2",
                      label_genes=c("STRN4","SLC1A5","PRKD2","FKRP","DACT3"),
                      label_pos=c(1,1,3,2,2),
                      plot_eqtl=c("STRN4","SLC1A5","PRKD2","FKRP","DACT3"))
Parsing gtf file..
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied

Version Author Date
fddd181 wesleycrouse 2022-05-23
a <- locus_plot_final(region_tag="19_33", xlim=c(NA,46.85), return_table=T,
                      focus="PRKD2",
                      label_genes=c("PRKD2","FKRP"),
                      label_pos=c(3,2),
                      plot_eqtl=c("PRKD2","FKRP"))
Parsing gtf file..
Collapsing transcripts..
Warning in `[.data.table`(tx_tbl[, `:=`(id, paste0(start, ":", end))], !
duplicated(id), : Ignoring by= because j= is not supplied


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

other attached packages:
 [1] ctwas_0.1.31      forcats_0.4.0     stringr_1.4.0    
 [4] dplyr_1.0.7       purrr_0.3.4       readr_1.4.0      
 [7] tidyr_1.1.0       tidyverse_1.3.0   tibble_3.1.2     
[10] readxl_1.3.1      WebGestaltR_0.4.4 disgenet2r_0.99.2
[13] enrichR_3.0       cowplot_1.1.1     ggplot2_3.3.5    

loaded via a namespace (and not attached):
 [1] fs_1.3.1          lubridate_1.7.4   bit64_4.0.5      
 [4] doParallel_1.0.16 httr_1.4.1        rprojroot_2.0.2  
 [7] tools_3.6.1       backports_1.1.4   doRNG_1.8.2      
[10] utf8_1.2.1        R6_2.5.0          vipor_0.4.5      
[13] DBI_1.1.1         colorspace_1.4-1  withr_2.4.1      
[16] ggrastr_0.2.3     tidyselect_1.1.0  bit_4.0.4        
[19] curl_3.3          compiler_3.6.1    git2r_0.26.1     
[22] cli_3.0.1         rvest_0.3.5       logging_0.10-108 
[25] Cairo_1.5-12.2    xml2_1.3.2        labeling_0.3     
[28] scales_1.1.0      apcluster_1.4.8   digest_0.6.20    
[31] R.utils_2.9.0     rmarkdown_1.13    svglite_1.2.2    
[34] pkgconfig_2.0.3   htmltools_0.3.6   dbplyr_1.4.2     
[37] fastmap_1.1.0     rlang_0.4.11      rstudioapi_0.10  
[40] RSQLite_2.2.7     farver_2.1.0      generics_0.0.2   
[43] jsonlite_1.6      R.oo_1.22.0       magrittr_2.0.1   
[46] Matrix_1.2-18     ggbeeswarm_0.6.0  Rcpp_1.0.6       
[49] munsell_0.5.0     fansi_0.5.0       gdtools_0.1.9    
[52] R.methodsS3_1.7.1 lifecycle_1.0.0   stringi_1.4.3    
[55] whisker_0.3-2     yaml_2.2.0        plyr_1.8.4       
[58] grid_3.6.1        blob_1.2.1        ggrepel_0.9.1    
[61] parallel_3.6.1    promises_1.0.1    crayon_1.4.1     
[64] lattice_0.20-38   haven_2.3.1       hms_1.1.0        
[67] knitr_1.23        pillar_1.6.1      igraph_1.2.4.1   
[70] rjson_0.2.20      rngtools_1.5      reshape2_1.4.3   
[73] codetools_0.2-16  reprex_0.3.0      glue_1.4.2       
[76] evaluate_0.14     data.table_1.14.0 modelr_0.1.8     
[79] vctrs_0.3.8       httpuv_1.5.1      foreach_1.5.1    
[82] cellranger_1.1.0  pgenlibr_0.3.1    gtable_0.3.0     
[85] assertthat_0.2.1  cachem_1.0.5      xfun_0.8         
[88] broom_0.7.9       later_0.8.0       iterators_1.0.13 
[91] beeswarm_0.2.3    memoise_2.0.0     workflowr_1.6.2  
[94] ellipsis_0.3.2