Last updated: 2022-06-18
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 9621c0e. 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: plot_test.R
Untracked: temp.regionlist.RDS
Untracked: temp.regions.txt
Untracked: temp.susieIrss.txt
Untracked: temp.temp.susieIrssres.Rd
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: workspace.RData
Untracked: workspace2.RData
Untracked: workspace3.RData
Untracked: workspace4.RData
Untracked: workspace5.RData
Untracked: workspace6.RData
Untracked: workspace7.RData
Untracked: workspace8.RData
Untracked: z_snp_pos_ebi-a-GCST004131.RData
Untracked: z_snp_pos_ebi-a-GCST004132.RData
Untracked: z_snp_pos_ebi-a-GCST004133.RData
Untracked: z_snp_pos_ukb-d-30780_irnt.RData
Unstaged changes:
Modified: analysis/ukb-d-30780_irnt_Liver_nolnc_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_nolnc_known.Rmd
) and HTML (docs/ukb-d-30780_irnt_Liver_nolnc_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 |
---|---|---|---|---|
html | 9621c0e | wesleycrouse | 2022-06-17 | plots again |
Rmd | 00235c6 | wesleycrouse | 2022-06-17 | plots |
html | 00235c6 | wesleycrouse | 2022-06-17 | plots |
Rmd | 8e7ebf3 | wesleycrouse | 2022-06-17 | working on locus plots |
html | 8e7ebf3 | wesleycrouse | 2022-06-17 | working on locus plots |
Rmd | a147e61 | wesleycrouse | 2022-06-17 | updated tables |
Rmd | 39e5422 | wesleycrouse | 2022-06-14 | summary table for IBDQ |
Rmd | 061cee5 | wesleycrouse | 2022-06-14 | updating LDL locus plots |
html | 061cee5 | wesleycrouse | 2022-06-14 | updating LDL locus plots |
Rmd | 0136d2e | wesleycrouse | 2022-06-10 | reports without lncRNA |
html | 0136d2e | wesleycrouse | 2022-06-10 | reports without lncRNA |
Rmd | 299fa01 | wesleycrouse | 2022-06-03 | adding plots for all detected genes in liver |
html | 299fa01 | wesleycrouse | 2022-06-03 | adding plots for all detected genes in liver |
Rmd | 37b2a2c | wesleycrouse | 2022-05-29 | dropping lncRNAs |
html | 37b2a2c | wesleycrouse | 2022-05-29 | dropping lncRNAs |
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])
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] 9881
#number of imputed weights by chromosome
table(qclist_all$chr)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
988 679 612 373 438 554 501 359 370 397 595 561 163 329 313 480 601 133
19 20 21 22
816 270 92 257
#proportion of imputed weights without missing variants
mean(qclist_all$nmiss==0)
[1] 0.8344297
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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#estimated group prior
estimated_group_prior <- estimated_group_prior_all[,ncol(group_prior_rec)]
print(estimated_group_prior)
gene snp
0.0107025505 0.0001718723
#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
40.619731 9.974189
#estimated enrichment
estimated_enrichment <- estimated_enrichment_all[ncol(group_prior_var_rec)]
print(estimated_enrichment)
[1] 62.27037
#report sample size
print(sample_size)
[1] 343621
#report group size
print(group_size)
[1] 9881 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.01250102 0.04338636
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.02499501 0.33624483
#distribution of PIPs
hist(ctwas_gene_res$susie_pip, xlim=c(0,1), main="Distribution of Gene PIPs")
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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
4433 PSRC1 1_67 1.0000000 1665.51987 4.846968e-03 -41.687336
11327 HPR 16_38 1.0000000 208.67866 6.072931e-04 -17.240252
5561 ABCG8 2_27 0.9999422 311.81584 9.073887e-04 -20.293982
3720 INSIG2 2_69 0.9997803 62.17379 1.808974e-04 -9.364196
5542 CNIH4 1_114 0.9996422 48.18514 1.401774e-04 6.721857
5988 FADS1 11_34 0.9994871 159.67335 4.644404e-04 12.825883
10612 TRIM39 6_24 0.9986727 71.90981 2.089930e-04 8.848422
1999 PRKD2 19_33 0.9963912 32.34148 9.377996e-05 5.289849
7405 ABCA1 9_53 0.9954963 70.08104 2.030301e-04 7.982017
1597 PLTP 20_28 0.9882944 61.32685 1.763832e-04 -5.732491
9365 GAS6 13_62 0.9882298 71.05673 2.043541e-04 -8.923688
8523 TNKS 8_12 0.9844747 73.24908 2.098587e-04 11.026034
7036 INHBB 2_70 0.9823634 73.74261 2.108196e-04 -8.518936
4702 DDX56 7_32 0.9758705 58.50014 1.661382e-04 9.446271
2092 SP4 7_19 0.9755655 101.89697 2.892930e-04 10.693191
6090 CSNK1G3 5_75 0.9742306 83.77427 2.375159e-04 9.116291
6992 ACP6 1_73 0.9725331 25.56527 7.235610e-05 4.648193
6217 PELO 5_31 0.9674928 71.81942 2.022134e-04 8.426917
11257 CYP2A6 19_28 0.9650171 31.83853 8.941458e-05 5.407028
8853 FUT2 19_33 0.9632310 104.20907 2.921166e-04 -11.927107
233 NPC1L1 7_32 0.9616984 89.37061 2.501232e-04 -10.761931
3247 KDSR 18_35 0.9603219 24.58082 6.869632e-05 -4.526287
3562 ACVR1C 2_94 0.9455956 26.22522 7.216804e-05 -4.737778
6774 PKN3 9_66 0.9378574 47.47394 1.295724e-04 -6.620563
6387 TTC39B 9_13 0.9354672 22.88090 6.229051e-05 -4.287139
1114 SRRT 7_62 0.9333933 32.80410 8.910727e-05 5.547715
6953 USP1 1_39 0.8940409 252.56947 6.571410e-04 16.258211
3300 C10orf88 10_77 0.8876146 35.59929 9.195728e-05 -6.634448
9046 KLHDC7A 1_13 0.8395101 22.16088 5.414188e-05 4.124187
8918 CRACR2B 11_1 0.8307262 21.48944 5.195212e-05 -3.989585
9054 SPTY2D1 11_13 0.8249847 33.39049 8.016578e-05 -5.557123
5413 SYTL1 1_19 0.8166110 22.13862 5.261215e-05 -3.962854
8411 POP7 7_62 0.8146972 39.94144 9.469787e-05 -5.845258
6097 ALLC 2_2 0.8129463 27.99536 6.623205e-05 4.919066
3212 CCND2 12_4 0.8045730 22.61893 5.296121e-05 -4.065830
num_eqtl
4433 1
11327 2
5561 1
3720 3
5542 2
5988 2
10612 3
1999 2
7405 1
1597 1
9365 1
8523 2
7036 1
4702 2
2092 1
6090 1
6992 2
6217 2
11257 1
8853 1
233 1
3247 1
3562 2
6774 1
6387 3
1114 2
6953 1
3300 2
9046 1
8918 1
9054 1
5413 1
8411 1
6097 1
3212 1
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#genes with 20 largest effect sizes
head(ctwas_gene_res[order(-ctwas_gene_res$mu2),report_cols],20)
genename region_tag susie_pip mu2 PVE z
4433 PSRC1 1_67 1.000000e+00 1665.5199 4.846968e-03 -41.687336
5434 PSMA5 1_67 9.411618e-03 1206.9631 3.305815e-05 -35.413811
4560 SRPK2 7_65 0.000000e+00 542.1968 0.000000e+00 -1.462246
6966 ATXN7L2 1_67 1.102891e-02 365.1551 1.172007e-05 -19.242744
5561 ABCG8 2_27 9.999422e-01 311.8158 9.073887e-04 -20.293982
781 PVR 19_32 0.000000e+00 294.1122 0.000000e+00 -10.078252
6953 USP1 1_39 8.940409e-01 252.5695 6.571410e-04 16.258211
4315 ANGPTL3 1_39 1.169369e-01 248.3556 8.451734e-05 16.132229
3441 POLK 5_45 4.675801e-03 218.7219 2.976244e-06 17.515765
11327 HPR 16_38 1.000000e+00 208.6787 6.072931e-04 -17.240252
5429 SYPL2 1_67 1.954636e-02 197.5862 1.123939e-05 -14.147875
5375 GEMIN7 19_32 0.000000e+00 192.5889 0.000000e+00 10.943229
5988 FADS1 11_34 9.994871e-01 159.6734 4.644404e-04 12.825883
5238 NLRC5 16_31 9.580707e-02 158.2500 4.412265e-05 11.860211
9948 ANKDD1B 5_45 4.782518e-03 146.4283 2.037990e-06 15.066983
538 ZNF112 19_32 0.000000e+00 145.9980 0.000000e+00 10.386054
7950 FEN1 11_34 7.575672e-03 144.4306 3.184203e-06 12.072635
4505 FADS2 11_34 7.575672e-03 144.4306 3.184203e-06 12.072635
2465 APOA5 11_70 3.601944e-02 144.0485 1.509962e-05 -11.359910
4112 ATG4D 19_9 1.362244e-13 133.8377 5.305833e-17 -9.701891
num_eqtl
4433 1
5434 2
4560 1
6966 2
5561 1
781 2
6953 1
4315 1
3441 1
11327 2
5429 2
5375 2
5988 2
5238 1
9948 2
538 1
7950 1
4505 1
2465 1
4112 1
#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
4433 PSRC1 1_67 1.0000000 1665.51987 0.0048469677 -41.687336
5561 ABCG8 2_27 0.9999422 311.81584 0.0009073887 -20.293982
6953 USP1 1_39 0.8940409 252.56947 0.0006571410 16.258211
11327 HPR 16_38 1.0000000 208.67866 0.0006072931 -17.240252
5988 FADS1 11_34 0.9994871 159.67335 0.0004644404 12.825883
8853 FUT2 19_33 0.9632310 104.20907 0.0002921166 -11.927107
2092 SP4 7_19 0.9755655 101.89697 0.0002892930 10.693191
233 NPC1L1 7_32 0.9616984 89.37061 0.0002501232 -10.761931
6090 CSNK1G3 5_75 0.9742306 83.77427 0.0002375159 9.116291
7036 INHBB 2_70 0.9823634 73.74261 0.0002108196 -8.518936
8523 TNKS 8_12 0.9844747 73.24908 0.0002098587 11.026034
10612 TRIM39 6_24 0.9986727 71.90981 0.0002089930 8.848422
9365 GAS6 13_62 0.9882298 71.05673 0.0002043541 -8.923688
7405 ABCA1 9_53 0.9954963 70.08104 0.0002030301 7.982017
6217 PELO 5_31 0.9674928 71.81942 0.0002022134 8.426917
3720 INSIG2 2_69 0.9997803 62.17379 0.0001808974 -9.364196
1597 PLTP 20_28 0.9882944 61.32685 0.0001763832 -5.732491
4702 DDX56 7_32 0.9758705 58.50014 0.0001661382 9.446271
5542 CNIH4 1_114 0.9996422 48.18514 0.0001401774 6.721857
6774 PKN3 9_66 0.9378574 47.47394 0.0001295724 -6.620563
num_eqtl
4433 1
5561 1
6953 1
11327 2
5988 2
8853 1
2092 1
233 1
6090 1
7036 1
8523 2
10612 3
9365 1
7405 1
6217 2
3720 3
1597 1
4702 2
5542 2
6774 1
#genes with 20 largest z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
genename region_tag susie_pip mu2 PVE z
4433 PSRC1 1_67 1.000000e+00 1665.51987 4.846968e-03 -41.68734
5434 PSMA5 1_67 9.411618e-03 1206.96307 3.305815e-05 -35.41381
5561 ABCG8 2_27 9.999422e-01 311.81584 9.073887e-04 -20.29398
6966 ATXN7L2 1_67 1.102891e-02 365.15507 1.172007e-05 -19.24274
3441 POLK 5_45 4.675801e-03 218.72189 2.976244e-06 17.51576
11327 HPR 16_38 1.000000e+00 208.67866 6.072931e-04 -17.24025
6953 USP1 1_39 8.940409e-01 252.56947 6.571410e-04 16.25821
4315 ANGPTL3 1_39 1.169369e-01 248.35557 8.451734e-05 16.13223
9948 ANKDD1B 5_45 4.782518e-03 146.42833 2.037990e-06 15.06698
5429 SYPL2 1_67 1.954636e-02 197.58621 1.123939e-05 -14.14787
1930 PPP1R37 19_32 0.000000e+00 124.08861 0.000000e+00 -12.89212
5988 FADS1 11_34 9.994871e-01 159.67335 4.644404e-04 12.82588
4505 FADS2 11_34 7.575672e-03 144.43061 3.184203e-06 12.07264
7950 FEN1 11_34 7.575672e-03 144.43061 3.184203e-06 12.07264
4111 YIPF2 19_9 2.861794e-09 127.10364 1.058563e-12 11.94206
8853 FUT2 19_33 9.632310e-01 104.20907 2.921166e-04 -11.92711
5238 NLRC5 16_31 9.580707e-02 158.24999 4.412265e-05 11.86021
1053 APOB 2_13 1.760336e-11 62.33368 3.193293e-15 -11.72589
2465 APOA5 11_70 3.601944e-02 144.04854 1.509962e-05 -11.35991
3873 SMARCA4 19_9 1.879041e-11 52.92021 2.893864e-15 11.14069
num_eqtl
4433 1
5434 2
5561 1
6966 2
3441 1
11327 2
6953 1
4315 1
9948 2
5429 2
1930 2
5988 2
4505 1
7950 1
4111 1
8853 1
5238 1
1053 1
2465 1
3873 2
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#proportion of significant z scores
mean(abs(ctwas_gene_res$z) > sig_thresh)
[1] 0.02115171
#genes with most significant z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
genename region_tag susie_pip mu2 PVE z
4433 PSRC1 1_67 1.000000e+00 1665.51987 4.846968e-03 -41.68734
5434 PSMA5 1_67 9.411618e-03 1206.96307 3.305815e-05 -35.41381
5561 ABCG8 2_27 9.999422e-01 311.81584 9.073887e-04 -20.29398
6966 ATXN7L2 1_67 1.102891e-02 365.15507 1.172007e-05 -19.24274
3441 POLK 5_45 4.675801e-03 218.72189 2.976244e-06 17.51576
11327 HPR 16_38 1.000000e+00 208.67866 6.072931e-04 -17.24025
6953 USP1 1_39 8.940409e-01 252.56947 6.571410e-04 16.25821
4315 ANGPTL3 1_39 1.169369e-01 248.35557 8.451734e-05 16.13223
9948 ANKDD1B 5_45 4.782518e-03 146.42833 2.037990e-06 15.06698
5429 SYPL2 1_67 1.954636e-02 197.58621 1.123939e-05 -14.14787
1930 PPP1R37 19_32 0.000000e+00 124.08861 0.000000e+00 -12.89212
5988 FADS1 11_34 9.994871e-01 159.67335 4.644404e-04 12.82588
4505 FADS2 11_34 7.575672e-03 144.43061 3.184203e-06 12.07264
7950 FEN1 11_34 7.575672e-03 144.43061 3.184203e-06 12.07264
4111 YIPF2 19_9 2.861794e-09 127.10364 1.058563e-12 11.94206
8853 FUT2 19_33 9.632310e-01 104.20907 2.921166e-04 -11.92711
5238 NLRC5 16_31 9.580707e-02 158.24999 4.412265e-05 11.86021
1053 APOB 2_13 1.760336e-11 62.33368 3.193293e-15 -11.72589
2465 APOA5 11_70 3.601944e-02 144.04854 1.509962e-05 -11.35991
3873 SMARCA4 19_9 1.879041e-11 52.92021 2.893864e-15 11.14069
num_eqtl
4433 1
5434 2
5561 1
6966 2
3441 1
11327 2
6953 1
4315 1
9948 2
5429 2
1930 2
5988 2
4505 1
7950 1
4111 1
8853 1
5238 1
1053 1
2465 1
3873 2
#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 286.94798 8.350711e-04
56552 rs6663780 1_121 1.0000000 106.61595 3.102719e-04
68385 rs1042034 2_13 1.0000000 234.08427 6.812281e-04
68391 rs934197 2_13 1.0000000 415.33044 1.208688e-03
70121 rs780093 2_16 1.0000000 161.08154 4.687768e-04
365222 rs12208357 6_103 1.0000000 236.05251 6.869560e-04
401871 rs763798411 7_65 1.0000000 3590.16375 1.044803e-02
752593 rs113408695 17_39 1.0000000 143.73231 4.182873e-04
786009 rs73013176 19_9 1.0000000 237.86682 6.922360e-04
796150 rs62117204 19_32 1.0000000 825.53922 2.402470e-03
796168 rs111794050 19_32 1.0000000 765.09134 2.226556e-03
796201 rs814573 19_32 1.0000000 2209.78000 6.430864e-03
796203 rs113345881 19_32 1.0000000 773.92309 2.252258e-03
796206 rs12721109 19_32 1.0000000 1344.06611 3.911478e-03
1028397 rs964184 11_70 1.0000000 239.74592 6.977045e-04
56551 rs678615 1_121 1.0000000 121.55283 3.537410e-04
752619 rs8070232 17_39 1.0000000 145.49000 4.234025e-04
788819 rs2285626 19_15 1.0000000 247.57657 7.204931e-04
806478 rs34507316 20_13 1.0000000 78.76838 2.292304e-04
68336 rs11679386 2_12 1.0000000 128.40125 3.736711e-04
68394 rs548145 2_13 1.0000000 658.15088 1.915340e-03
68471 rs1848922 2_13 1.0000000 230.23024 6.700121e-04
499867 rs115478735 9_70 1.0000000 303.27403 8.825829e-04
1106367 rs1800961 20_28 1.0000000 71.00463 2.066365e-04
751677 rs1801689 17_38 1.0000000 79.96865 2.327234e-04
795864 rs73036721 19_30 1.0000000 57.55499 1.674956e-04
75799 rs72800939 2_28 1.0000000 55.32218 1.609977e-04
439673 rs4738679 8_45 1.0000000 107.00250 3.113969e-04
786047 rs137992968 19_9 1.0000000 112.96354 3.287446e-04
365406 rs56393506 6_104 1.0000000 94.56176 2.751920e-04
582496 rs4937122 11_77 0.9999999 77.20880 2.246917e-04
14026 rs10888896 1_34 0.9999999 132.03812 3.842551e-04
7471 rs79598313 1_18 0.9999997 46.42290 1.350991e-04
459334 rs13252684 8_83 0.9999992 218.82381 6.368168e-04
438278 rs140753685 8_42 0.9999981 54.48735 1.585679e-04
795909 rs62115478 19_30 0.9999960 180.32127 5.247658e-04
52932 rs2807848 1_112 0.9999942 54.96826 1.599668e-04
788844 rs3794991 19_15 0.9999926 212.42629 6.181948e-04
13985 rs11580527 1_34 0.9999830 87.90005 2.558009e-04
14033 rs471705 1_34 0.9999654 208.18967 6.058491e-04
346659 rs9496567 6_67 0.9999510 38.39385 1.117276e-04
317444 rs11376017 6_13 0.9998673 64.54030 1.877992e-04
786073 rs4804149 19_10 0.9998574 45.49392 1.323768e-04
56507 rs6586405 1_121 0.9998316 48.86383 1.421787e-04
365370 rs117733303 6_104 0.9998040 106.89562 3.110248e-04
806477 rs6075251 20_13 0.9997794 51.83753 1.508234e-04
786033 rs3745677 19_9 0.9997665 89.07621 2.591675e-04
538221 rs17875416 10_71 0.9992143 37.24195 1.082957e-04
786038 rs1569372 19_9 0.9991577 270.57732 7.867663e-04
786126 rs322144 19_10 0.9989897 54.91436 1.596494e-04
602922 rs7397189 12_36 0.9988925 33.53615 9.748824e-05
788803 rs12981966 19_15 0.9988161 91.58113 2.662023e-04
786030 rs147985405 19_9 0.9985028 2253.07632 6.547047e-03
428005 rs1495743 8_20 0.9975590 40.17639 1.166352e-04
788484 rs2302209 19_14 0.9967254 42.29646 1.226874e-04
278851 rs7701166 5_45 0.9961689 32.40538 9.394429e-05
321530 rs454182 6_22 0.9959069 31.82348 9.223309e-05
400801 rs3197597 7_61 0.9953507 32.12899 9.306652e-05
439641 rs56386732 8_45 0.9953404 34.22564 9.913878e-05
811431 rs76981217 20_24 0.9949357 35.11398 1.016706e-04
607288 rs148481241 12_44 0.9920670 27.01601 7.799783e-05
619506 rs653178 12_67 0.9920331 91.78187 2.649741e-04
321967 rs3130253 6_23 0.9892603 28.55381 8.220438e-05
1061496 rs12445804 16_12 0.9888001 33.24784 9.567363e-05
136943 rs709149 3_9 0.9849860 35.52833 1.018416e-04
401882 rs4997569 7_65 0.9845468 3614.52676 1.035638e-02
278792 rs10062361 5_45 0.9845134 200.66961 5.749414e-04
727330 rs4396539 16_37 0.9817509 26.90142 7.685937e-05
143953 rs9834932 3_24 0.9789839 64.97218 1.851072e-04
623595 rs11057830 12_76 0.9786612 25.41999 7.239824e-05
811382 rs6029132 20_24 0.9783469 38.74403 1.103108e-04
811435 rs73124945 20_24 0.9779200 32.09284 9.133387e-05
243404 rs114756490 4_100 0.9653552 25.82239 7.254441e-05
459323 rs79658059 8_83 0.9624570 261.06864 7.312339e-04
563573 rs6591179 11_36 0.9605897 25.88098 7.235008e-05
385033 rs141379002 7_33 0.9587086 25.11247 7.006422e-05
819436 rs62219001 21_2 0.9586942 25.72512 7.177244e-05
220675 rs1458038 4_54 0.9581252 51.34150 1.431565e-04
474581 rs1556516 9_16 0.9546131 71.80180 1.994725e-04
755752 rs4969183 17_44 0.9522692 47.99507 1.330077e-04
588405 rs11048034 12_9 0.9502287 34.89093 9.648527e-05
467386 rs7024888 9_3 0.9445567 25.79678 7.091103e-05
320991 rs75080831 6_19 0.9419955 55.73423 1.527887e-04
321938 rs28986304 6_23 0.9409079 42.12103 1.153364e-04
622460 rs1169300 12_74 0.9406884 66.77571 1.828035e-04
617599 rs1196760 12_63 0.9384395 25.44863 6.950099e-05
68388 rs78610189 2_13 0.9204789 58.47091 1.566296e-04
349395 rs12199109 6_73 0.9197359 24.41968 6.536171e-05
192300 rs5855544 3_120 0.9169182 23.61210 6.300653e-05
423682 rs117037226 8_11 0.9079424 23.67146 6.254658e-05
14016 rs1887552 1_34 0.9064705 330.15072 8.709360e-04
365216 rs9456502 6_103 0.9052669 32.60986 8.591043e-05
194087 rs36205397 4_4 0.8928419 37.54741 9.756069e-05
504817 rs10905277 10_8 0.8903127 27.59226 7.149081e-05
168125 rs189174 3_74 0.8885539 43.13609 1.115436e-04
723438 rs821840 16_31 0.8878515 154.88470 4.001927e-04
537932 rs12244851 10_70 0.8855768 35.72090 9.205957e-05
802123 rs74273659 20_5 0.8853401 24.39863 6.286310e-05
786114 rs322125 19_10 0.8846549 99.08897 2.551053e-04
576213 rs201912654 11_59 0.8681008 39.43582 9.962797e-05
788893 rs12984303 19_15 0.8653188 24.54159 6.180152e-05
814934 rs10641149 20_32 0.8639797 26.86314 6.754304e-05
196312 rs2002574 4_10 0.8616376 24.62082 6.173727e-05
1067484 rs763665 16_38 0.8595535 138.70304 3.469598e-04
119040 rs7569317 2_120 0.8587137 44.34050 1.108075e-04
68188 rs6531234 2_12 0.8549806 41.81365 1.040386e-04
826677 rs2835302 21_17 0.8525894 25.63456 6.360424e-05
799933 rs34003091 19_39 0.8508036 102.09391 2.527839e-04
786083 rs58495388 19_10 0.8494953 33.39436 8.255710e-05
482567 rs11144506 9_35 0.8443547 26.76504 6.576778e-05
811400 rs6102034 20_24 0.8439730 95.51954 2.346071e-04
838765 rs145678077 22_17 0.8424105 24.96982 6.121523e-05
355598 rs9321207 6_86 0.8410268 30.21196 7.394504e-05
582499 rs74612335 11_77 0.8387027 75.30263 1.837970e-04
278815 rs3843482 5_45 0.8346551 392.79571 9.541004e-04
810176 rs11167269 20_21 0.8283799 55.68354 1.342384e-04
934799 rs535137438 5_31 0.8262694 31.19598 7.501371e-05
752604 rs9303012 17_39 0.8106065 136.87257 3.228842e-04
532111 rs10882161 10_59 0.8104541 29.51025 6.960198e-05
806458 rs78348000 20_13 0.8042643 29.88160 6.993956e-05
z
14015 -6.292225
56552 -7.904745
68385 -16.573036
68391 -33.060888
70121 14.142603
365222 -12.282337
401871 -3.272149
752593 -12.768796
786009 16.232742
796150 44.672230
796168 33.599649
796201 -55.537887
796203 34.318568
796206 46.325818
1028397 16.661098
56551 -9.275730
752619 8.091491
788819 18.215134
806478 6.814661
68336 -11.909428
68394 -33.086010
68471 -25.412292
499867 -19.011790
1106367 8.896957
751677 -9.396430
795864 7.787947
75799 7.845728
439673 11.699924
786047 10.752566
365406 -14.088321
582496 -12.147947
14026 -11.893801
7471 -7.024638
459334 -11.964411
438278 -7.799241
795909 14.326186
52932 7.882775
788844 21.492060
13985 11.167216
14033 -16.262997
346659 6.340216
317444 8.507919
786073 -6.519414
56507 -8.960936
365370 -10.097959
806477 2.329832
786033 -9.335807
538221 6.266313
786038 -10.005506
786126 -3.946578
602922 5.770964
788803 -1.822895
786030 48.935175
428005 6.515969
788484 -6.636049
278851 2.484790
321530 -4.779053
400801 5.045242
439641 7.012272
811431 -7.692477
607288 -5.095452
619506 -11.050062
321967 -5.641451
1061496 -5.772374
136943 6.781974
401882 2.984117
278792 -20.320600
727330 5.232860
143953 8.481579
623595 -4.929635
811382 6.762459
811435 7.775426
243404 -4.988910
459323 16.022043
563573 -4.893333
385033 -4.896981
819436 4.948445
220675 7.417851
474581 8.992146
755752 -7.169275
588405 -6.133690
467386 5.055827
320991 7.906709
321938 -7.382502
622460 -8.685477
617599 4.866700
68388 8.385467
349395 -4.857045
192300 4.593724
423682 -4.192202
14016 9.868570
365216 -5.963991
194087 -6.159378
504817 -5.125802
168125 -6.767794
723438 13.475251
537932 4.883085
802123 -4.646762
786114 7.470403
576213 6.305597
788893 -4.516645
814934 -5.075761
196312 4.558284
1067484 11.285714
119040 -7.900653
68188 7.170830
826677 4.653743
799933 10.423688
786083 -5.531347
482567 -5.042667
811400 11.189979
838765 4.868601
355598 -5.401634
582499 -11.904831
278815 -25.034352
810176 7.795037
934799 5.067634
752604 -2.259115
532111 5.475649
806458 -5.220624
#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
401882 rs4997569 7_65 9.845468e-01 3614.527 1.035638e-02
401874 rs10274607 7_65 6.325209e-02 3604.541 6.635064e-04
401877 rs13230660 7_65 1.688853e-01 3601.611 1.770146e-03
401889 rs6952534 7_65 6.446398e-03 3599.702 6.753112e-05
401888 rs4730069 7_65 1.571430e-03 3596.204 1.644597e-05
401871 rs763798411 7_65 1.000000e+00 3590.164 1.044803e-02
401881 rs10242713 7_65 4.310751e-05 3582.761 4.494601e-07
401884 rs10249965 7_65 4.706681e-07 3554.131 4.868200e-09
401896 rs1013016 7_65 0.000000e+00 3399.619 0.000000e+00
401921 rs8180737 7_65 0.000000e+00 3239.401 0.000000e+00
401914 rs17778396 7_65 0.000000e+00 3237.700 0.000000e+00
401915 rs2237621 7_65 0.000000e+00 3236.398 0.000000e+00
401948 rs10224564 7_65 0.000000e+00 3230.279 0.000000e+00
401886 rs71562637 7_65 0.000000e+00 3229.727 0.000000e+00
401933 rs10255779 7_65 0.000000e+00 3229.202 0.000000e+00
401950 rs78132606 7_65 0.000000e+00 3212.939 0.000000e+00
401953 rs4610671 7_65 0.000000e+00 3207.717 0.000000e+00
401955 rs12669532 7_65 0.000000e+00 3077.304 0.000000e+00
401912 rs2237618 7_65 0.000000e+00 3020.338 0.000000e+00
401957 rs118089279 7_65 0.000000e+00 2995.505 0.000000e+00
401944 rs73188303 7_65 0.000000e+00 2987.461 0.000000e+00
401954 rs560364150 7_65 0.000000e+00 2365.113 0.000000e+00
786030 rs147985405 19_9 9.985028e-01 2253.076 6.547047e-03
786025 rs73015020 19_9 8.776130e-04 2241.116 5.723844e-06
786023 rs138175288 19_9 4.130511e-04 2239.319 2.691783e-06
786026 rs77140532 19_9 6.163770e-05 2235.921 4.010728e-07
786024 rs138294113 19_9 1.015721e-04 2235.335 6.607504e-07
786028 rs10412048 19_9 1.268236e-05 2232.638 8.240220e-08
786027 rs112552009 19_9 3.078378e-05 2231.674 1.999278e-07
786022 rs55997232 19_9 1.032052e-08 2212.161 6.644138e-11
796201 rs814573 19_32 1.000000e+00 2209.780 6.430864e-03
401940 rs10261738 7_65 0.000000e+00 1952.112 0.000000e+00
786031 rs17248769 19_9 9.237338e-07 1697.035 4.562027e-09
786032 rs2228671 19_9 6.384010e-07 1685.967 3.132297e-09
796196 rs34878901 19_32 0.000000e+00 1535.402 0.000000e+00
401895 rs368909701 7_65 0.000000e+00 1475.542 0.000000e+00
873762 rs12740374 1_67 5.715194e-04 1453.724 2.417871e-06
873758 rs7528419 1_67 5.738889e-04 1449.705 2.421184e-06
873769 rs646776 1_67 4.879467e-04 1448.424 2.056782e-06
796193 rs8106922 19_32 0.000000e+00 1446.094 0.000000e+00
873768 rs629301 1_67 4.510593e-04 1444.703 1.896411e-06
873780 rs583104 1_67 4.916119e-04 1404.390 2.009234e-06
873783 rs4970836 1_67 4.826291e-04 1401.507 1.968471e-06
873785 rs1277930 1_67 4.929933e-04 1396.840 2.004048e-06
873786 rs599839 1_67 5.081917e-04 1395.916 2.064463e-06
873766 rs3832016 1_67 3.427818e-04 1357.009 1.353695e-06
873763 rs660240 1_67 3.417373e-04 1349.852 1.342452e-06
796206 rs12721109 19_32 1.000000e+00 1344.066 3.911478e-03
873781 rs602633 1_67 3.859416e-04 1328.810 1.492467e-06
796121 rs62120566 19_32 0.000000e+00 1324.002 0.000000e+00
z
401882 2.9841166
401874 2.8669582
401877 2.9479628
401889 2.8884240
401888 2.8658735
401871 -3.2721491
401881 2.8123983
401884 2.8497381
401896 -2.3988524
401921 2.8328454
401914 2.7980012
401915 2.8029605
401948 2.7911904
401886 2.6635936
401933 2.8135791
401950 2.7728082
401953 2.7249742
401955 2.7702573
401912 2.4663255
401957 2.6667208
401944 2.4217031
401954 1.8694582
786030 48.9351750
786025 48.7956295
786023 48.7806894
786026 48.7379874
786024 48.7519286
786028 48.7012269
786027 48.7051628
786022 48.5243103
796201 -55.5378874
401940 2.6665109
786031 40.8424908
786032 40.7026250
796196 -16.3492722
401895 0.7778883
873762 41.7934744
873758 41.7369129
873769 -41.7333995
796193 -15.6770531
873768 -41.6873361
873780 -41.0870961
873783 -41.0454951
873785 -40.9759931
873786 -40.9589874
873766 -40.3959842
873763 -40.2895814
796206 46.3258178
873781 -39.9564086
796121 33.7353904
#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
401871 rs763798411 7_65 1.00000000 3590.16375 0.0104480336
401882 rs4997569 7_65 0.98454680 3614.52676 0.0103563832
786030 rs147985405 19_9 0.99850277 2253.07632 0.0065470473
796201 rs814573 19_32 1.00000000 2209.78000 0.0064308642
796206 rs12721109 19_32 1.00000000 1344.06611 0.0039114784
796150 rs62117204 19_32 1.00000000 825.53922 0.0024024702
796203 rs113345881 19_32 1.00000000 773.92309 0.0022522578
796168 rs111794050 19_32 1.00000000 765.09134 0.0022265558
68394 rs548145 2_13 1.00000000 658.15088 0.0019153395
401877 rs13230660 7_65 0.16888534 3601.61076 0.0017701458
68391 rs934197 2_13 1.00000000 415.33044 0.0012086876
278815 rs3843482 5_45 0.83465505 392.79571 0.0009541004
499867 rs115478735 9_70 1.00000000 303.27403 0.0008825829
14016 rs1887552 1_34 0.90647049 330.15072 0.0008709360
14015 rs2495502 1_34 1.00000000 286.94798 0.0008350711
786038 rs1569372 19_9 0.99915766 270.57732 0.0007867663
459323 rs79658059 8_83 0.96245697 261.06864 0.0007312339
788819 rs2285626 19_15 1.00000000 247.57657 0.0007204931
1028397 rs964184 11_70 1.00000000 239.74592 0.0006977045
786009 rs73013176 19_9 1.00000000 237.86682 0.0006922360
365222 rs12208357 6_103 1.00000000 236.05251 0.0006869560
68385 rs1042034 2_13 1.00000000 234.08427 0.0006812281
68471 rs1848922 2_13 1.00000000 230.23024 0.0006700121
401874 rs10274607 7_65 0.06325209 3604.54102 0.0006635064
459334 rs13252684 8_83 0.99999917 218.82381 0.0006368168
788844 rs3794991 19_15 0.99999261 212.42629 0.0006181948
14033 rs471705 1_34 0.99996540 208.18967 0.0006058491
278792 rs10062361 5_45 0.98451344 200.66961 0.0005749414
795909 rs62115478 19_30 0.99999604 180.32127 0.0005247658
902867 rs6544713 2_27 0.76370020 223.73084 0.0004972434
70121 rs780093 2_16 1.00000000 161.08154 0.0004687768
752619 rs8070232 17_39 1.00000000 145.49000 0.0004234025
365236 rs3818678 6_103 0.75531753 191.74544 0.0004214780
752593 rs113408695 17_39 1.00000000 143.73231 0.0004182873
723438 rs821840 16_31 0.88785149 154.88470 0.0004001927
14026 rs10888896 1_34 0.99999991 132.03812 0.0003842551
68336 rs11679386 2_12 1.00000000 128.40125 0.0003736711
56551 rs678615 1_121 1.00000000 121.55283 0.0003537410
1067484 rs763665 16_38 0.85955352 138.70304 0.0003469598
303694 rs12657266 5_92 0.74973245 153.85722 0.0003356947
1067491 rs77303550 16_38 0.70740437 161.75974 0.0003330109
786047 rs137992968 19_9 0.99999998 112.96354 0.0003287446
752604 rs9303012 17_39 0.81060654 136.87257 0.0003228842
439673 rs4738679 8_45 0.99999998 107.00250 0.0003113969
365370 rs117733303 6_104 0.99980401 106.89562 0.0003110248
56552 rs6663780 1_121 1.00000000 106.61595 0.0003102719
459322 rs2980875 8_83 0.56911540 184.76261 0.0003060094
365406 rs56393506 6_104 0.99999997 94.56176 0.0002751920
788803 rs12981966 19_15 0.99881606 91.58113 0.0002662023
619506 rs653178 12_67 0.99203306 91.78187 0.0002649741
z
401871 -3.272149
401882 2.984117
786030 48.935175
796201 -55.537887
796206 46.325818
796150 44.672230
796203 34.318568
796168 33.599649
68394 -33.086010
401877 2.947963
68391 -33.060888
278815 -25.034352
499867 -19.011790
14016 9.868570
14015 -6.292225
786038 -10.005506
459323 16.022043
788819 18.215134
1028397 16.661098
786009 16.232742
365222 -12.282337
68385 -16.573036
68471 -25.412292
401874 2.866958
459334 -11.964411
788844 21.492060
14033 -16.262997
278792 -20.320600
795909 14.326186
902867 20.377651
70121 14.142603
752619 8.091491
365236 9.947776
752593 -12.768796
723438 13.475251
14026 -11.893801
68336 -11.909428
56551 -9.275730
1067484 11.285714
303694 -13.894754
1067491 13.732910
786047 10.752566
752604 -2.259115
439673 11.699924
365370 -10.097959
56552 -7.904745
459322 22.102229
365406 -14.088321
788803 -1.822895
619506 -11.050062
#histogram of (abs) SNP z scores
hist(abs(ctwas_snp_res$z))
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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
796201 rs814573 19_32 1.000000e+00 2209.7800 6.430864e-03
786030 rs147985405 19_9 9.985028e-01 2253.0763 6.547047e-03
786025 rs73015020 19_9 8.776130e-04 2241.1165 5.723844e-06
786023 rs138175288 19_9 4.130511e-04 2239.3190 2.691783e-06
786024 rs138294113 19_9 1.015721e-04 2235.3352 6.607504e-07
786026 rs77140532 19_9 6.163770e-05 2235.9215 4.010728e-07
786027 rs112552009 19_9 3.078378e-05 2231.6743 1.999278e-07
786028 rs10412048 19_9 1.268236e-05 2232.6384 8.240220e-08
786022 rs55997232 19_9 1.032052e-08 2212.1609 6.644138e-11
796206 rs12721109 19_32 1.000000e+00 1344.0661 3.911478e-03
796150 rs62117204 19_32 1.000000e+00 825.5392 2.402470e-03
796137 rs1551891 19_32 0.000000e+00 504.0960 0.000000e+00
873762 rs12740374 1_67 5.715194e-04 1453.7238 2.417871e-06
873758 rs7528419 1_67 5.738889e-04 1449.7052 2.421184e-06
873769 rs646776 1_67 4.879467e-04 1448.4237 2.056782e-06
873768 rs629301 1_67 4.510593e-04 1444.7028 1.896411e-06
873780 rs583104 1_67 4.916119e-04 1404.3904 2.009234e-06
873783 rs4970836 1_67 4.826291e-04 1401.5068 1.968471e-06
873785 rs1277930 1_67 4.929933e-04 1396.8404 2.004048e-06
873786 rs599839 1_67 5.081917e-04 1395.9161 2.064463e-06
786031 rs17248769 19_9 9.237338e-07 1697.0346 4.562027e-09
786032 rs2228671 19_9 6.384010e-07 1685.9670 3.132297e-09
873766 rs3832016 1_67 3.427818e-04 1357.0093 1.353695e-06
873763 rs660240 1_67 3.417373e-04 1349.8516 1.342452e-06
873781 rs602633 1_67 3.859416e-04 1328.8097 1.492467e-06
786021 rs9305020 19_9 4.107825e-14 1283.2110 1.534018e-16
796197 rs405509 19_32 0.000000e+00 976.7021 0.000000e+00
873749 rs4970834 1_67 7.924455e-04 1004.5286 2.316605e-06
796203 rs113345881 19_32 1.000000e+00 773.9231 2.252258e-03
796121 rs62120566 19_32 0.000000e+00 1324.0021 0.000000e+00
796168 rs111794050 19_32 1.000000e+00 765.0913 2.226556e-03
68394 rs548145 2_13 1.000000e+00 658.1509 1.915340e-03
796174 rs4802238 19_32 0.000000e+00 978.0785 0.000000e+00
68391 rs934197 2_13 1.000000e+00 415.3304 1.208688e-03
796115 rs188099946 19_32 0.000000e+00 1269.1443 0.000000e+00
796185 rs2972559 19_32 0.000000e+00 1300.6983 0.000000e+00
796109 rs201314191 19_32 0.000000e+00 1177.0284 0.000000e+00
873770 rs3902354 1_67 3.925383e-04 857.2104 9.792414e-07
873759 rs11102967 1_67 3.937012e-04 853.5963 9.780015e-07
873784 rs4970837 1_67 4.554832e-04 850.2094 1.126986e-06
796176 rs56394238 19_32 0.000000e+00 969.5494 0.000000e+00
796153 rs2965169 19_32 0.000000e+00 366.0566 0.000000e+00
796177 rs3021439 19_32 0.000000e+00 864.6665 0.000000e+00
873754 rs611917 1_67 3.712557e-04 804.3661 8.690549e-07
68421 rs12997242 2_13 4.916301e-11 383.7928 5.491053e-14
796184 rs12162222 19_32 0.000000e+00 1114.4719 0.000000e+00
68395 rs478588 2_13 1.290884e-10 606.1183 2.277010e-13
796114 rs62119327 19_32 0.000000e+00 1036.8444 0.000000e+00
68396 rs56350433 2_13 5.337064e-12 351.1642 5.454224e-15
68401 rs56079819 2_13 5.347722e-12 350.3647 5.452674e-15
z
796201 -55.53789
786030 48.93517
786025 48.79563
786023 48.78069
786024 48.75193
786026 48.73799
786027 48.70516
786028 48.70123
786022 48.52431
796206 46.32582
796150 44.67223
796137 42.26680
873762 41.79347
873758 41.73691
873769 -41.73340
873768 -41.68734
873780 -41.08710
873783 -41.04550
873785 -40.97599
873786 -40.95899
786031 40.84249
786032 40.70262
873766 -40.39598
873763 -40.28958
873781 -39.95641
786021 34.84073
796197 34.63979
873749 34.62492
796203 34.31857
796121 33.73539
796168 33.59965
68394 -33.08601
796174 -33.07569
68391 -33.06089
796115 33.04407
796185 -32.28660
796109 32.06858
873770 -32.00383
873759 -31.93893
873784 -31.85593
796176 -31.55187
796153 31.38057
796177 -31.04506
873754 30.97527
68421 -30.81528
796184 -30.49671
68395 -30.48811
796114 30.41868
68396 -30.23229
68401 -30.19307
#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] 35
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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
Term
1 peptidyl-serine phosphorylation (GO:0018105)
2 peptidyl-serine modification (GO:0018209)
3 lipid transport (GO:0006869)
4 cholesterol transport (GO:0030301)
5 intestinal cholesterol absorption (GO:0030299)
6 cellular response to sterol depletion (GO:0071501)
7 negative regulation of cholesterol storage (GO:0010887)
8 intestinal lipid absorption (GO:0098856)
9 protein phosphorylation (GO:0006468)
10 cholesterol homeostasis (GO:0042632)
11 sterol homeostasis (GO:0055092)
12 cholesterol metabolic process (GO:0008203)
13 regulation of cholesterol storage (GO:0010885)
14 positive regulation of cyclin-dependent protein serine/threonine kinase activity (GO:0045737)
15 activin receptor signaling pathway (GO:0032924)
16 positive regulation of cyclin-dependent protein kinase activity (GO:1904031)
17 negative regulation of lipid storage (GO:0010888)
18 sterol transport (GO:0015918)
19 cholesterol efflux (GO:0033344)
20 regulation of DNA biosynthetic process (GO:2000278)
21 regulation of cholesterol efflux (GO:0010874)
22 secondary alcohol biosynthetic process (GO:1902653)
23 cholesterol biosynthetic process (GO:0006695)
24 organic substance transport (GO:0071702)
25 cellular protein modification process (GO:0006464)
26 sterol biosynthetic process (GO:0016126)
Overlap Adjusted.P.value Genes
1 5/156 0.002452825 CSNK1G3;TNKS;PKN3;PRKD2;GAS6
2 5/169 0.002452825 CSNK1G3;TNKS;PKN3;PRKD2;GAS6
3 4/109 0.005844710 ABCA1;ABCG8;NPC1L1;PLTP
4 3/51 0.008094936 ABCA1;ABCG8;NPC1L1
5 2/9 0.008094936 ABCG8;NPC1L1
6 2/9 0.008094936 INSIG2;NPC1L1
7 2/10 0.008663628 ABCA1;TTC39B
8 2/11 0.009255099 ABCG8;NPC1L1
9 6/496 0.010094391 CSNK1G3;ACVR1C;TNKS;PKN3;PRKD2;GAS6
10 3/71 0.011198147 ABCA1;ABCG8;TTC39B
11 3/72 0.011198147 ABCA1;ABCG8;TTC39B
12 3/77 0.012358375 ABCA1;INSIG2;NPC1L1
13 2/16 0.012358375 ABCA1;TTC39B
14 2/17 0.012991443 CCND2;PSRC1
15 2/19 0.014897741 ACVR1C;INHBB
16 2/20 0.014897741 CCND2;PSRC1
17 2/20 0.014897741 ABCA1;TTC39B
18 2/21 0.015534085 ABCG8;NPC1L1
19 2/24 0.019278087 ABCA1;ABCG8
20 2/29 0.026792989 TNKS;PRKD2
21 2/33 0.031663312 PLTP;TTC39B
22 2/34 0.031663312 INSIG2;NPC1L1
23 2/35 0.031663312 INSIG2;NPC1L1
24 3/136 0.031663312 ABCA1;ABCG8;PLTP
25 7/1025 0.031663312 CSNK1G3;ACVR1C;TNKS;PKN3;PRKD2;FUT2;GAS6
26 2/38 0.035336186 INSIG2;NPC1L1
[1] "GO_Cellular_Component_2021"
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
Term Overlap
1 high-density lipoprotein particle (GO:0034364) 2/19
2 endoplasmic reticulum membrane (GO:0005789) 6/712
3 serine/threonine protein kinase complex (GO:1902554) 2/37
Adjusted.P.value Genes
1 0.02246907 HPR;PLTP
2 0.02859981 ABCA1;CYP2A6;INSIG2;KDSR;FADS1;CNIH4
3 0.02859981 ACVR1C;CCND2
[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.0002099901 ABCA1;ABCG8;PLTP
2 0.0002099901 ABCA1;ABCG8;PLTP
3 0.0134173287 ABCA1;PLTP
NPC1L1 gene(s) from the input list not found in DisGeNET CURATEDUSP1 gene(s) from the input list not found in DisGeNET CURATEDTNKS gene(s) from the input list not found in DisGeNET CURATEDHPR gene(s) from the input list not found in DisGeNET CURATEDPELO gene(s) from the input list not found in DisGeNET CURATEDPOP7 gene(s) from the input list not found in DisGeNET CURATEDTTC39B gene(s) from the input list not found in DisGeNET CURATEDC10orf88 gene(s) from the input list not found in DisGeNET CURATEDTRIM39 gene(s) from the input list not found in DisGeNET CURATEDACP6 gene(s) from the input list not found in DisGeNET CURATEDCRACR2B gene(s) from the input list not found in DisGeNET CURATEDSPTY2D1 gene(s) from the input list not found in DisGeNET CURATEDPSRC1 gene(s) from the input list not found in DisGeNET CURATEDSYTL1 gene(s) from the input list not found in DisGeNET CURATEDDDX56 gene(s) from the input list not found in DisGeNET CURATEDALLC gene(s) from the input list not found in DisGeNET CURATEDCSNK1G3 gene(s) from the input list not found in DisGeNET CURATEDCNIH4 gene(s) from the input list not found in DisGeNET CURATEDPKN3 gene(s) from the input list not found in DisGeNET CURATED
Description FDR Ratio BgRatio
5 Blood Platelet Disorders 0.0148423 2/16 16/9703
12 Colorectal Neoplasms 0.0148423 4/16 277/9703
30 Hypercholesterolemia, Familial 0.0148423 2/16 18/9703
46 Opisthorchiasis 0.0148423 1/16 1/9703
53 Tangier Disease 0.0148423 1/16 1/9703
69 Caliciviridae Infections 0.0148423 1/16 1/9703
75 Infections, Calicivirus 0.0148423 1/16 1/9703
92 Opisthorchis felineus Infection 0.0148423 1/16 1/9703
93 Opisthorchis viverrini Infection 0.0148423 1/16 1/9703
104 Hypoalphalipoproteinemias 0.0148423 1/16 1/9703
******************************************
* *
* Welcome to WebGestaltR ! *
* *
******************************************
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
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 4.522035e-07 disease_GLAD4U
2 Dyslipidaemia 84 8 9.473591e-07 disease_GLAD4U
3 Coronary Disease 171 9 9.649467e-06 disease_GLAD4U
4 Arteriosclerosis 173 8 1.446192e-04 disease_GLAD4U
5 Myocardial Ischemia 180 8 1.569571e-04 disease_GLAD4U
6 Hypercholesterolemia 60 5 1.230632e-03 disease_GLAD4U
7 Arterial Occlusive Diseases 174 7 1.314713e-03 disease_GLAD4U
8 Heart Diseases 227 7 6.580586e-03 disease_GLAD4U
9 Cardiovascular Diseases 281 7 2.095676e-02 disease_GLAD4U
10 Fat digestion and absorption 23 3 2.095676e-02 pathway_KEGG
11 Hyperlipidemias 64 4 2.208182e-02 disease_GLAD4U
12 Cholesterol metabolism 31 3 4.337406e-02 pathway_KEGG
13 Vascular Diseases 233 6 4.508633e-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 ABCG8;INSIG2;NPC1L1;ABCA1;PLTP
7 PSRC1;ABCG8;NPC1L1;TTC39B;ABCA1;FADS1;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 ABCG8;ABCA1;PLTP
13 PSRC1;ABCG8;NPC1L1;ABCA1;GAS6;PLTP
library("readxl")
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
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.562276
#number of ctwas genes
length(ctwas_genes)
[1] 35
#number of TWAS genes
length(twas_genes)
[1] 209
#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
9046 KLHDC7A 1_13 0.8395101 22.16088 5.414188e-05 4.124187
5413 SYTL1 1_19 0.8166110 22.13862 5.261215e-05 -3.962854
6387 TTC39B 9_13 0.9354672 22.88090 6.229051e-05 -4.287139
8918 CRACR2B 11_1 0.8307262 21.48944 5.195212e-05 -3.989585
3212 CCND2 12_4 0.8045730 22.61893 5.296121e-05 -4.065830
3247 KDSR 18_35 0.9603219 24.58082 6.869632e-05 -4.526287
num_eqtl
9046 1
5413 1
6387 3
8918 1
3212 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.9970513 0.9806812
#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.17142857 0.09090909
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
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] 539
#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.562276
#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] 60
#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.9962894 0.9239332
#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.3166667
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
library(tibble)
library(tidyverse)
── Attaching packages ────────────────────────────────── tidyverse 1.3.0 ──
✔ tidyr 1.1.0 ✔ dplyr 1.0.9
✔ 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: 12 unlabeled data points (too many overlaps). Consider
increasing max.overlaps
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
#####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", "strand"), 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"),]
G_list$tss <- G_list[,c("end_position", "start_position")][cbind(1:nrow(G_list),G_list$strand/2+1.5)]
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_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_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_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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
a[a$type=="gene",c("genename", "r2max", "susie_pip")]
genename r2max susie_pip
8523 TNKS 1 0.9844747
locus_plot6("19_33", label="TWAS", xlim=c(NA,46.85))
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
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 |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ITIH4"
[1] "3_36"
genename region_tag susie_pip mu2 PVE z
2847 RRP9 3_36 0.010229666 8.003397 2.382627e-07 -0.9533837
374 PARP3 3_36 0.010116980 7.897124 2.325092e-07 0.9395160
11145 ACY1 3_36 0.008123877 5.879794 1.390099e-07 -0.5115172
7239 POC1A 3_36 0.007613147 5.419844 1.200802e-07 0.6100943
11175 TWF2 3_36 0.011937882 10.222198 3.551337e-07 -1.4613887
7240 PPM1M 3_36 0.009371912 7.047848 1.922229e-07 -1.0722712
7910 GLYCTK 3_36 0.023802793 14.326546 9.924068e-07 -1.6364989
7242 WDR82 3_36 0.007939398 5.636058 1.302217e-07 -0.3708077
2853 DNAH1 3_36 0.026104730 17.576064 1.335246e-06 2.8547462
158 PHF7 3_36 0.012328912 9.485712 3.403416e-07 1.0713405
159 SEMA3G 3_36 0.012440537 9.180900 3.323875e-07 -0.4278002
2856 TNNC1 3_36 0.083853407 20.525792 5.008884e-06 -3.4591550
160 NISCH 3_36 0.007402376 5.070165 1.092229e-07 0.2448166
161 STAB1 3_36 0.100608902 21.483627 6.290198e-06 3.5822738
7913 NT5DC2 3_36 0.007418848 5.126980 1.106925e-07 -0.5772516
7198 GNL3 3_36 0.090131351 23.652502 6.204021e-06 -3.6426177
7199 PBRM1 3_36 0.009869192 6.926502 1.989371e-07 -0.8048656
239 GLT8D1 3_36 0.028586572 17.151877 1.426902e-06 2.5357598
2861 NEK4 3_36 0.033369098 18.387670 1.785630e-06 -2.8779547
482 ITIH1 3_36 0.087985322 27.488773 7.038593e-06 3.3942500
6908 ITIH3 3_36 0.125735562 30.937964 1.132062e-05 3.5156979
481 ITIH4 3_36 0.008194962 6.643605 1.584423e-07 0.8376918
11408 MUSTN1 3_36 0.010591578 8.862323 2.731672e-07 2.0802688
10774 TMEM110 3_36 0.008620387 6.903693 1.731923e-07 1.5371064
7197 SFMBT1 3_36 0.011365101 9.736936 3.220445e-07 2.0068207
7196 PRKCD 3_36 0.008294740 6.189174 1.494018e-07 -0.6434864
7195 TKT 3_36 0.019494115 13.479337 7.647022e-07 2.5841158
11411 DCP1A 3_36 0.008620793 6.470276 1.623268e-07 0.5186961
236 CHDH 3_36 0.007459156 5.054396 1.097184e-07 0.1444517
486 IL17RB 3_36 0.007671906 5.285422 1.180058e-07 0.1956411
2783 ACTR8 3_36 0.007672786 5.251434 1.172604e-07 0.3348511
num_eqtl
2847 1
374 1
11145 1
7239 1
11175 2
7240 3
7910 1
7242 1
2853 2
158 1
159 1
2856 2
160 2
161 1
7913 2
7198 2
7199 1
239 2
2861 1
482 1
6908 1
481 3
11408 2
10774 2
7197 1
7196 1
7195 1
11411 2
236 1
486 2
2783 3
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "EPHX2"
[1] "8_27"
genename region_tag susie_pip mu2 PVE z
11070 PNMA2 8_27 0.007210084 4.935170 1.035530e-07 -0.21331428
1295 DPYSL2 8_27 0.007172225 4.883640 1.019337e-07 0.04738342
3371 ADRA1A 8_27 0.010304187 8.432238 2.528581e-07 -0.92728371
1869 TRIM35 8_27 0.017641548 13.709077 7.038258e-07 1.42379941
3374 EPHX2 8_27 0.007538279 5.370896 1.178255e-07 -0.24570047
3368 CLU 8_27 0.008760255 6.841913 1.744274e-07 0.59866869
7888 SCARA3 8_27 0.022911050 16.280816 1.085529e-06 -1.50201507
8297 ESCO2 8_27 0.011916698 9.857557 3.418578e-07 1.06980762
5835 CCDC25 8_27 0.014345244 11.677352 4.874977e-07 1.25261686
7889 PBK 8_27 0.007929879 5.866705 1.353883e-07 0.48335074
7890 SCARA5 8_27 0.007169718 4.880217 1.018266e-07 -0.01387977
9968 NUGGC 8_27 0.042577696 22.407873 2.776535e-06 2.06999161
num_eqtl
11070 1
1295 1
3371 2
1869 2
3374 2
3368 1
7888 2
8297 2
5835 1
7889 1
7890 1
9968 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ABCA1"
[1] "9_53"
genename region_tag susie_pip mu2 PVE z
7405 ABCA1 9_53 0.995496291 70.081041 2.030301e-04 7.9820172
2193 FKTN 9_53 0.001400037 7.313187 2.979658e-08 -0.7642857
1314 TMEM38B 9_53 0.002228321 7.821111 5.071851e-08 0.7019380
num_eqtl
7405 1
2193 1
1314 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LPL"
[1] "8_21"
genename region_tag susie_pip mu2 PVE z
5833 CSGALNACT1 8_21 0.008611592 5.812751 1.456751e-07 -0.8624862
1906 INTS10 8_21 0.011527565 7.749697 2.599816e-07 -0.5466864
8730 LPL 8_21 0.026841378 16.800989 1.312381e-06 -1.8179375
num_eqtl
5833 1
1906 1
8730 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "APOA5"
[1] "11_70"
genename region_tag susie_pip mu2 PVE z
4866 BUD13 11_70 0.006681419 36.754149 7.146532e-07 4.11527976
3154 APOA1 11_70 0.004996811 6.626497 9.636009e-08 1.11150616
7893 PAFAH1B2 11_70 0.006429363 7.711100 1.442795e-07 -0.01722766
6002 SIDT2 11_70 0.004840711 5.458052 7.688951e-08 0.50104522
6003 TAGLN 11_70 0.005384250 18.435519 2.888690e-07 -1.55444774
6781 PCSK7 11_70 0.014893056 16.372939 7.096280e-07 0.97935688
7740 RNF214 11_70 0.005593633 6.558001 1.067544e-07 -0.52468931
2466 CEP164 11_70 0.005455634 5.753583 9.134903e-08 -0.30209785
9693 BACE1 11_70 0.005233417 20.995015 3.197583e-07 -4.13706265
4879 FXYD2 11_70 0.005474808 6.112959 9.739590e-08 -0.37435241
2465 APOA5 11_70 0.036019439 144.048541 1.509962e-05 -11.35991043
num_eqtl
4866 1
3154 2
7893 2
6002 1
6003 1
6781 1
7740 1
2466 2
9693 1
4879 2
2465 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "MTTP"
[1] "4_66"
genename region_tag susie_pip mu2 PVE z
7975 TSPAN5 4_66 0.016776397 11.125746 5.431855e-07 -1.2321573
6088 EIF4E 4_66 0.010897316 6.926124 2.196494e-07 0.9082871
7217 METAP1 4_66 0.008980055 5.083853 1.328594e-07 -0.1831346
8489 ADH6 4_66 0.011444259 7.558809 2.517453e-07 0.7334699
10084 ADH1B 4_66 0.016886902 11.259415 5.533324e-07 -1.1153042
11178 ADH1C 4_66 0.157537466 31.867251 1.460995e-05 -3.1932254
10026 ADH7 4_66 0.010627336 10.487409 3.243493e-07 1.9684512
5053 MTTP 4_66 0.012587091 7.995964 2.928981e-07 -0.7972018
5684 TRMT10A 4_66 0.013138101 9.083605 3.473051e-07 -1.1240076
num_eqtl
7975 2
6088 1
7217 1
8489 2
10084 1
11178 3
10026 2
5053 1
5684 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "DHCR7"
[1] "11_40"
genename region_tag susie_pip mu2 PVE
8480 DHCR7 11_40 0.02034638 6.089805 3.605877e-07
8479 NADSYN1 11_40 0.02117255 6.481546 3.993670e-07
11157 KRTAP5-7 11_40 0.06541827 17.670192 3.364036e-06
11244 KRTAP5-9 11_40 0.01956919 5.706607 3.249908e-07
10606 KRTAP5-10 11_40 0.02822882 9.316914 7.653940e-07
6609 FAM86C1 11_40 0.02081331 6.313096 3.823876e-07
11233 RP11-849H4.2 11_40 0.01838102 5.090569 2.723054e-07
4857 RNF121 11_40 0.09418928 21.347931 5.851640e-06
4849 IL18BP 11_40 0.01799468 4.881721 2.556451e-07
4850 NUMA1 11_40 0.01930697 5.573909 3.131802e-07
9465 LRTOMT 11_40 0.01997651 5.909283 3.435379e-07
2462 FOLR3 11_40 0.01985300 5.848262 3.378883e-07
7448 INPPL1 11_40 0.01802148 4.896349 2.567929e-07
6896 CLPB 11_40 0.02589232 8.464376 6.378025e-07
z num_eqtl
8480 0.65130261 1
8479 0.72652201 1
11157 2.05073754 1
11244 0.41678412 1
10606 -1.13422621 2
6609 0.45043836 1
11233 -0.32070634 1
4857 2.08692398 2
4849 -0.10323637 2
4850 0.44145029 1
9465 -0.65197454 1
2462 -0.63775295 1
7448 0.05040952 1
6896 1.03637029 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LIPA"
[1] "10_57"
genename region_tag susie_pip mu2 PVE z
3295 IFIT2 10_57 0.01244485 6.772284 2.452704e-07 -0.6053359
3294 IFIT3 10_57 0.01072851 5.317163 1.660121e-07 -0.3100521
9629 IFIT1 10_57 0.02584894 13.959459 1.050103e-06 1.4103375
2253 LIPA 10_57 0.01659488 9.597399 4.634980e-07 1.0134814
6224 IFIT5 10_57 0.01049978 5.105953 1.560190e-07 0.2173750
6225 PANK1 10_57 0.01735553 10.037836 5.069887e-07 -1.6480922
4958 KIF20B 10_57 0.01516732 8.713891 3.846284e-07 -1.5022578
10517 IFIT1B 10_57 0.01224748 6.615500 2.357923e-07 -0.6164140
num_eqtl
3295 1
3294 1
9629 2
2253 1
6224 3
6225 1
4958 1
10517 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LDLRAP1"
[1] "1_18"
genename region_tag susie_pip mu2 PVE z
3127 SYF2 1_18 0.008689115 6.648315 1.681154e-07 0.7426202
9755 RHD 1_18 0.007988959 43.718578 1.016428e-06 -6.4603360
9428 TMEM50A 1_18 0.073457312 97.081812 2.075359e-05 10.0815103
9910 RHCE 1_18 0.008582534 64.364405 1.607613e-06 8.1134433
10536 TMEM57 1_18 0.373212450 100.396527 1.090423e-04 -10.2641908
6567 LDLRAP1 1_18 0.008755669 8.877498 2.262040e-07 1.9336337
3130 MAN1C1 1_18 0.008026599 6.032830 1.409201e-07 -1.0646970
6929 SELENON 1_18 0.035337906 19.813337 2.037599e-06 -2.1819486
3129 MTFR1L 1_18 0.014809766 12.539373 5.404361e-07 2.2702594
8691 PDIK1L 1_18 0.041247787 23.240518 2.789760e-06 3.2275633
10174 FAM110D 1_18 0.008579484 6.242879 1.558714e-07 0.6465781
5404 CNKSR1 1_18 0.014526947 12.381267 5.234314e-07 2.3608913
4098 CEP85 1_18 0.015735135 14.783921 6.769871e-07 2.3661103
5403 SH3BGRL3 1_18 0.025771966 18.358029 1.376873e-06 -2.8355236
8060 CD52 1_18 0.018218346 13.627790 7.225280e-07 -1.2648216
6577 UBXN11 1_18 0.018218346 13.627790 7.225280e-07 -1.2648216
8786 AIM1L 1_18 0.007896751 5.498030 1.263502e-07 0.4474766
8784 ZNF683 1_18 0.007625848 5.392038 1.196634e-07 0.5504045
3133 DHDDS 1_18 0.012358623 13.462758 4.841996e-07 2.6796586
10437 HMGN2 1_18 0.007801407 5.588789 1.268852e-07 0.5156134
3132 RPS6KA1 1_18 0.007542194 5.209533 1.143449e-07 0.3917090
525 PIGV 1_18 0.008400965 10.993131 2.687639e-07 -2.2722478
10532 ZDHHC18 1_18 0.007940446 8.641716 1.996941e-07 1.8553085
5412 GPN2 1_18 0.009823503 13.691948 3.914281e-07 2.5894296
11214 TRNP1 1_18 0.039111311 19.123130 2.176615e-06 1.1357927
num_eqtl
3127 1
9755 1
9428 1
9910 2
10536 1
6567 2
3130 1
6929 1
3129 2
8691 1
10174 1
5404 2
4098 1
5403 1
8060 1
6577 1
8786 1
8784 1
3133 2
10437 1
3132 1
525 2
10532 1
5412 1
11214 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ANGPTL3"
[1] "1_39"
genename region_tag susie_pip mu2 PVE z
6952 TM2D1 1_39 0.06436674 22.812799 4.273271e-06 2.1432487
4314 KANK4 1_39 0.01036083 5.063248 1.526667e-07 0.5123038
6953 USP1 1_39 0.89404087 252.569473 6.571410e-04 16.2582110
4315 ANGPTL3 1_39 0.11693691 248.355573 8.451734e-05 16.1322287
3024 DOCK7 1_39 0.01160113 24.241026 8.184112e-07 4.4594815
3732 ATG4C 1_39 0.02926797 80.969082 6.896554e-06 -8.6477262
num_eqtl
6952 1
4314 1
6953 1
4315 1
3024 1
3732 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "APOB"
[1] "2_13"
genename region_tag susie_pip mu2 PVE z
1053 APOB 2_13 1.760336e-11 62.33368 3.193293e-15 -11.72589
num_eqtl
1053 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "APOE"
[1] "19_32"
genename region_tag susie_pip mu2 PVE z num_eqtl
6717 ZNF233 19_32 0 114.741871 0 -9.2725820 2
6718 ZNF235 19_32 0 105.705005 0 -9.2122953 1
538 ZNF112 19_32 0 145.997950 0 10.3860543 1
11373 ZNF285 19_32 0 14.814234 0 0.9962471 2
11479 ZNF229 19_32 0 90.836819 0 10.9591492 2
7755 ZNF180 19_32 0 28.785261 0 -3.9159702 3
781 PVR 19_32 0 294.112183 0 -10.0782525 2
9718 CEACAM19 19_32 0 64.415235 0 9.4554813 2
9782 BCAM 19_32 0 109.428227 0 4.6421318 1
4047 NECTIN2 19_32 0 108.430839 0 6.2443536 2
4049 TOMM40 19_32 0 25.408808 0 -1.4020544 1
4048 APOE 19_32 0 47.756033 0 -2.0092826 1
11016 APOC2 19_32 0 56.914792 0 -9.1630690 2
8225 ZNF296 19_32 0 111.344431 0 5.4593536 1
5375 GEMIN7 19_32 0 192.588938 0 10.9432287 2
104 MARK4 19_32 0 24.060342 0 -2.2463768 1
1930 PPP1R37 19_32 0 124.088611 0 -12.8921201 2
109 TRAPPC6A 19_32 0 30.326228 0 1.8816459 1
9959 BLOC1S3 19_32 0 11.073118 0 2.3014119 1
11497 EXOC3L2 19_32 0 25.546204 0 -1.3436507 1
1933 CKM 19_32 0 15.812708 0 -1.5738464 1
1937 ERCC2 19_32 0 11.387101 0 2.3297330 2
3143 CD3EAP 19_32 0 27.048442 0 -3.0806361 1
3737 FOSB 19_32 0 18.843819 0 -2.3658041 1
196 ERCC1 19_32 0 14.616099 0 -0.2091619 1
10800 PPM1N 19_32 0 31.252331 0 5.4808308 1
3740 RTN2 19_32 0 31.704431 0 5.5300783 1
3741 VASP 19_32 0 12.801289 0 1.8957985 1
3738 OPA3 19_32 0 13.720403 0 -0.4654901 2
1942 KLC3 19_32 0 10.281304 0 1.7718715 1
10801 CEACAM16 19_32 0 7.467418 0 1.8740580 1
11372 APOC4 19_32 0 48.858022 0 8.0662459 2
10892 IGSF23 19_32 0 12.680189 0 1.9670520 1
8895 GPR4 19_32 0 65.929098 0 -3.5802828 1
3739 SNRPD2 19_32 0 9.998395 0 1.0366923 1
189 QPCTL 19_32 0 24.512871 0 -2.0303487 2
1949 DMPK 19_32 0 20.465857 0 -1.8090245 1
9633 DMWD 19_32 0 19.545408 0 -1.7547946 1
3742 SYMPK 19_32 0 4.893028 0 -0.0525717 1
8798 MYPOP 19_32 0 21.162302 0 1.8490001 1
1963 CCDC61 19_32 0 21.029796 0 1.8414612 2
3628 HIF3A 19_32 0 20.353083 0 -1.8024680 2
190 PPP5C 19_32 0 13.399291 0 1.3374649 1
8068 CCDC8 19_32 0 7.370076 0 0.7230949 2
9259 PNMAL1 19_32 0 20.576100 0 -1.8154111 4
10636 PNMAL2 19_32 0 5.234058 0 -0.2727077 1
10987 PPP5D1 19_32 0 6.375206 0 -0.5603345 1
6722 CALM3 19_32 0 54.390437 0 3.2242313 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "NPC1L1"
[1] "7_32"
genename region_tag susie_pip mu2 PVE z
7325 STK17A 7_32 0.007487660 5.398269 1.176308e-07 0.5439997
2177 COA1 7_32 0.013709996 9.852797 3.931128e-07 -0.7042755
2178 BLVRA 7_32 0.007370469 5.141380 1.102796e-07 0.4660052
541 MRPS24 7_32 0.008432916 6.239762 1.531320e-07 0.3827818
2179 URGCP 7_32 0.008628634 6.521935 1.637717e-07 -0.6697027
927 UBE2D4 7_32 0.011337508 9.431167 3.111740e-07 1.1906995
4704 DBNL 7_32 0.009734694 6.890648 1.952103e-07 0.1009981
3488 POLM 7_32 0.007294479 5.186619 1.101029e-07 0.5460441
2183 AEBP1 7_32 0.026169629 20.294222 1.545576e-06 -2.6280619
2184 POLD2 7_32 0.016282595 12.990469 6.155577e-07 -1.4227083
2185 MYL7 7_32 0.008941732 6.642567 1.728534e-07 0.4396483
2186 GCK 7_32 0.007343053 5.099639 1.089774e-07 -0.2515709
500 CAMK2B 7_32 0.013276445 9.006639 3.479885e-07 -1.5162371
233 NPC1L1 7_32 0.961698421 89.370614 2.501232e-04 -10.7619311
4702 DDX56 7_32 0.975870458 58.500144 1.661382e-04 9.4462712
6615 TMED4 7_32 0.013002936 45.160444 1.708913e-06 7.5475920
2101 OGDH 7_32 0.009579444 19.399595 5.408206e-07 0.1499623
num_eqtl
7325 1
2177 2
2178 1
541 1
2179 2
927 1
4704 2
3488 3
2183 1
2184 2
2185 1
2186 1
500 2
233 1
4702 2
6615 2
2101 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "SOAT1"
[1] "1_89"
genename region_tag susie_pip mu2 PVE z
5475 FAM163A 1_89 0.01075847 4.883579 1.529005e-07 -0.07283498
3000 FAM20B 1_89 0.01157147 5.597767 1.885053e-07 0.42412943
9689 TOR3A 1_89 0.01289334 6.658679 2.498469e-07 -0.64642141
5471 ABL2 1_89 0.01076073 4.885634 1.529969e-07 -0.04638378
488 SOAT1 1_89 0.01077689 4.900351 1.536884e-07 -0.14955596
8115 TOR1AIP2 1_89 0.01376345 7.299475 2.923743e-07 0.78824459
5474 TOR1AIP1 1_89 0.01078574 4.908391 1.540669e-07 -0.06998621
4638 CEP350 1_89 0.05062312 20.158181 2.969754e-06 2.27414775
3008 QSOX1 1_89 0.04156773 18.197972 2.201403e-06 -1.74016201
3408 LHX4 1_89 0.01269843 6.509239 2.405474e-07 -0.58114341
10985 ACBD6 1_89 0.01269203 6.504297 2.402436e-07 -0.61546219
5472 XPR1 1_89 0.03030695 15.069163 1.329082e-06 1.57571425
6242 MR1 1_89 0.01166548 5.677110 1.927304e-07 0.40422440
num_eqtl
5475 1
3000 2
9689 1
5471 1
488 1
8115 1
5474 1
4638 2
3008 2
3408 1
10985 2
5472 2
6242 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "MYLIP"
[1] "6_13"
genename region_tag susie_pip mu2 PVE z
400 DTNBP1 6_13 0.028905307 18.976664 1.596312e-06 1.8923854
124 MYLIP 6_13 0.006393401 39.193237 7.292281e-07 6.1101946
4815 GMPR 6_13 0.011629368 9.804844 3.318311e-07 0.2573808
num_eqtl
400 1
124 2
4815 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "OSBPL5"
[1] "11_2"
genename region_tag susie_pip mu2 PVE z
926 TOLLIP 11_2 0.006876070 11.220609 2.245314e-07 -1.1132790
9283 MOB2 11_2 0.024317179 23.215698 1.642916e-06 2.2732312
9505 DUSP8 11_2 0.005863698 9.672254 1.650515e-07 1.2015225
10705 KRTAP5-1 11_2 0.011871204 16.696892 5.768338e-07 -1.7341826
11154 IFITM10 11_2 0.004400441 7.159198 9.168132e-08 -0.8538633
3146 CTSD 11_2 0.007331527 11.862112 2.530910e-07 1.2201456
4092 TNNI2 11_2 0.004030858 6.106059 7.162734e-08 0.4977574
11498 PRR33 11_2 0.003636052 6.425336 6.799018e-08 1.2367544
4091 TNNT3 11_2 0.003643583 5.107262 5.415482e-08 -0.1271889
7739 IGF2 11_2 0.003712763 5.245838 5.668033e-08 0.1447958
9430 ASCL2 11_2 0.005508095 8.818255 1.413528e-07 -0.8044614
2490 C11orf21 11_2 0.004997302 8.017693 1.166018e-07 -0.7150719
9483 TSSC4 11_2 0.004999371 8.262778 1.202158e-07 -0.9083240
9230 PHLDA2 11_2 0.042407146 28.298257 3.492360e-06 -2.5765310
10684 NAP1L4 11_2 0.023951373 23.169742 1.614998e-06 -2.2381727
264 OSBPL5 11_2 0.010265421 15.051107 4.496406e-07 -1.6475511
67 ZNF195 11_2 0.006790631 11.123513 2.198226e-07 1.1809650
9121 TH 11_2 0.020045633 22.167178 1.293155e-06 2.0988645
10704 KRTAP5-6 11_2 0.003579598 4.941174 5.147363e-08 0.1958622
num_eqtl
926 2
9283 2
9505 1
10705 1
11154 1
3146 2
4092 1
11498 2
4091 2
7739 1
9430 1
2490 2
9483 1
9230 1
10684 1
264 1
67 2
9121 1
10704 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "SCARB1"
[1] "12_76"
genename region_tag susie_pip mu2 PVE z
783 SCARB1 12_76 0.01090677 6.673639 2.118260e-07 -1.3579091
6067 UBC 12_76 0.01632650 8.974302 4.263969e-07 0.9059691
989 AACS 12_76 0.01059134 4.947741 1.525029e-07 -0.1677513
num_eqtl
783 1
6067 1
989 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "VDAC3"
[1] "8_37"
genename region_tag susie_pip mu2 PVE z
726 AP3M2 8_37 0.01122906 5.030523 1.643906e-07 -0.1640405
1883 PLAT 8_37 0.01125718 5.055046 1.656057e-07 0.2157926
916 VDAC3 8_37 0.02428801 12.611651 8.914237e-07 -1.3606126
7956 SLC20A2 8_37 0.01116380 4.973379 1.615786e-07 -0.1602583
8800 SMIM19 8_37 0.01550915 8.199071 3.700606e-07 -0.9418962
4214 THAP1 8_37 0.01122806 5.029646 1.643472e-07 0.2765875
7904 HOOK3 8_37 0.04250910 18.147567 2.245022e-06 1.9222889
3375 RNF170 8_37 0.04250910 18.147567 2.245022e-06 1.9222889
num_eqtl
726 2
1883 1
916 1
7956 1
8800 1
4214 2
7904 1
3375 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LRP2"
[1] "2_103"
genename region_tag susie_pip mu2 PVE z
985 LRP2 2_103 0.02578853 7.599692 5.703518e-07 0.79845416
7037 BBS5 2_103 0.02724318 8.141047 6.454437e-07 0.88589081
11043 KLHL41 2_103 0.02033466 5.259061 3.112185e-07 -0.32742036
4983 FASTKD1 2_103 0.02985878 9.046216 7.860665e-07 0.94743244
4982 PPIG 2_103 0.03419571 10.387178 1.033688e-06 -1.40458148
6339 CCDC173 2_103 0.03283831 9.986361 9.543515e-07 -1.44045674
10748 KLHL23 2_103 0.05299430 14.738542 2.273024e-06 1.90247786
5600 PHOSPHO2 2_103 0.02043823 5.309053 3.157771e-07 0.29104367
4980 SSB 2_103 0.03584526 10.853652 1.132213e-06 1.22773041
4979 METTL5 2_103 0.01962051 4.907303 2.802035e-07 0.11571328
5599 UBR3 2_103 0.01962328 4.908695 2.803225e-07 0.07450539
num_eqtl
985 1
7037 1
11043 1
4983 1
4982 2
6339 2
10748 2
5600 1
4980 1
4979 1
5599 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "CETP"
[1] "16_31"
genename region_tag susie_pip mu2 PVE z
1124 GNAO1 16_31 0.003703611 6.122119 6.598534e-08 -0.5287206
6691 AMFR 16_31 0.004483564 7.445231 9.714532e-08 -0.1575098
7705 NUDT21 16_31 0.003746693 6.390125 6.967512e-08 -0.6747743
3680 BBS2 16_31 0.025236114 23.450429 1.722240e-06 -1.9263988
1122 MT3 16_31 0.003391651 5.265497 5.197216e-08 0.2341288
8089 MT1E 16_31 0.003507800 5.675571 5.793817e-08 0.5732896
10677 MT1M 16_31 0.004980766 11.981588 1.736724e-07 2.0216456
10675 MT1A 16_31 0.005261831 11.126872 1.703846e-07 1.5829980
10351 MT1F 16_31 0.133625135 38.089450 1.481198e-05 -2.7354541
9777 MT1X 16_31 0.003240088 5.043880 4.756000e-08 -0.4099722
1740 NUP93 16_31 0.023942147 24.293017 1.692641e-06 2.2770780
438 HERPUD1 16_31 0.007015346 24.280843 4.957163e-07 3.8389063
1120 CETP 16_31 0.061398998 119.887004 2.142169e-05 10.0796427
5238 NLRC5 16_31 0.095807071 158.249994 4.412265e-05 11.8602110
5237 CPNE2 16_31 0.003444422 5.467088 5.480153e-08 0.2383750
8465 FAM192A 16_31 0.003596836 6.201846 6.491752e-08 -0.7860456
6694 RSPRY1 16_31 0.004996669 11.130083 1.618450e-07 -1.8323801
1745 PLLP 16_31 0.020406298 25.167952 1.494626e-06 -2.6585007
81 CX3CL1 16_31 0.003508527 6.131284 6.260320e-08 -0.8286220
1747 CCL17 16_31 0.005190760 8.972136 1.355336e-07 0.7431888
52 CIAPIN1 16_31 0.013956368 20.009132 8.126826e-07 -2.0356089
1154 COQ9 16_31 0.005133973 9.290544 1.388082e-07 -0.9549661
3684 DOK4 16_31 0.004247457 7.889727 9.752394e-08 -0.9956520
4626 CCDC102A 16_31 0.003382904 5.374869 5.291489e-08 0.4043649
10672 ADGRG1 16_31 0.009725940 15.599463 4.415313e-07 -1.5429173
6684 CES5A 16_31 0.003286565 5.443327 5.206273e-08 -0.6790309
9341 ADGRG3 16_31 0.005665004 10.341746 1.704961e-07 -1.0805254
5239 KATNB1 16_31 0.016564308 20.813991 1.003342e-06 -1.8723683
5240 KIFC3 16_31 0.030743888 26.851673 2.402428e-06 -2.2243116
7566 ZNF319 16_31 0.003266608 4.965238 4.720168e-08 0.1401284
1754 USB1 16_31 0.003395726 5.344116 5.281155e-08 0.3145636
1753 MMP15 16_31 0.010039282 15.926826 4.653205e-07 -1.5466217
729 CFAP20 16_31 0.003323770 5.133966 4.965973e-08 0.2411647
730 CSNK2A2 16_31 0.003276083 4.996339 4.763511e-08 -0.1322483
9256 GINS3 16_31 0.004178134 7.373543 8.965589e-08 -0.7182699
1757 NDRG4 16_31 0.003282422 5.012956 4.788601e-08 0.1679672
3679 CNOT1 16_31 0.032054362 26.923259 2.511511e-06 -2.4928488
1759 SLC38A7 16_31 0.006011462 10.859726 1.899850e-07 1.2166483
3683 GOT2 16_31 0.027039285 25.384467 1.997485e-06 2.3111934
num_eqtl
1124 1
6691 1
7705 2
3680 2
1122 1
8089 1
10677 1
10675 2
10351 1
9777 1
1740 2
438 2
1120 1
5238 1
5237 1
8465 1
6694 1
1745 2
81 1
1747 1
52 2
1154 2
3684 2
4626 2
10672 3
6684 2
9341 1
5239 2
5240 1
7566 1
1754 1
1753 1
729 2
730 2
9256 2
1757 1
3679 2
1759 1
3683 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "PLTP"
[1] "20_28"
genename region_tag susie_pip mu2 PVE z
6004 JPH2 20_28 0.002115427 4.963685 3.055783e-08 0.34475118
4307 OSER1 20_28 0.002529134 6.637105 4.885071e-08 -0.72359138
10183 FITM2 20_28 0.002181293 7.619473 4.836813e-08 1.70850449
4308 SERINC3 20_28 0.004208635 10.932310 1.338978e-07 1.06666707
7969 PKIG 20_28 0.013233401 20.367360 7.843800e-07 -1.92973723
10117 ADA 20_28 0.002167525 6.271526 3.956013e-08 -1.11873945
3615 KCNK15 20_28 0.002569274 6.623045 4.952089e-08 -0.43953756
7686 YWHAB 20_28 0.002942624 7.875478 6.744225e-08 0.92140948
292 TOMM34 20_28 0.002151268 5.176243 3.240631e-08 -0.21559970
1617 STK4 20_28 0.002309197 5.784695 3.887422e-08 -0.65248556
3588 SLPI 20_28 0.002414049 6.067864 4.262872e-08 -0.43426645
3613 RBPJL 20_28 0.005328568 13.927213 2.159708e-07 1.21973824
3594 MATN4 20_28 0.002278251 5.507987 3.651866e-08 -0.72142554
3591 SDC4 20_28 0.626757269 23.873179 4.354416e-05 -3.92072709
10520 SYS1 20_28 0.002121601 4.925323 3.041017e-08 -0.53036749
11155 DBNDD2 20_28 0.002595102 7.572225 5.718712e-08 0.76276385
3616 TP53TG5 20_28 0.002376607 7.333492 5.072109e-08 -1.26808126
3589 WFDC3 20_28 0.002844630 12.638066 1.046229e-07 0.89942952
1683 DNTTIP1 20_28 0.007594899 16.195812 3.579687e-07 1.68660209
8688 UBE2C 20_28 0.003200798 10.090831 9.399515e-08 -1.29063071
3587 SNX21 20_28 0.032819237 29.654784 2.832328e-06 -2.25095415
1685 ACOT8 20_28 0.002713450 7.958255 6.284346e-08 0.21164457
7959 ZSWIM1 20_28 0.300483663 30.810425 2.694256e-05 -0.64131988
1597 PLTP 20_28 0.988294366 61.326849 1.763832e-04 -5.73249075
1598 PCIF1 20_28 0.002149879 21.253014 1.329703e-07 2.96018585
10296 ZNF335 20_28 0.002210432 5.270619 3.390464e-08 0.03190689
1600 MMP9 20_28 0.008172955 18.044865 4.291934e-07 1.76632544
3595 NCOA5 20_28 0.003860415 10.752231 1.207961e-07 1.06921473
1608 CD40 20_28 0.006429597 14.125484 2.643062e-07 -1.05986939
num_eqtl
6004 1
4307 2
10183 1
4308 2
7969 1
10117 1
3615 2
7686 1
292 1
1617 1
3588 2
3613 1
3594 1
3591 1
10520 1
11155 1
3616 2
3589 1
1683 2
8688 1
3587 1
1685 2
7959 1
1597 1
1598 1
10296 1
1600 1
3595 1
1608 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "VAPA"
[1] "18_7"
genename region_tag susie_pip mu2 PVE z
10717 RAB12 18_7 0.006670381 4.952171 9.613169e-08 0.123074043
8965 NDUFV2 18_7 0.017176605 14.224961 7.110641e-07 1.381942467
1703 ANKRD12 18_7 0.008816355 7.682904 1.971219e-07 -0.889300700
240 RALBP1 18_7 0.010377475 9.280180 2.802647e-07 1.171373949
7942 RAB31 18_7 0.006622455 4.881607 9.408104e-08 -0.002933481
1691 VAPA 18_7 0.007854789 6.552015 1.497717e-07 0.657289426
4444 NAPG 18_7 0.008484934 7.307633 1.804453e-07 0.841503954
num_eqtl
10717 1
8965 2
1703 2
240 1
7942 2
1691 1
4444 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "KPNB1"
[1] "17_27"
genename region_tag susie_pip mu2 PVE z
8491 DCAKD 17_27 0.008593185 5.144730 1.286581e-07 -0.15093721
6674 ARHGAP27 17_27 0.011680686 8.152090 2.771135e-07 1.16027409
10949 PLEKHM1 17_27 0.008462482 4.919153 1.211458e-07 0.03569373
3310 KANSL1 17_27 0.008644388 5.318341 1.337922e-07 -0.08580432
9745 MAPT 17_27 0.009360159 5.878317 1.601240e-07 -0.72635506
8835 LRRC37A 17_27 0.009561056 5.894880 1.640216e-07 -0.35529825
11035 LRRC37A2 17_27 0.015948276 10.656851 4.946100e-07 2.39235673
9637 ARL17A 17_27 0.010763185 7.276569 2.279228e-07 1.91935258
802 NSF 17_27 0.012755445 10.459884 3.882780e-07 -2.06053407
2301 WNT3 17_27 0.017246545 13.012271 6.530937e-07 -1.55730420
2310 GOSR2 17_27 0.023155210 13.702129 9.233303e-07 1.29775360
41 CDC27 17_27 0.009314697 8.407322 2.279012e-07 -1.62384444
11302 ITGB3 17_27 0.011168802 9.471601 3.078579e-07 -1.58019328
9025 EFCAB13 17_27 0.013846680 57.243541 2.306707e-06 7.36590043
5279 NPEPPS 17_27 0.011978005 15.769483 5.496956e-07 -3.02425642
2309 KPNB1 17_27 0.021735134 89.380578 5.653609e-06 -9.51317987
10475 TBKBP1 17_27 0.019196865 89.611497 5.006271e-06 -9.31233452
num_eqtl
8491 1
6674 2
10949 1
3310 1
9745 1
8835 1
11035 1
9637 2
802 1
2301 1
2310 2
41 1
11302 2
9025 4
5279 1
2309 2
10475 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ALDH2"
[1] "12_67"
genename region_tag susie_pip mu2 PVE z
5110 TCHP 12_67 0.02841292 13.867918 1.146694e-06 -1.4944146
5109 GIT2 12_67 0.03280473 15.668295 1.495817e-06 -1.8046506
8630 C12orf76 12_67 0.01172705 6.873843 2.345895e-07 -1.0008849
3515 IFT81 12_67 0.01707587 12.184178 6.054794e-07 -2.3268452
10062 ANAPC7 12_67 0.01119809 6.504853 2.119833e-07 -1.0505294
2531 ARPC3 12_67 0.01381835 8.166703 3.284153e-07 1.1143107
10638 FAM216A 12_67 0.01057869 5.606296 1.725951e-07 -0.6987263
2532 GPN3 12_67 0.01322699 8.501556 3.272500e-07 -1.4783205
2533 VPS29 12_67 0.01331983 8.578152 3.325161e-07 1.4871406
10637 TCTN1 12_67 0.03132585 16.858433 1.536881e-06 2.1771229
3517 HVCN1 12_67 0.01040355 5.650191 1.710665e-07 -0.8757995
9690 PPP1CC 12_67 0.01014850 5.259196 1.553251e-07 0.7231339
10340 FAM109A 12_67 0.01019429 5.850802 1.735773e-07 0.8704329
2536 SH2B3 12_67 0.08091527 57.353389 1.350547e-05 -7.8354247
10634 ATXN2 12_67 0.04970969 18.534625 2.681298e-06 -0.7777805
2541 ALDH2 12_67 0.02400954 32.695489 2.284505e-06 -6.4436064
10335 TMEM116 12_67 0.04378686 32.155595 4.097516e-06 5.8049447
1191 ERP29 12_67 0.04378686 32.155595 4.097516e-06 -5.8049447
2544 NAA25 12_67 0.04773762 33.234242 4.617074e-06 5.8544343
8497 HECTD4 12_67 0.04481764 33.331282 4.347316e-06 -5.7749393
9066 PTPN11 12_67 0.01341471 10.384002 4.053837e-07 2.2253869
num_eqtl
5110 2
5109 2
8630 1
3515 2
10062 1
2531 1
10638 1
2532 1
2533 1
10637 1
3517 1
9690 1
10340 1
2536 1
10634 1
2541 1
10335 1
1191 1
2544 1
8497 2
9066 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "APOA1"
[1] "11_70"
genename region_tag susie_pip mu2 PVE z
4866 BUD13 11_70 0.006681419 36.754149 7.146532e-07 4.11527976
3154 APOA1 11_70 0.004996811 6.626497 9.636009e-08 1.11150616
7893 PAFAH1B2 11_70 0.006429363 7.711100 1.442795e-07 -0.01722766
6002 SIDT2 11_70 0.004840711 5.458052 7.688951e-08 0.50104522
6003 TAGLN 11_70 0.005384250 18.435519 2.888690e-07 -1.55444774
6781 PCSK7 11_70 0.014893056 16.372939 7.096280e-07 0.97935688
7740 RNF214 11_70 0.005593633 6.558001 1.067544e-07 -0.52468931
2466 CEP164 11_70 0.005455634 5.753583 9.134903e-08 -0.30209785
9693 BACE1 11_70 0.005233417 20.995015 3.197583e-07 -4.13706265
4879 FXYD2 11_70 0.005474808 6.112959 9.739590e-08 -0.37435241
2465 APOA5 11_70 0.036019439 144.048541 1.509962e-05 -11.35991043
num_eqtl
4866 1
3154 2
7893 2
6002 1
6003 1
6781 1
7740 1
2466 2
9693 1
4879 2
2465 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "STARD3"
[1] "17_23"
genename region_tag susie_pip mu2 PVE z
11416 EPOP 17_23 0.01026396 4.955903 1.480328e-07 -0.10662081
11473 PSMB3 17_23 0.03161929 16.021652 1.474279e-06 1.72896001
11459 PIP4K2B 17_23 0.01566520 9.103614 4.150209e-07 -1.00157125
11415 CWC25 17_23 0.01793321 10.432261 5.444484e-07 1.08708711
16 LASP1 17_23 0.04807572 20.176878 2.822930e-06 2.06384703
11341 LINC00672 17_23 0.30125308 39.243937 3.440522e-05 3.53577816
6844 PLXDC1 17_23 0.01198507 6.475680 2.258636e-07 -0.56588683
2297 FBXL20 17_23 0.02234693 12.597358 8.192523e-07 1.93901635
3730 MED1 17_23 0.01577239 9.170716 4.209408e-07 -1.49493107
4201 STARD3 17_23 0.01047077 5.151418 1.569732e-07 -0.38811898
8592 TCAP 17_23 0.01405810 8.040939 3.289679e-07 1.04770013
5341 PNMT 17_23 0.01500363 8.679982 3.789967e-07 -1.18909299
5339 ERBB2 17_23 0.01358187 7.702713 3.044553e-07 -1.13724896
6845 PGAP3 17_23 0.01997195 11.491276 6.678962e-07 -2.14338495
5340 GRB7 17_23 0.01070928 5.372219 1.674304e-07 0.49199960
6846 IKZF3 17_23 0.15804122 32.259953 1.483728e-05 3.46618563
8383 ORMDL3 17_23 0.03149811 15.983634 1.465144e-06 2.64808902
7855 GSDMA 17_23 0.03329848 16.533296 1.602154e-06 2.77074527
2299 CSF3 17_23 0.09703453 27.234351 7.690660e-06 -3.20456334
3799 NR1D1 17_23 0.01382496 7.876710 3.169050e-07 0.81175389
9934 MSL1 17_23 0.01295489 7.238962 2.729167e-07 0.98720359
2300 RAPGEFL1 17_23 0.01525083 8.840313 3.923569e-07 0.89662465
8311 WIPF2 17_23 0.01018487 4.880101 1.446455e-07 -0.18843428
1306 CDC6 17_23 0.01264056 6.997893 2.574268e-07 0.50375876
5342 IGFBP4 17_23 0.01228087 6.714756 2.399825e-07 -0.57588470
4200 TNS4 17_23 0.01018829 4.883384 1.447913e-07 0.02859681
3798 CCR7 17_23 0.01109247 5.716782 1.845441e-07 -0.44220762
793 SMARCE1 17_23 0.01061605 5.286476 1.633239e-07 -0.32396665
10766 KRT222 17_23 0.01022096 4.914764 1.461890e-07 0.11407193
num_eqtl
11416 2
11473 2
11459 1
11415 3
16 1
11341 2
6844 1
2297 1
3730 2
4201 2
8592 1
5341 2
5339 2
6845 2
5340 3
6846 1
8383 2
7855 2
2299 1
3799 1
9934 1
2300 1
8311 2
1306 2
5342 1
4200 1
3798 1
793 2
10766 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "PPARG"
[1] "3_9"
genename region_tag susie_pip mu2 PVE z
10217 ATG7 3_9 0.006708330 11.212783 2.189012e-07 1.4232154
5613 TAMM41 3_9 0.004910000 9.595155 1.371051e-07 1.3225877
6513 TIMP4 3_9 0.005740886 8.072340 1.348648e-07 0.2250754
4230 PPARG 3_9 0.003399249 10.972027 1.085401e-07 -2.5953663
6358 TSEN2 3_9 0.040762302 29.562122 3.506829e-06 4.4713068
856 MKRN2 3_9 0.006647215 15.000541 2.901796e-07 -3.4863426
10950 MKRN2OS 3_9 0.048471754 28.876512 4.073369e-06 -4.7387006
4229 RAF1 3_9 0.003250016 5.473382 5.176802e-08 0.8372135
5630 CAND2 3_9 0.024920416 27.501348 1.994479e-06 -3.2762482
5631 RPL32 3_9 0.004363302 7.920886 1.005795e-07 -0.8436264
num_eqtl
10217 2
5613 3
6513 1
4230 1
6358 1
856 2
10950 2
4229 1
5630 1
5631 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LPIN3"
[1] "20_25"
genename region_tag susie_pip mu2 PVE z
10463 TOP1 20_25 0.014212855 20.10055 8.313992e-07 -3.533405
3599 PLCG1 20_25 0.052835744 22.28425 3.426464e-06 2.065730
8619 ZHX3 20_25 0.008786526 12.80118 3.273312e-07 -2.767903
4305 LPIN3 20_25 0.013609240 47.08221 1.864709e-06 6.600722
9438 EMILIN3 20_25 0.030445223 94.98217 8.415531e-06 9.450280
3598 CHD6 20_25 0.011590035 11.59242 3.910022e-07 -2.247872
num_eqtl
10463 2
3599 2
8619 1
4305 2
9438 2
3598 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "FADS2"
[1] "11_34"
genename region_tag susie_pip mu2 PVE
9952 FAM111B 11_34 0.005221610 5.017036 7.623808e-08
7657 FAM111A 11_34 0.007702534 8.638468 1.936380e-07
2444 DTX4 11_34 0.005257276 5.099679 7.802322e-08
10233 MPEG1 11_34 0.005294591 5.228645 8.056415e-08
7679 PATL1 11_34 0.071519692 30.036371 6.251632e-06
7682 STX3 11_34 0.005161056 4.923424 7.394795e-08
7683 MRPL16 11_34 0.007921287 8.819332 2.033067e-07
5994 MS4A2 11_34 0.009774821 10.858652 3.088908e-07
2453 MS4A6A 11_34 0.005834704 6.012788 1.020975e-07
10858 MS4A4E 11_34 0.006702028 7.569014 1.476270e-07
7692 MS4A7 11_34 0.005133601 4.899926 7.320351e-08
7693 MS4A14 11_34 0.029852883 21.633713 1.879480e-06
2455 CCDC86 11_34 0.006739782 7.351707 1.441964e-07
2456 PRPF19 11_34 0.010426047 12.033095 3.651046e-07
2457 TMEM109 11_34 0.011902564 13.101685 4.538245e-07
2480 SLC15A3 11_34 0.005506251 6.036361 9.672784e-08
2481 CD5 11_34 0.005288143 5.275472 8.118669e-08
7869 VPS37C 11_34 0.006143699 6.285888 1.123872e-07
7870 VWCE 11_34 0.005532627 5.850775 9.420308e-08
6898 CYB561A3 11_34 0.006999419 10.212039 2.080150e-07
5987 TMEM138 11_34 0.006999419 10.212039 2.080150e-07
9761 TMEM216 11_34 0.005138310 4.939101 7.385647e-08
5993 CPSF7 11_34 0.006047511 9.919892 1.745838e-07
11272 RP11-286N22.8 11_34 0.005759527 5.941444 9.958619e-08
6899 PPP1R32 11_34 0.006257040 6.537660 1.190451e-07
4506 TMEM258 11_34 0.040683627 65.607817 7.767756e-06
7950 FEN1 11_34 0.007575672 144.430608 3.184203e-06
4505 FADS2 11_34 0.007575672 144.430608 3.184203e-06
5988 FADS1 11_34 0.999487146 159.673353 4.644404e-04
10926 FADS3 11_34 0.011519846 21.295040 7.139132e-07
7871 BEST1 11_34 0.005504270 18.762512 3.005461e-07
5991 INCENP 11_34 0.005145157 5.781594 8.656983e-08
6900 ASRGL1 11_34 0.005292136 5.189670 7.992655e-08
1196 GANAB 11_34 0.008923829 71.973734 1.869156e-06
z num_eqtl
9952 -0.130372989 1
7657 0.788300174 2
2444 0.272926929 2
10233 0.288859011 1
7679 3.303999343 2
7682 0.001285218 2
7683 0.989371951 2
5994 -1.135206653 1
2453 0.544252801 1
10858 0.848247159 1
7692 -0.132073393 2
7693 -1.857701655 3
2455 -0.651729299 3
2456 1.430603519 2
2457 1.421831985 1
2480 0.821410772 1
2481 0.346138465 1
7869 0.024014132 1
7870 -0.638825054 2
6898 -1.782804562 1
5987 -1.782804562 1
9761 -0.251085346 2
5993 -2.061044578 1
11272 -0.427047808 1
6899 -0.382653253 1
4506 -6.946921109 2
7950 12.072635202 1
4505 12.072635202 1
5988 12.825882927 2
10926 3.289416818 1
7871 -3.744804132 1
5991 -0.969291005 2
6900 -0.250084386 1
1196 -8.204723304 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "CD36"
[1] "7_51"
genename region_tag susie_pip mu2 PVE z
4555 CD36 7_51 0.01203057 5.091815 1.782704e-07 -0.2565559
830 SEMA3C 7_51 0.01536335 7.491551 3.349483e-07 -0.8034967
num_eqtl
4555 1
830 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "CYP27A1"
[1] "2_129"
genename region_tag susie_pip mu2 PVE z
3880 VIL1 2_129 0.784027761 26.828693 6.121407e-05 4.72553123
9866 RUFY4 2_129 0.013237886 9.061756 3.491012e-07 1.02099255
9168 CXCR2 2_129 0.020787801 12.086470 7.311868e-07 -1.47518963
7085 CXCR1 2_129 0.010259835 6.021142 1.797792e-07 0.56376400
7086 ARPC2 2_129 0.036061825 17.061579 1.790553e-06 -1.94043222
3881 AAMP 2_129 0.043278356 18.269245 2.300974e-06 -1.90836173
3882 PNKD 2_129 0.061141376 21.698601 3.860888e-06 -2.20803733
4653 TMBIM1 2_129 0.045951929 18.816604 2.516317e-06 -1.92761030
243 SLC11A1 2_129 0.009446499 5.213412 1.433221e-07 0.05100451
4647 USP37 2_129 0.037460955 20.458234 2.230321e-06 -3.97558895
5616 CNOT9 2_129 0.020237405 17.630047 1.038314e-06 3.65097314
2934 PLCD4 2_129 0.023375462 18.195877 1.237809e-06 -3.71953627
813 BCS1L 2_129 0.009603821 6.005941 1.678593e-07 -0.95838574
2936 ZNF142 2_129 0.009525895 5.901783 1.636098e-07 0.93284395
7090 STK36 2_129 0.013226462 15.708131 6.046283e-07 3.44963509
4654 CYP27A1 2_129 0.009559341 8.413099 2.340476e-07 1.82913381
9812 NHEJ1 2_129 0.029412363 17.138519 1.466978e-06 1.96641989
10802 SLC23A3 2_129 0.011231295 6.607900 2.159800e-07 0.30848047
5615 FAM134A 2_129 0.026571050 14.635970 1.131750e-06 -1.33896546
2941 CNPPD1 2_129 0.012317799 7.779472 2.788711e-07 -0.77901195
2943 ABCB6 2_129 0.030261566 17.008597 1.497891e-06 1.84732093
10472 ATG9A 2_129 0.014499935 9.663085 4.077577e-07 -1.13410218
7096 ANKZF1 2_129 0.015440398 10.306127 4.630995e-07 -1.21232145
7099 GLB1L 2_129 0.009712998 5.434992 1.536287e-07 -0.12917630
3879 TUBA4A 2_129 0.011284064 6.863208 2.253788e-07 -0.56762321
4652 DNAJB2 2_129 0.010050861 5.821124 1.702670e-07 -0.48915334
3580 DNPEP 2_129 0.029251601 16.526203 1.406835e-06 1.83086497
8690 DES 2_129 0.039601867 19.522259 2.249915e-06 2.01667108
758 SPEG 2_129 0.009282712 5.090259 1.375102e-07 0.08326323
5618 GMPPA 2_129 0.011638600 7.302907 2.473528e-07 -0.73851578
3579 CHPF 2_129 0.009721838 5.608242 1.586702e-07 0.41418410
3582 OBSL1 2_129 0.016065299 10.828594 5.062688e-07 -1.30597047
num_eqtl
3880 1
9866 2
9168 1
7085 1
7086 1
3881 1
3882 1
4653 2
243 1
4647 3
5616 1
2934 1
813 1
2936 1
7090 2
4654 2
9812 2
10802 1
5615 1
2941 2
2943 1
10472 1
7096 2
7099 1
3879 1
4652 1
3580 2
8690 1
758 1
5618 1
3579 1
3582 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "NPC1"
[1] "18_12"
genename region_tag susie_pip mu2 PVE z
4475 CABLES1 18_12 0.01211412 5.040374 1.776949e-07 -0.14555775
4474 TMEM241 18_12 0.03243365 14.732411 1.390561e-06 -1.84256728
1708 RIOK3 18_12 0.02446132 11.947671 8.505177e-07 -1.34902775
5302 C18orf8 18_12 0.03278696 14.839865 1.415961e-06 1.67075330
5304 NPC1 18_12 0.07292423 22.804370 4.839608e-06 -2.39576123
454 LAMA3 18_12 0.01191750 4.879896 1.692451e-07 0.01316175
7909 TTC39C 18_12 0.04555039 18.100175 2.399358e-06 1.78195458
6307 CABYR 18_12 0.01191881 4.880973 1.693010e-07 -0.02760888
num_eqtl
4475 1
4474 2
1708 1
5302 2
5304 1
454 2
7909 3
6307 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ABCG8"
[1] "2_27"
genename region_tag susie_pip mu2 PVE
5561 ABCG8 2_27 9.999422e-01 311.815840 9.073887e-04
2977 THADA 2_27 1.981621e-06 8.148336 4.699046e-11
6205 PLEKHH2 2_27 7.241211e-06 16.054462 3.383197e-10
10938 C1GALT1C1L 2_27 4.439962e-06 24.182149 3.124600e-10
4928 DYNC2LI1 2_27 9.736101e-07 8.217065 2.328210e-11
4941 LRPPRC 2_27 2.870631e-06 12.532815 1.046999e-10
z num_eqtl
5561 -20.29398177 1
2977 -2.34643541 2
6205 -2.96266114 2
10938 3.06095256 2
4928 -0.02538894 1
4941 -0.91853212 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "NCEH1"
[1] "3_106"
genename region_tag susie_pip mu2 PVE z
5659 NCEH1 3_106 0.01354186 6.98747 2.753712e-07 -0.6532732
num_eqtl
5659 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "STAR"
[1] "8_34"
genename region_tag susie_pip mu2 PVE z
5840 PROSC 8_34 0.018539548 12.371879 6.675059e-07 -1.18549708
4028 ASH2L 8_34 0.065216545 24.836310 4.713735e-06 -2.41270520
5839 STAR 8_34 0.077023552 26.509202 5.942107e-06 -2.50033778
8718 LSM1 8_34 0.008640370 4.881689 1.227504e-07 0.14152273
5847 NSD3 8_34 0.008641383 4.882838 1.227937e-07 -0.06923734
7406 LETM2 8_34 0.009233101 5.531604 1.486343e-07 -0.48761003
900 FGFR1 8_34 0.013667708 9.377190 3.729827e-07 -0.93406568
5843 TACC1 8_34 0.008670932 4.916274 1.240573e-07 -0.11708259
8063 PLEKHA2 8_34 0.023527059 14.717021 1.007646e-06 1.82472982
8062 TM2D2 8_34 0.012619522 8.594182 3.156223e-07 0.85605170
7960 ADAM9 8_34 0.248785513 38.725448 2.803767e-05 3.23657677
num_eqtl
5840 1
4028 1
5839 1
8718 1
5847 2
7406 2
900 1
5843 2
8063 1
8062 2
7960 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "FADS1"
[1] "11_34"
genename region_tag susie_pip mu2 PVE
9952 FAM111B 11_34 0.005221610 5.017036 7.623808e-08
7657 FAM111A 11_34 0.007702534 8.638468 1.936380e-07
2444 DTX4 11_34 0.005257276 5.099679 7.802322e-08
10233 MPEG1 11_34 0.005294591 5.228645 8.056415e-08
7679 PATL1 11_34 0.071519692 30.036371 6.251632e-06
7682 STX3 11_34 0.005161056 4.923424 7.394795e-08
7683 MRPL16 11_34 0.007921287 8.819332 2.033067e-07
5994 MS4A2 11_34 0.009774821 10.858652 3.088908e-07
2453 MS4A6A 11_34 0.005834704 6.012788 1.020975e-07
10858 MS4A4E 11_34 0.006702028 7.569014 1.476270e-07
7692 MS4A7 11_34 0.005133601 4.899926 7.320351e-08
7693 MS4A14 11_34 0.029852883 21.633713 1.879480e-06
2455 CCDC86 11_34 0.006739782 7.351707 1.441964e-07
2456 PRPF19 11_34 0.010426047 12.033095 3.651046e-07
2457 TMEM109 11_34 0.011902564 13.101685 4.538245e-07
2480 SLC15A3 11_34 0.005506251 6.036361 9.672784e-08
2481 CD5 11_34 0.005288143 5.275472 8.118669e-08
7869 VPS37C 11_34 0.006143699 6.285888 1.123872e-07
7870 VWCE 11_34 0.005532627 5.850775 9.420308e-08
6898 CYB561A3 11_34 0.006999419 10.212039 2.080150e-07
5987 TMEM138 11_34 0.006999419 10.212039 2.080150e-07
9761 TMEM216 11_34 0.005138310 4.939101 7.385647e-08
5993 CPSF7 11_34 0.006047511 9.919892 1.745838e-07
11272 RP11-286N22.8 11_34 0.005759527 5.941444 9.958619e-08
6899 PPP1R32 11_34 0.006257040 6.537660 1.190451e-07
4506 TMEM258 11_34 0.040683627 65.607817 7.767756e-06
7950 FEN1 11_34 0.007575672 144.430608 3.184203e-06
4505 FADS2 11_34 0.007575672 144.430608 3.184203e-06
5988 FADS1 11_34 0.999487146 159.673353 4.644404e-04
10926 FADS3 11_34 0.011519846 21.295040 7.139132e-07
7871 BEST1 11_34 0.005504270 18.762512 3.005461e-07
5991 INCENP 11_34 0.005145157 5.781594 8.656983e-08
6900 ASRGL1 11_34 0.005292136 5.189670 7.992655e-08
1196 GANAB 11_34 0.008923829 71.973734 1.869156e-06
z num_eqtl
9952 -0.130372989 1
7657 0.788300174 2
2444 0.272926929 2
10233 0.288859011 1
7679 3.303999343 2
7682 0.001285218 2
7683 0.989371951 2
5994 -1.135206653 1
2453 0.544252801 1
10858 0.848247159 1
7692 -0.132073393 2
7693 -1.857701655 3
2455 -0.651729299 3
2456 1.430603519 2
2457 1.421831985 1
2480 0.821410772 1
2481 0.346138465 1
7869 0.024014132 1
7870 -0.638825054 2
6898 -1.782804562 1
5987 -1.782804562 1
9761 -0.251085346 2
5993 -2.061044578 1
11272 -0.427047808 1
6899 -0.382653253 1
4506 -6.946921109 2
7950 12.072635202 1
4505 12.072635202 1
5988 12.825882927 2
10926 3.289416818 1
7871 -3.744804132 1
5991 -0.969291005 2
6900 -0.250084386 1
1196 -8.204723304 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "VDAC2"
[1] "10_49"
genename region_tag susie_pip mu2 PVE z
8451 AGAP5 10_49 0.02167655 12.152439 7.666090e-07 -1.3182844
3503 PLAU 10_49 0.03091338 15.653590 1.408253e-06 -1.6531888
9550 AP3M1 10_49 0.01038104 4.922158 1.487019e-07 -0.1414585
6442 ADK 10_49 0.01040030 4.940331 1.495279e-07 0.1263619
7471 VDAC2 10_49 0.09079139 26.413458 6.978952e-06 2.9474923
7472 COMTD1 10_49 0.09015451 26.342078 6.911269e-06 2.9437974
5933 C10orf11 10_49 0.16640687 32.656678 1.581479e-05 2.9550655
num_eqtl
8451 1
3503 1
9550 1
6442 2
7471 1
7472 1
5933 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LIPC"
[1] "15_26"
genename region_tag susie_pip mu2 PVE z
7542 LIPC 15_26 0.005392159 41.666645 6.538400e-07 -5.9117767
4903 ADAM10 15_26 0.006243483 7.013646 1.274357e-07 0.8412995
4887 SLTM 15_26 0.005382336 5.473371 8.573259e-08 -0.7158866
6532 RNF111 15_26 0.005133967 4.964302 7.417057e-08 -0.2997052
8379 LDHAL6B 15_26 0.005188986 5.062865 7.645381e-08 -0.4439394
num_eqtl
7542 2
4903 2
4887 1
6532 1
8379 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "SOAT2"
[1] "12_33"
genename region_tag susie_pip mu2 PVE z
7829 KRT1 12_33 0.01572701 6.885919 3.151581e-07 -0.5707147
8183 KRT78 12_33 0.01301299 5.152603 1.951300e-07 -0.3499992
2519 KRT18 12_33 0.01876609 8.951629 4.888730e-07 1.0385365
8182 KRT8 12_33 0.04413528 17.051797 2.190162e-06 2.1131126
544 EIF4B 12_33 0.01290368 4.981936 1.870820e-07 -0.2219413
2521 TNS2 12_33 0.01626737 7.303411 3.457510e-07 -0.9622725
7833 SPRYD3 12_33 0.02325454 10.336665 6.995336e-07 1.3387675
7834 IGFBP6 12_33 0.01296864 5.030002 1.898379e-07 -0.5122792
7835 SOAT2 12_33 0.02791132 12.310915 9.999794e-07 -1.8512201
5136 ZNF740 12_33 0.08388523 22.631584 5.524853e-06 2.5465203
5131 CSAD 12_33 0.02530234 11.080090 8.158762e-07 -1.1787012
5129 ITGB7 12_33 0.01275753 4.880818 1.812089e-07 0.2190571
9308 MFSD5 12_33 0.04568414 15.735524 2.092026e-06 1.2739816
4593 ESPL1 12_33 0.02166337 10.457480 6.592854e-07 1.6368406
10674 PRR13 12_33 0.17349277 18.693814 9.438427e-06 -3.7752633
5122 TARBP2 12_33 0.02728484 13.275442 1.054121e-06 -3.0239203
4577 ATP5G2 12_33 0.01521602 9.290757 4.114078e-07 2.1165089
203 CALCOCO1 12_33 0.02933043 13.243860 1.130455e-06 -1.4132763
3549 SMUG1 12_33 0.01403334 5.834231 2.382676e-07 0.3968124
1308 CBX5 12_33 0.01463342 6.238484 2.656716e-07 0.6527662
num_eqtl
7829 1
8183 1
2519 1
8182 1
544 1
2521 2
7833 1
7834 1
7835 1
5136 2
5131 1
5129 2
9308 2
4593 3
10674 1
5122 1
4577 2
203 1
3549 1
1308 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "CYP7A1"
[1] "8_45"
genename region_tag susie_pip mu2 PVE z
10870 UBXN2B 8_45 0.010437493 25.84700 7.851031e-07 -3.437080
7854 CYP7A1 8_45 0.006296922 73.13411 1.340197e-06 -7.392476
num_eqtl
10870 3
7854 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "TNKS"
[1] "8_12"
genename region_tag susie_pip mu2 PVE z num_eqtl
8523 TNKS 8_12 0.9844747 73.24908 0.0002098587 11.02603 2
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "ADH1B"
[1] "4_66"
genename region_tag susie_pip mu2 PVE z
7975 TSPAN5 4_66 0.016776397 11.125746 5.431855e-07 -1.2321573
6088 EIF4E 4_66 0.010897316 6.926124 2.196494e-07 0.9082871
7217 METAP1 4_66 0.008980055 5.083853 1.328594e-07 -0.1831346
8489 ADH6 4_66 0.011444259 7.558809 2.517453e-07 0.7334699
10084 ADH1B 4_66 0.016886902 11.259415 5.533324e-07 -1.1153042
11178 ADH1C 4_66 0.157537466 31.867251 1.460995e-05 -3.1932254
10026 ADH7 4_66 0.010627336 10.487409 3.243493e-07 1.9684512
5053 MTTP 4_66 0.012587091 7.995964 2.928981e-07 -0.7972018
5684 TRMT10A 4_66 0.013138101 9.083605 3.473051e-07 -1.1240076
num_eqtl
7975 2
6088 1
7217 1
8489 2
10084 1
11178 3
10026 2
5053 1
5684 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "LPA"
[1] "6_104"
genename region_tag susie_pip mu2 PVE z
10399 LPA 6_104 5.049781e-06 33.167639 4.874246e-10 8.1196160
3449 PLG 6_104 8.081204e-06 24.664373 5.800514e-10 2.4097623
5797 SLC22A3 6_104 1.898541e-06 21.582036 1.192430e-10 -6.5929784
1074 MAP3K4 6_104 1.920923e-06 7.028513 3.929106e-11 0.7795492
num_eqtl
10399 1
3449 1
5797 1
1074 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "VDAC1"
[1] "5_80"
genename region_tag susie_pip mu2 PVE z
7306 SEPT8 5_80 0.02619067 12.408164 9.457458e-07 1.30260276
7307 SHROOM1 5_80 0.01641237 7.807944 3.729309e-07 0.89963346
7308 GDF9 5_80 0.01218485 4.884394 1.732014e-07 0.03182872
760 AFF4 5_80 0.01784798 8.632026 4.483552e-07 1.02990725
6396 ZCCHC10 5_80 0.01233951 5.008099 1.798420e-07 -0.15509357
8211 HSPA4 5_80 0.01218368 4.883450 1.731512e-07 -0.07597330
2763 C5orf15 5_80 0.01302346 5.537293 2.098669e-07 0.41873673
10776 VDAC1 5_80 0.04647665 18.087393 2.446420e-06 1.82176093
978 TCF7 5_80 0.03259373 14.568372 1.381864e-06 1.55983246
2759 SKP1 5_80 0.02180083 10.600216 6.725244e-07 -1.31317545
2761 PPP2CA 5_80 0.02463709 11.805157 8.464112e-07 1.40300081
102 CDKL3 5_80 0.01520661 7.058456 3.123650e-07 0.87889673
3214 UBE2B 5_80 0.01520661 7.058456 3.123650e-07 0.87889673
11029 CDKN2AIPNL 5_80 0.02232181 10.832774 7.037029e-07 -1.07306079
7335 CAMLG 5_80 0.01218893 4.887675 1.733757e-07 0.10493598
9253 C5orf24 5_80 0.01229772 4.974825 1.780421e-07 -0.20162988
4281 PCBD2 5_80 0.01626623 7.720072 3.654505e-07 0.78727304
681 PITX1 5_80 0.01377983 6.091253 2.442703e-07 0.52096477
num_eqtl
7306 1
7307 2
7308 1
760 1
6396 1
8211 2
2763 1
10776 1
978 1
2759 1
2761 2
102 1
3214 1
11029 2
7335 1
9253 1
4281 1
681 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "FADS3"
[1] "11_34"
genename region_tag susie_pip mu2 PVE
9952 FAM111B 11_34 0.005221610 5.017036 7.623808e-08
7657 FAM111A 11_34 0.007702534 8.638468 1.936380e-07
2444 DTX4 11_34 0.005257276 5.099679 7.802322e-08
10233 MPEG1 11_34 0.005294591 5.228645 8.056415e-08
7679 PATL1 11_34 0.071519692 30.036371 6.251632e-06
7682 STX3 11_34 0.005161056 4.923424 7.394795e-08
7683 MRPL16 11_34 0.007921287 8.819332 2.033067e-07
5994 MS4A2 11_34 0.009774821 10.858652 3.088908e-07
2453 MS4A6A 11_34 0.005834704 6.012788 1.020975e-07
10858 MS4A4E 11_34 0.006702028 7.569014 1.476270e-07
7692 MS4A7 11_34 0.005133601 4.899926 7.320351e-08
7693 MS4A14 11_34 0.029852883 21.633713 1.879480e-06
2455 CCDC86 11_34 0.006739782 7.351707 1.441964e-07
2456 PRPF19 11_34 0.010426047 12.033095 3.651046e-07
2457 TMEM109 11_34 0.011902564 13.101685 4.538245e-07
2480 SLC15A3 11_34 0.005506251 6.036361 9.672784e-08
2481 CD5 11_34 0.005288143 5.275472 8.118669e-08
7869 VPS37C 11_34 0.006143699 6.285888 1.123872e-07
7870 VWCE 11_34 0.005532627 5.850775 9.420308e-08
6898 CYB561A3 11_34 0.006999419 10.212039 2.080150e-07
5987 TMEM138 11_34 0.006999419 10.212039 2.080150e-07
9761 TMEM216 11_34 0.005138310 4.939101 7.385647e-08
5993 CPSF7 11_34 0.006047511 9.919892 1.745838e-07
11272 RP11-286N22.8 11_34 0.005759527 5.941444 9.958619e-08
6899 PPP1R32 11_34 0.006257040 6.537660 1.190451e-07
4506 TMEM258 11_34 0.040683627 65.607817 7.767756e-06
7950 FEN1 11_34 0.007575672 144.430608 3.184203e-06
4505 FADS2 11_34 0.007575672 144.430608 3.184203e-06
5988 FADS1 11_34 0.999487146 159.673353 4.644404e-04
10926 FADS3 11_34 0.011519846 21.295040 7.139132e-07
7871 BEST1 11_34 0.005504270 18.762512 3.005461e-07
5991 INCENP 11_34 0.005145157 5.781594 8.656983e-08
6900 ASRGL1 11_34 0.005292136 5.189670 7.992655e-08
1196 GANAB 11_34 0.008923829 71.973734 1.869156e-06
z num_eqtl
9952 -0.130372989 1
7657 0.788300174 2
2444 0.272926929 2
10233 0.288859011 1
7679 3.303999343 2
7682 0.001285218 2
7683 0.989371951 2
5994 -1.135206653 1
2453 0.544252801 1
10858 0.848247159 1
7692 -0.132073393 2
7693 -1.857701655 3
2455 -0.651729299 3
2456 1.430603519 2
2457 1.421831985 1
2480 0.821410772 1
2481 0.346138465 1
7869 0.024014132 1
7870 -0.638825054 2
6898 -1.782804562 1
5987 -1.782804562 1
9761 -0.251085346 2
5993 -2.061044578 1
11272 -0.427047808 1
6899 -0.382653253 1
4506 -6.946921109 2
7950 12.072635202 1
4505 12.072635202 1
5988 12.825882927 2
10926 3.289416818 1
7871 -3.744804132 1
5991 -0.969291005 2
6900 -0.250084386 1
1196 -8.204723304 1
Version | Author | Date |
---|---|---|
37b2a2c | wesleycrouse | 2022-05-29 |
[1] "APOC2"
[1] "19_32"
genename region_tag susie_pip mu2 PVE z num_eqtl
6717 ZNF233 19_32 0 114.741871 0 -9.2725820 2
6718 ZNF235 19_32 0 105.705005 0 -9.2122953 1
538 ZNF112 19_32 0 145.997950 0 10.3860543 1
11373 ZNF285 19_32 0 14.814234 0 0.9962471 2
11479 ZNF229 19_32 0 90.836819 0 10.9591492 2
7755 ZNF180 19_32 0 28.785261 0 -3.9159702 3
781 PVR 19_32 0 294.112183 0 -10.0782525 2
9718 CEACAM19 19_32 0 64.415235 0 9.4554813 2
9782 BCAM 19_32 0 109.428227 0 4.6421318 1
4047 NECTIN2 19_32 0 108.430839 0 6.2443536 2
4049 TOMM40 19_32 0 25.408808 0 -1.4020544 1
4048 APOE 19_32 0 47.756033 0 -2.0092826 1
11016 APOC2 19_32 0 56.914792 0 -9.1630690 2
8225 ZNF296 19_32 0 111.344431 0 5.4593536 1
5375 GEMIN7 19_32 0 192.588938 0 10.9432287 2
104 MARK4 19_32 0 24.060342 0 -2.2463768 1
1930 PPP1R37 19_32 0 124.088611 0 -12.8921201 2
109 TRAPPC6A 19_32 0 30.326228 0 1.8816459 1
9959 BLOC1S3 19_32 0 11.073118 0 2.3014119 1
11497 EXOC3L2 19_32 0 25.546204 0 -1.3436507 1
1933 CKM 19_32 0 15.812708 0 -1.5738464 1
1937 ERCC2 19_32 0 11.387101 0 2.3297330 2
3143 CD3EAP 19_32 0 27.048442 0 -3.0806361 1
3737 FOSB 19_32 0 18.843819 0 -2.3658041 1
196 ERCC1 19_32 0 14.616099 0 -0.2091619 1
10800 PPM1N 19_32 0 31.252331 0 5.4808308 1
3740 RTN2 19_32 0 31.704431 0 5.5300783 1
3741 VASP 19_32 0 12.801289 0 1.8957985 1
3738 OPA3 19_32 0 13.720403 0 -0.4654901 2
1942 KLC3 19_32 0 10.281304 0 1.7718715 1
10801 CEACAM16 19_32 0 7.467418 0 1.8740580 1
11372 APOC4 19_32 0 48.858022 0 8.0662459 2
10892 IGSF23 19_32 0 12.680189 0 1.9670520 1
8895 GPR4 19_32 0 65.929098 0 -3.5802828 1
3739 SNRPD2 19_32 0 9.998395 0 1.0366923 1
189 QPCTL 19_32 0 24.512871 0 -2.0303487 2
1949 DMPK 19_32 0 20.465857 0 -1.8090245 1
9633 DMWD 19_32 0 19.545408 0 -1.7547946 1
3742 SYMPK 19_32 0 4.893028 0 -0.0525717 1
8798 MYPOP 19_32 0 21.162302 0 1.8490001 1
1963 CCDC61 19_32 0 21.029796 0 1.8414612 2
3628 HIF3A 19_32 0 20.353083 0 -1.8024680 2
190 PPP5C 19_32 0 13.399291 0 1.3374649 1
8068 CCDC8 19_32 0 7.370076 0 0.7230949 2
9259 PNMAL1 19_32 0 20.576100 0 -1.8154111 4
10636 PNMAL2 19_32 0 5.234058 0 -0.2727077 1
10987 PPP5D1 19_32 0 6.375206 0 -0.5603345 1
6722 CALM3 19_32 0 54.390437 0 3.2242313 2
#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,])
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]
}
This section produces locus plots for all detected genes with PIP>0.8. The highlighted gene at each region is the detected gene.
ctwas_genes <- ctwas_gene_res$genename[ctwas_gene_res$susie_pip>0.8]
for (i in 1:length(ctwas_genes)){
focus <- ctwas_genes[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]
}
#distribution of number of eQTL for all imputed genes (after dropping ambiguous variants)
table(ctwas_gene_res$num_eqtl)
1 2 3 4 5
6546 2969 343 18 5
#all genes with 4+ eQTL
ctwas_gene_res[ctwas_gene_res$num_eqtl>3,]
chrom id pos type region_tag1 region_tag2
9844 3 ENSG00000188086.13 46740510 gene 3 33
9134 3 ENSG00000180376.16 56557027 gene 3 39
5029 4 ENSG00000138744.14 75919602 gene 4 51
7247 4 ENSG00000164111.14 121685788 gene 4 78
10990 6 ENSG00000231852.6 32037872 gene 6 26
9071 6 ENSG00000179344.16 32668036 gene 6 26
3487 7 ENSG00000122674.11 5882180 gene 7 9
10012 7 ENSG00000196247.11 64665954 gene 7 44
2211 9 ENSG00000107099.15 211762 gene 9 1
4762 9 ENSG00000136866.13 113056669 gene 9 58
4471 10 ENSG00000134463.14 11740178 gene 10 10
3819 14 ENSG00000126790.11 59473099 gene 14 27
9407 16 ENSG00000183549.10 20409006 gene 16 19
5257 16 ENSG00000140995.16 89919436 gene 16 54
7821 17 ENSG00000167723.14 3557863 gene 17 3
9025 17 ENSG00000178852.15 47322830 gene 17 27
9306 17 ENSG00000182534.13 76686803 gene 17 43
8576 17 ENSG00000173818.16 80415678 gene 17 45
9259 19 ENSG00000182013.17 46471505 gene 19 32
1478 22 ENSG00000100299.17 50625049 gene 22 24
4430 1 ENSG00000134201.10 109704237 gene 1 67
9605 11 ENSG00000185522.8 559466 gene 11 1
3790 13 ENSG00000126231.13 113146308 gene 13 62
cs_index susie_pip mu2 region_tag PVE genename
9844 0 0.011464097 5.761154 3_33 1.922072e-07 PRSS45
9134 0 0.015798013 6.193569 3_39 2.847500e-07 CCDC66
5029 0 0.010886285 5.921804 4_51 1.876091e-07 NAAA
7247 0 0.022800889 13.333997 4_78 8.847742e-07 ANXA5
10990 0 0.009786222 26.193037 6_26 7.459697e-07 CYP21A2
9071 0 0.003836234 24.369958 6_26 2.720697e-07 HLA-DQB1
3487 0 0.020048702 18.790911 7_9 1.096363e-06 CCZ1
10012 0 0.006302778 6.296022 7_44 1.154831e-07 ZNF107
2211 0 0.016989012 7.465792 9_1 3.691173e-07 DOCK8
4762 0 0.025619873 9.728508 9_58 7.253432e-07 ZFP37
4471 0 0.156534985 33.447394 10_10 1.523681e-05 ECHDC3
3819 0 0.017125210 5.056108 14_27 2.519837e-07 L3HYPDH
9407 0 0.012592154 5.616807 16_19 2.058306e-07 ACSM5
5257 0 0.073369611 20.105227 16_54 4.292848e-06 DEF8
7821 0 0.013985703 8.021455 17_3 3.264809e-07 TRPV3
9025 0 0.013846680 57.243541 17_27 2.306707e-06 EFCAB13
9306 0 0.010333495 5.270104 17_43 1.584845e-07 MXRA7
8576 0 0.013802164 4.895806 17_45 1.966490e-07 ENDOV
9259 0 0.000000000 20.576100 19_32 0.000000e+00 PNMAL1
1478 0 0.012431295 5.366252 22_24 1.941367e-07 ARSA
4430 0 0.016665061 14.852427 1_67 7.203186e-07 GSTM5
9605 0 0.013291879 5.513016 11_1 2.132534e-07 LMNTD2
3790 0 0.019031395 13.234197 13_62 7.329739e-07 PROZ
gene_type z num_eqtl
9844 protein_coding 0.44793194 4
9134 protein_coding -0.92699620 4
5029 protein_coding -0.45129769 4
7247 protein_coding -1.37617072 5
10990 protein_coding 3.53603409 4
9071 protein_coding 5.01066331 4
3487 protein_coding 1.62284981 5
10012 protein_coding -0.52202720 4
2211 protein_coding -0.79491899 5
4762 protein_coding -1.16499741 4
4471 protein_coding 3.24989823 5
3819 protein_coding -0.25254601 4
9407 protein_coding -0.21729721 4
5257 protein_coding 1.97803190 4
7821 protein_coding 0.89399610 4
9025 protein_coding 7.36590043 4
9306 protein_coding -0.27986200 4
8576 protein_coding 0.06847957 4
9259 protein_coding -1.81541107 4
1478 protein_coding 0.08026791 4
4430 protein_coding 2.37982269 5
9605 protein_coding 0.63337315 4
3790 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.60000000 0.31428571 0.08571429
#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
6992 1 ENSG00000162836.11 147646379 gene 1 73
5542 1 ENSG00000143771.11 224356827 gene 1 114
3720 2 ENSG00000125629.14 118088372 gene 2 69
3562 2 ENSG00000123612.15 157625480 gene 2 94
6217 5 ENSG00000152684.10 52787392 gene 5 31
10612 6 ENSG00000204599.14 30324306 gene 6 24
4702 7 ENSG00000136271.10 44575121 gene 7 32
1114 7 ENSG00000087087.18 100875204 gene 7 62
8523 8 ENSG00000173273.15 9315699 gene 8 12
6387 9 ENSG00000155158.20 15280189 gene 9 13
3300 10 ENSG00000119965.12 122945179 gene 10 77
5988 11 ENSG00000149485.18 61829161 gene 11 34
11327 16 ENSG00000261701.6 72063820 gene 16 38
1999 19 ENSG00000105287.12 46713856 gene 19 33
cs_index susie_pip mu2 region_tag PVE genename
6992 1 0.9725331 25.56527 1_73 7.235610e-05 ACP6
5542 1 0.9996422 48.18514 1_114 1.401774e-04 CNIH4
3720 1 0.9997803 62.17379 2_69 1.808974e-04 INSIG2
3562 1 0.9455956 26.22522 2_94 7.216804e-05 ACVR1C
6217 1 0.9674928 71.81942 5_31 2.022134e-04 PELO
10612 1 0.9986727 71.90981 6_24 2.089930e-04 TRIM39
4702 2 0.9758705 58.50014 7_32 1.661382e-04 DDX56
1114 2 0.9333933 32.80410 7_62 8.910727e-05 SRRT
8523 1 0.9844747 73.24908 8_12 2.098587e-04 TNKS
6387 0 0.9354672 22.88090 9_13 6.229051e-05 TTC39B
3300 1 0.8876146 35.59929 10_77 9.195728e-05 C10orf88
5988 1 0.9994871 159.67335 11_34 4.644404e-04 FADS1
11327 1 1.0000000 208.67866 16_38 6.072931e-04 HPR
1999 2 0.9963912 32.34148 19_33 9.377996e-05 PRKD2
gene_type z num_eqtl
6992 protein_coding 4.648193 2
5542 protein_coding 6.721857 2
3720 protein_coding -9.364196 3
3562 protein_coding -4.737778 2
6217 protein_coding 8.426917 2
10612 protein_coding 8.848422 3
4702 protein_coding 9.446271 2
1114 protein_coding 5.547715 2
8523 protein_coding 11.026034 2
6387 protein_coding -4.287139 3
3300 protein_coding -6.634448 2
5988 protein_coding 12.825883 2
11327 protein_coding -17.240252 2
1999 protein_coding 5.289849 2
#reload silver standard genes
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
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,]
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:
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] 11502
png(filename = "output/LDL_manhattan_plot.png", width = 8, height = 5, units = "in", res=150)
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)
nudge_x <- rep(0, sum(don$is_highlight))
names(nudge_x) <- don$gene_name[don$is_highlight]
nudge_x["USP1"] <- 0.2
nudge_y <- rep(0, sum(don$is_highlight))
names(nudge_y) <- don$gene_name[don$is_highlight]
nudge_y["USP1"] <- 0.25
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,
limits=) +
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=2.9,
min.segment.length = 0,
label.size = NA,
fill = alpha(c("white"),0),
max.time=20, max.iter=400000, max.overlaps=12, seed=10,
nudge_x = nudge_x, nudge_y = nudge_y) +
# 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")
dev.off()
png
2
#number of SNPs at PIP>0.8 threshold
sum(out_table$susie_pip>0.8)
[1] 35
#number of SNPs at PIP>0.5 threshold
sum(out_table$susie_pip>0.5)
[1] 60
#genes with PIP>0.8
head(out_table[order(-out_table$susie_pip),report_cols], sum(out_table$susie_pip>0.8))
genename region_tag susie_pip z num_eqtl silver
4433 PSRC1 1_67 1.0000000 -41.687336 1 FALSE
11327 HPR 16_38 1.0000000 -17.240252 2 FALSE
5561 ABCG8 2_27 0.9999422 -20.293982 1 TRUE
3720 INSIG2 2_69 0.9997803 -9.364196 3 FALSE
5542 CNIH4 1_114 0.9996422 6.721857 2 FALSE
5988 FADS1 11_34 0.9994871 12.825883 2 TRUE
10612 TRIM39 6_24 0.9986727 8.848422 3 FALSE
1999 PRKD2 19_33 0.9963912 5.289849 2 FALSE
7405 ABCA1 9_53 0.9954963 7.982017 1 TRUE
1597 PLTP 20_28 0.9882944 -5.732491 1 TRUE
9365 GAS6 13_62 0.9882298 -8.923688 1 FALSE
8523 TNKS 8_12 0.9844747 11.026034 2 TRUE
7036 INHBB 2_70 0.9823634 -8.518936 1 FALSE
4702 DDX56 7_32 0.9758705 9.446271 2 FALSE
2092 SP4 7_19 0.9755655 10.693191 1 FALSE
6090 CSNK1G3 5_75 0.9742306 9.116291 1 FALSE
6992 ACP6 1_73 0.9725331 4.648193 2 FALSE
6217 PELO 5_31 0.9674928 8.426917 2 FALSE
11257 CYP2A6 19_28 0.9650171 5.407028 1 FALSE
8853 FUT2 19_33 0.9632310 -11.927107 1 FALSE
233 NPC1L1 7_32 0.9616984 -10.761931 1 TRUE
3247 KDSR 18_35 0.9603219 -4.526287 1 FALSE
3562 ACVR1C 2_94 0.9455956 -4.737778 2 FALSE
6774 PKN3 9_66 0.9378574 -6.620563 1 FALSE
6387 TTC39B 9_13 0.9354672 -4.287139 3 FALSE
1114 SRRT 7_62 0.9333933 5.547715 2 FALSE
6953 USP1 1_39 0.8940409 16.258211 1 FALSE
3300 C10orf88 10_77 0.8876146 -6.634448 2 FALSE
9046 KLHDC7A 1_13 0.8395101 4.124187 1 FALSE
8918 CRACR2B 11_1 0.8307262 -3.989585 1 FALSE
9054 SPTY2D1 11_13 0.8249847 -5.557123 1 FALSE
5413 SYTL1 1_19 0.8166110 -3.962854 1 FALSE
8411 POP7 7_62 0.8146972 -5.845258 1 FALSE
6097 ALLC 2_2 0.8129463 4.919066 1 FALSE
3212 CCND2 12_4 0.8045730 -4.065830 1 FALSE
GO_overlap_silver bystander
4433 0 TRUE
11327 4 FALSE
5561 16 FALSE
3720 12 FALSE
5542 1 FALSE
5988 11 FALSE
10612 0 FALSE
1999 4 FALSE
7405 38 FALSE
1597 20 FALSE
9365 14 FALSE
8523 0 FALSE
7036 8 FALSE
4702 0 TRUE
2092 0 FALSE
6090 1 FALSE
6992 5 FALSE
6217 0 FALSE
11257 3 FALSE
8853 0 FALSE
233 11 FALSE
3247 2 FALSE
3562 2 FALSE
6774 0 FALSE
6387 10 FALSE
1114 0 FALSE
6953 0 TRUE
3300 0 FALSE
9046 0 FALSE
8918 0 FALSE
9054 1 FALSE
5413 0 FALSE
8411 0 FALSE
6097 0 FALSE
3212 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
4433 PSRC1 1_67 1.0000000 -41.687336 1 FALSE
11327 HPR 16_38 1.0000000 -17.240252 2 FALSE
5561 ABCG8 2_27 0.9999422 -20.293982 1 TRUE
3720 INSIG2 2_69 0.9997803 -9.364196 3 FALSE
5542 CNIH4 1_114 0.9996422 6.721857 2 FALSE
5988 FADS1 11_34 0.9994871 12.825883 2 TRUE
10612 TRIM39 6_24 0.9986727 8.848422 3 FALSE
1999 PRKD2 19_33 0.9963912 5.289849 2 FALSE
7405 ABCA1 9_53 0.9954963 7.982017 1 TRUE
1597 PLTP 20_28 0.9882944 -5.732491 1 TRUE
9365 GAS6 13_62 0.9882298 -8.923688 1 FALSE
8523 TNKS 8_12 0.9844747 11.026034 2 TRUE
7036 INHBB 2_70 0.9823634 -8.518936 1 FALSE
4702 DDX56 7_32 0.9758705 9.446271 2 FALSE
2092 SP4 7_19 0.9755655 10.693191 1 FALSE
6090 CSNK1G3 5_75 0.9742306 9.116291 1 FALSE
6992 ACP6 1_73 0.9725331 4.648193 2 FALSE
6217 PELO 5_31 0.9674928 8.426917 2 FALSE
11257 CYP2A6 19_28 0.9650171 5.407028 1 FALSE
8853 FUT2 19_33 0.9632310 -11.927107 1 FALSE
233 NPC1L1 7_32 0.9616984 -10.761931 1 TRUE
3247 KDSR 18_35 0.9603219 -4.526287 1 FALSE
3562 ACVR1C 2_94 0.9455956 -4.737778 2 FALSE
6774 PKN3 9_66 0.9378574 -6.620563 1 FALSE
6387 TTC39B 9_13 0.9354672 -4.287139 3 FALSE
1114 SRRT 7_62 0.9333933 5.547715 2 FALSE
6953 USP1 1_39 0.8940409 16.258211 1 FALSE
3300 C10orf88 10_77 0.8876146 -6.634448 2 FALSE
9046 KLHDC7A 1_13 0.8395101 4.124187 1 FALSE
8918 CRACR2B 11_1 0.8307262 -3.989585 1 FALSE
9054 SPTY2D1 11_13 0.8249847 -5.557123 1 FALSE
5413 SYTL1 1_19 0.8166110 -3.962854 1 FALSE
8411 POP7 7_62 0.8146972 -5.845258 1 FALSE
6097 ALLC 2_2 0.8129463 4.919066 1 FALSE
3212 CCND2 12_4 0.8045730 -4.065830 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
4433 PSRC1 0 TRUE
11327 HPR 4 FALSE
5561 ABCG8 16 FALSE
3720 INSIG2 12 FALSE
5542 CNIH4 1 FALSE
5988 FADS1 11 FALSE
10612 TRIM39 0 FALSE
1999 PRKD2 4 FALSE
7405 ABCA1 38 FALSE
1597 PLTP 20 FALSE
9365 GAS6 14 FALSE
8523 TNKS 0 FALSE
7036 INHBB 8 FALSE
4702 DDX56 0 TRUE
2092 SP4 0 FALSE
6090 CSNK1G3 1 FALSE
6992 ACP6 5 FALSE
6217 PELO 0 FALSE
11257 CYP2A6 3 FALSE
8853 FUT2 0 FALSE
233 NPC1L1 11 FALSE
3247 KDSR 2 FALSE
3562 ACVR1C 2 FALSE
6774 PKN3 0 FALSE
6387 TTC39B 10 FALSE
1114 SRRT 0 FALSE
6953 USP1 0 TRUE
3300 C10orf88 0 FALSE
9046 KLHDC7A 0 FALSE
8918 CRACR2B 0 FALSE
9054 SPTY2D1 1 FALSE
5413 SYTL1 0 FALSE
8411 POP7 0 FALSE
6097 ALLC 0 FALSE
3212 CCND2 0 FALSE
TNKS is a silver standard (assumed true positive gene) that is correctly detected. The bystander gene RP11-115J16.2 is significant using TWAS but has low PIP using cTWAS.
#TNKS gene
locus_plot4("8_12", label="cTWAS")
out_table[out_table$region_tag=="8_12",report_cols[-(7:8)]]
genename region_tag susie_pip z num_eqtl silver
8523 TNKS 8_12 0.9844747 11.02603 2 TRUE
out_table[out_table$region_tag=="8_12",report_cols[c(1,7:8)]]
genename GO_overlap_silver bystander
8523 TNKS 0 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")
out_table[out_table$region_tag=="11_34",report_cols[-(7:8)]]
genename region_tag susie_pip z num_eqtl silver
9952 FAM111B 11_34 0.005221610 -0.130372989 1 FALSE
7657 FAM111A 11_34 0.007702534 0.788300174 2 FALSE
2444 DTX4 11_34 0.005257276 0.272926929 2 FALSE
10233 MPEG1 11_34 0.005294591 0.288859011 1 FALSE
7679 PATL1 11_34 0.071519692 3.303999343 2 FALSE
7682 STX3 11_34 0.005161056 0.001285218 2 FALSE
7683 MRPL16 11_34 0.007921287 0.989371951 2 FALSE
5994 MS4A2 11_34 0.009774821 -1.135206653 1 FALSE
2453 MS4A6A 11_34 0.005834704 0.544252801 1 FALSE
10858 MS4A4E 11_34 0.006702028 0.848247159 1 FALSE
7692 MS4A7 11_34 0.005133601 -0.132073393 2 FALSE
7693 MS4A14 11_34 0.029852883 -1.857701655 3 FALSE
2455 CCDC86 11_34 0.006739782 -0.651729299 3 FALSE
2456 PRPF19 11_34 0.010426047 1.430603519 2 FALSE
2457 TMEM109 11_34 0.011902564 1.421831985 1 FALSE
2480 SLC15A3 11_34 0.005506251 0.821410772 1 FALSE
2481 CD5 11_34 0.005288143 0.346138465 1 FALSE
7869 VPS37C 11_34 0.006143699 0.024014132 1 FALSE
7870 VWCE 11_34 0.005532627 -0.638825054 2 FALSE
6898 CYB561A3 11_34 0.006999419 -1.782804562 1 FALSE
5987 TMEM138 11_34 0.006999419 -1.782804562 1 FALSE
9761 TMEM216 11_34 0.005138310 -0.251085346 2 FALSE
5993 CPSF7 11_34 0.006047511 -2.061044578 1 FALSE
11272 RP11-286N22.8 11_34 0.005759527 -0.427047808 1 FALSE
6899 PPP1R32 11_34 0.006257040 -0.382653253 1 FALSE
4506 TMEM258 11_34 0.040683627 -6.946921109 2 FALSE
7950 FEN1 11_34 0.007575672 12.072635202 1 FALSE
4505 FADS2 11_34 0.007575672 12.072635202 1 TRUE
5988 FADS1 11_34 0.999487146 12.825882927 2 TRUE
10926 FADS3 11_34 0.011519846 3.289416818 1 TRUE
7871 BEST1 11_34 0.005504270 -3.744804132 1 FALSE
5991 INCENP 11_34 0.005145157 -0.969291005 2 FALSE
6900 ASRGL1 11_34 0.005292136 -0.250084386 1 FALSE
1196 GANAB 11_34 0.008923829 -8.204723304 1 FALSE
out_table[out_table$region_tag=="11_34",report_cols[c(1,7:8)]]
genename GO_overlap_silver bystander
9952 FAM111B NA FALSE
7657 FAM111A NA FALSE
2444 DTX4 NA FALSE
10233 MPEG1 NA FALSE
7679 PATL1 NA FALSE
7682 STX3 NA FALSE
7683 MRPL16 NA FALSE
5994 MS4A2 NA FALSE
2453 MS4A6A NA FALSE
10858 MS4A4E NA FALSE
7692 MS4A7 NA FALSE
7693 MS4A14 NA FALSE
2455 CCDC86 NA TRUE
2456 PRPF19 NA TRUE
2457 TMEM109 NA TRUE
2480 SLC15A3 NA TRUE
2481 CD5 NA TRUE
7869 VPS37C NA TRUE
7870 VWCE NA TRUE
6898 CYB561A3 NA TRUE
5987 TMEM138 NA TRUE
9761 TMEM216 NA TRUE
5993 CPSF7 NA TRUE
11272 RP11-286N22.8 NA FALSE
6899 PPP1R32 NA TRUE
4506 TMEM258 NA TRUE
7950 FEN1 NA TRUE
4505 FADS2 NA FALSE
5988 FADS1 11 FALSE
10926 FADS3 NA FALSE
7871 BEST1 NA TRUE
5991 INCENP NA TRUE
6900 ASRGL1 NA TRUE
1196 GANAB NA TRUE
#number of significant TWAS genes at this locus
sum(abs(out_table$z[out_table$region_tag=="11_34"])>sig_thresh)
[1] 5
POLK is a gene that is significant using TWAS but not detected using TWAS. cTWAS places a high posterior probability on SNPs are this locus. OpenTargets suggets that the causal gene at this locus is HMGCR (note: different GWAS, similar population), which is not imputed in our dataset. cTWAS selected the variants at this locus because the causal gene is not imputed. Note that MR-JTI claims POLK is causal using their method, and their paper includes a discussion of its potential relevance to LDL.
locus_plot("5_45", label="TWAS")
#locus_plot("5_45", label="TWAS", rerun_ctwas = T)
out_table[out_table$region_tag=="5_45",report_cols[-(7:8)]]
genename region_tag susie_pip z num_eqtl silver
8333 ENC1 5_45 0.001256179 -0.4000089 1 FALSE
7302 GFM2 5_45 0.001601844 -0.4062418 2 FALSE
7301 NSA2 5_45 0.003121693 -2.0511430 3 FALSE
10422 FAM169A 5_45 0.001334034 -0.9826944 2 FALSE
3441 POLK 5_45 0.004675801 17.5157647 1 FALSE
9948 ANKDD1B 5_45 0.004782518 15.0669830 2 FALSE
6183 POC5 5_45 0.004736102 -7.0119331 1 FALSE
11241 AC113404.1 5_45 0.002166590 2.3250769 1 FALSE
5715 IQGAP2 5_45 0.006613243 2.5652287 2 FALSE
7276 F2RL2 5_45 0.001486619 0.5923159 1 FALSE
9198 F2R 5_45 0.002455171 -1.2065901 2 FALSE
7282 F2RL1 5_45 0.013233304 2.2468261 3 FALSE
5716 CRHBP 5_45 0.001496722 -0.6287222 2 FALSE
7283 AGGF1 5_45 0.001412410 -0.5067707 2 FALSE
4312 ZBED3 5_45 0.006837974 -1.8752115 1 FALSE
2729 PDE8B 5_45 0.001368834 0.4406481 3 FALSE
7284 WDR41 5_45 0.001350448 -0.4097230 1 FALSE
4311 AP3B1 5_45 0.005041907 1.7055957 1 FALSE
out_table[out_table$region_tag=="5_45",report_cols[c(1,7:8)]]
genename GO_overlap_silver bystander
8333 ENC1 NA TRUE
7302 GFM2 NA TRUE
7301 NSA2 NA TRUE
10422 FAM169A NA TRUE
3441 POLK NA TRUE
9948 ANKDD1B NA TRUE
6183 POC5 NA TRUE
11241 AC113404.1 NA FALSE
5715 IQGAP2 NA FALSE
7276 F2RL2 NA FALSE
9198 F2R NA FALSE
7282 F2RL1 NA FALSE
5716 CRHBP NA FALSE
7283 AGGF1 NA FALSE
4312 ZBED3 NA FALSE
2729 PDE8B NA FALSE
7284 WDR41 NA FALSE
4311 AP3B1 NA FALSE
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.9962894 0.9239332
#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.3166667
#store sensitivity and specificity calculations for plots
sensitivity_plot <- sensitivity
specificity_plot <- specificity
#precision / PPV by PIP threshold
pip_range <- c(0.5, 0.8, 1)
precision_range <- rep(NA, length(pip_range))
number_detected <- rep(NA, length(pip_range))
for (i in 1:length(pip_range)){
pip_upper <- pip_range[i]
if (i==1){
pip_lower <- 0
} else {
pip_lower <- pip_range[i-1]
}
#assign ctwas genes using PIP threshold
ctwas_genes <- ctwas_gene_res_subset$genename[ctwas_gene_res_subset$susie_pip>=pip_lower]
number_detected[i] <- length(ctwas_genes)
precision_range[i] <- sum(ctwas_genes %in% known_annotations)/length(ctwas_genes)
}
names(precision_range) <- paste0(">= ", c(0, pip_range[-length(pip_range)]))
precision_range <- precision_range*100
precision_range <- c(precision_range, precision["TWAS"]*100)
names(precision_range)[4] <- "TWAS Bonferroni"
number_detected <- c(number_detected, length(twas_genes))
barplot(precision_range, ylim=c(0,100), main="Precision for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% of Detected Genes in Silver Standard")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)
#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)
#false discovery rate by PIP threshold
barplot(100-precision_range, ylim=c(0,100), main="False Discovery Rate for Distinguishing Silver Standard and Bystander Genes", xlab="PIP Threshold for Detection", ylab="% Bystanders in Detected Genes")
abline(h=20, lty=2)
abline(h=40, lty=2)
abline(h=60, lty=2)
abline(h=80, lty=2)
xx <- barplot(100-precision_range, add=T, col=c(rep("darkgrey",3), "white"))
text(x = xx, y = rep(0, length(number_detected)), label = paste0(number_detected, " detected"), pos = 3, cex=0.8)
#text(x = xx, y = precision_range, label = paste0(round(precision_range,1), "%"), pos = 3, cex=0.8, offset = 1.5)
####################
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)
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:
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 |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
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 |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
locus_plot3(focus="KPNB1", region_tag="17_27")
Version | Author | Date |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
locus_plot3(focus="LPIN3", region_tag="20_25")
Version | Author | Date |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
locus_plot3(focus="LIPC", region_tag="15_26")
Version | Author | Date |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
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")
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 |
---|---|---|
299fa01 | wesleycrouse | 2022-06-03 |
save.image(file="workspace.RData")
#load("workspace.RData")
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$tss[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", xlim = c(start, end))
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)
}
}
a <- locus_plot_final(region_tag = "8_12", focus="TNKS", label_genes=c("TNKS"), label_pos=c(3,4), plot_eqtl=c("TNKS"), 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
a[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
8523 8 ENSG00000173273.15 9.555912 gene 8 12
cs_index susie_pip mu2 region_tag PVE genename
8523 1 0.9844747 73.24908 8_12 0.0002098587 TNKS
gene_type z focus PVALUE r2max
8523 protein_coding 11.02603 1 27.54331 1
a <- locus_plot_final(region_tag = "5_45", xlim=c(75,76), return_table=T,
focus="POLK",
label_genes=c("POLK"),
label_pos=c(3),
plot_eqtl=c("POLK"), rerun_ctwas=T, rerun_load_only=F)
2022-06-18 08:32:56 INFO::ctwas started ...
2022-06-18 08:33:18 INFO::LD region file: temp_reg.txt
2022-06-18 08:33:18 INFO::No. LD regions: 1
2022-06-18 08:33:19 INFO::No. regions with at least one SNP/gene for chr1: 0
2022-06-18 08:33:19 INFO::No. regions with at least one SNP/gene for chr1 after merging: 0
2022-06-18 08:33:20 INFO::No. regions with at least one SNP/gene for chr2: 0
2022-06-18 08:33:20 INFO::No. regions with at least one SNP/gene for chr2 after merging: 0
2022-06-18 08:33:21 INFO::No. regions with at least one SNP/gene for chr3: 0
2022-06-18 08:33:21 INFO::No. regions with at least one SNP/gene for chr3 after merging: 0
2022-06-18 08:33:22 INFO::No. regions with at least one SNP/gene for chr4: 0
2022-06-18 08:33:22 INFO::No. regions with at least one SNP/gene for chr4 after merging: 0
2022-06-18 08:33:23 INFO::No. regions with at least one SNP/gene for chr5: 1
2022-06-18 08:33:23 INFO::No. regions with at least one SNP/gene for chr5 after merging: 1
2022-06-18 08:33:24 INFO::No. regions with at least one SNP/gene for chr6: 0
2022-06-18 08:33:24 INFO::No. regions with at least one SNP/gene for chr6 after merging: 0
2022-06-18 08:33:24 INFO::No. regions with at least one SNP/gene for chr7: 0
2022-06-18 08:33:24 INFO::No. regions with at least one SNP/gene for chr7 after merging: 0
2022-06-18 08:33:25 INFO::No. regions with at least one SNP/gene for chr8: 0
2022-06-18 08:33:25 INFO::No. regions with at least one SNP/gene for chr8 after merging: 0
2022-06-18 08:33:26 INFO::No. regions with at least one SNP/gene for chr9: 0
2022-06-18 08:33:26 INFO::No. regions with at least one SNP/gene for chr9 after merging: 0
2022-06-18 08:33:26 INFO::No. regions with at least one SNP/gene for chr10: 0
2022-06-18 08:33:26 INFO::No. regions with at least one SNP/gene for chr10 after merging: 0
2022-06-18 08:33:27 INFO::No. regions with at least one SNP/gene for chr11: 0
2022-06-18 08:33:27 INFO::No. regions with at least one SNP/gene for chr11 after merging: 0
2022-06-18 08:33:27 INFO::No. regions with at least one SNP/gene for chr12: 0
2022-06-18 08:33:27 INFO::No. regions with at least one SNP/gene for chr12 after merging: 0
2022-06-18 08:33:28 INFO::No. regions with at least one SNP/gene for chr13: 0
2022-06-18 08:33:28 INFO::No. regions with at least one SNP/gene for chr13 after merging: 0
2022-06-18 08:33:28 INFO::No. regions with at least one SNP/gene for chr14: 0
2022-06-18 08:33:28 INFO::No. regions with at least one SNP/gene for chr14 after merging: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr15: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr15 after merging: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr16: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr16 after merging: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr17: 0
2022-06-18 08:33:29 INFO::No. regions with at least one SNP/gene for chr17 after merging: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr18: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr18 after merging: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr19: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr19 after merging: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr20: 0
2022-06-18 08:33:30 INFO::No. regions with at least one SNP/gene for chr20 after merging: 0
2022-06-18 08:33:31 INFO::No. regions with at least one SNP/gene for chr21: 0
2022-06-18 08:33:31 INFO::No. regions with at least one SNP/gene for chr21 after merging: 0
2022-06-18 08:33:31 INFO::No. regions with at least one SNP/gene for chr22: 0
2022-06-18 08:33:31 INFO::No. regions with at least one SNP/gene for chr22 after merging: 0
2022-06-18 08:33:31 INFO::Trim regions with SNPs more than Inf
2022-06-18 08:33:31 INFO::Adding R matrix info, as genotype is not given
2022-06-18 08:33:31 INFO::Adding R matrix info for chrom 1
2022-06-18 08:33:31 INFO::Adding R matrix info for chrom 2
2022-06-18 08:33:31 INFO::Adding R matrix info for chrom 3
2022-06-18 08:33:31 INFO::Adding R matrix info for chrom 4
2022-06-18 08:33:31 INFO::Adding R matrix info for chrom 5
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 6
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 7
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 8
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 9
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 10
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 11
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 12
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 13
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 14
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 15
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 16
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 17
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 18
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 19
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 20
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 21
2022-06-18 08:34:10 INFO::Adding R matrix info for chrom 22
2022-06-18 08:34:10 INFO::Run susie for all regions.
2022-06-18 08:34:10 INFO::run iteration 1
2022-06-18 08:37:10 INFO::After iteration 1, gene prior 0.0107025504876252:, SNP prior:0.000171872269389155
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[a$type=="gene",]
chrom id pos type region_tag1 region_tag2 cs_index
5 5 ENSG00000122008.15 75.51176 gene 5 1 0
6 5 ENSG00000189045.13 75.61118 gene 5 1 0
7 5 ENSG00000152359.14 75.71745 gene 5 1 0
susie_pip mu2 genename gene_type z focus PVALUE
5 0.016136381 209.67296 POLK protein_coding 17.515765 1 67.96410
6 0.006714266 136.14423 ANKDD1B protein_coding 15.066983 0 50.57344
7 0.009369588 48.12624 POC5 protein_coding -7.011933 0 11.62884
r2max
5 1.0000000
6 0.7011580
7 -0.1028646
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(3,3,3,3,3),
plot_eqtl=c("PRKD2"))
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 |
---|---|---|
00235c6 | wesleycrouse | 2022-06-17 |
a[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
10198 19 ENSG00000197380.10 46.66118 gene 19 33
1999 19 ENSG00000105287.12 46.71713 gene 19 33
9189 19 ENSG00000181027.10 46.74605 gene 19 33
1219 19 ENSG00000090372.14 46.74699 gene 19 33
1998 19 ENSG00000105281.12 46.78859 gene 19 33
cs_index susie_pip mu2 region_tag PVE genename
10198 0 0.002404202 5.816796 19_33 4.069820e-08 DACT3
1999 2 0.996391159 32.341479 19_33 9.377996e-05 PRKD2
9189 0 0.005984264 24.517325 19_33 4.269767e-07 FKRP
1219 0 0.002711973 6.291820 19_33 4.965717e-08 STRN4
1998 0 0.002996521 8.515921 19_33 7.426244e-08 SLC1A5
gene_type z focus PVALUE r2max
10198 protein_coding -0.78861855 0 0.36619334 -0.08270518
1999 protein_coding 5.28984879 1 6.91215642 1.00000000
9189 protein_coding 3.79057604 0 3.82304590 0.45515720
1219 protein_coding 0.09301084 0 0.03343828 0.15745458
1998 protein_coding -1.27062870 0 0.69066634 -0.38387332
####################
#####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", "strand"), 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"),]
G_list$hgnc_symbol[G_list$hgnc_symbol==""] <- "-"
G_list$tss <- G_list[,c("end_position", "start_position")][cbind(1:nrow(G_list),G_list$strand/2+1.5)]
#####load z scores from the analysis and add positions from the LD reference
load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd"))
# LDR_dir <- "/project2/mstephens/wcrouse/UKB_LDR_0.1/"
# LDR_files <- list.files(LDR_dir)
# LDR_files <- LDR_files[grep(".Rvar" ,LDR_files)]
#
# z_snp$chrom <- as.integer(NA)
# z_snp$pos <- as.integer(NA)
#
# for (i in 1:length(LDR_files)){
# print(i)
#
# LDR_info <- read.table(paste0(LDR_dir, LDR_files[i]), header=T)
# z_snp_index <- which(z_snp$id %in% LDR_info$id)
# z_snp[z_snp_index,c("chrom", "pos")] <- t(sapply(z_snp_index, function(x){unlist(LDR_info[match(z_snp$id[x], LDR_info$id),c("chrom", "pos")])}))
# }
#
# z_snp <- z_snp[,c("id", "z", "chrom","pos")]
# save(z_snp, file=paste0("z_snp_pos_", trait_id, ".RData"))
load(paste0("z_snp_pos_", trait_id, ".RData"))
####################
#identify genes within 500kb of genome-wide significant variant ("nearby")
G_list$nearby <- NA
window_size <- 500000
for (chr in 1:22){
#index genes on chromosome
G_list_index <- which(G_list$chromosome_name==chr)
#subset z_snp to chromosome, then subset to significant genome-wide significant variants
z_snp_chr <- z_snp[z_snp$chrom==chr,,drop=F]
z_snp_chr <- z_snp_chr[abs(z_snp_chr$z)>qnorm(1-(5E-8/2), lower=T),,drop=F]
#iterate over genes on chromsome and check if a genome-wide significant SNP is within the window
for (i in G_list_index){
window_start <- G_list$start_position[i] - window_size
window_end <- G_list$end_position[i] + window_size
G_list$nearby[i] <- any(z_snp_chr$pos>=window_start & z_snp_chr$pos<=window_end)
}
}
####################
#identify genes that are nearest to lead genome-wide significant variant ("nearest")
G_list$nearest <- F
G_list$distance <- Inf
G_list$which_nearest <- NA
window_size <- 500000
n_peaks <- 0
for (chr in 1:22){
#index genes on chromosome
G_list_index <- which(G_list$chromosome_name==chr & G_list$gene_biotype=="protein_coding")
#subset z_snp to chromosome, then subset to significant genome-wide significant variants
z_snp_chr <- z_snp[z_snp$chrom==chr,,drop=F]
z_snp_chr <- z_snp_chr[abs(z_snp_chr$z)>qnorm(1-(5E-8/2), lower=T),,drop=F]
while (nrow(z_snp_chr)>0){
n_peaks <- n_peaks + 1
lead_index <- which.max(abs(z_snp_chr$z))
lead_position <- z_snp_chr$pos[lead_index]
distances <- sapply(G_list_index, function(i){
if (lead_position >= G_list$start_position[i] & lead_position <= G_list$end_position[i]){
distance <- 0
} else {
distance <- min(abs(G_list$start_position[i] - lead_position), abs(G_list$end_position[i] - lead_position))
}
distance
})
min_distance <- min(distances)
G_list$nearest[G_list_index[distances==min_distance]] <- T
nearest_genes <- paste0(G_list$hgnc_symbol[G_list_index[distances==min_distance]], collapse=", ")
update_index <- which(G_list$distance[G_list_index] > distances)
G_list$distance[G_list_index][update_index] <- distances[update_index]
G_list$which_nearest[G_list_index][update_index] <- nearest_genes
window_start <- lead_position - window_size
window_end <- lead_position + window_size
z_snp_chr <- z_snp_chr[!(z_snp_chr$pos>=window_start & z_snp_chr$pos<=window_end),,drop=F]
}
}
G_list$distance[G_list$distance==Inf] <- NA
#report number of GWAS peaks
sum(n_peaks)
[1] 182
library(readxl)
known_annotations <- read_xlsx("data/summary_known_genes_annotations.xlsx", sheet="LDL")
New names:
known_annotations <- unique(known_annotations$`Gene Symbol`)
results_summary <- ctwas_gene_res[ctwas_gene_res$susie_pip>0.8,c("genename", "id", "region_tag", "susie_pip", "z", "num_eqtl")]
names(results_summary)[names(results_summary)=="id"] <- "ensembl_gene_id"
results_summary$ensembl_gene_id <- sapply(results_summary$ensembl_gene_id, function(x){unlist(strsplit(x, split="[.]"))[1]})
results_summary <- cbind(results_summary, G_list[match(results_summary$ensembl_gene_id, G_list$ensembl_gene_id),c("chromosome_name", "start_position", "nearby", "nearest", "distance", "which_nearest")])
names(results_summary)[names(results_summary)=="chromosome_name"] <- "chromosome"
results_summary$known <- results_summary$genename %in% known_annotations
results_summary$twas_fp <- NA
results_summary$gene_nearest_region_peak <- NA
for (i in 1:nrow(results_summary)){
genename <- results_summary$genename[i]
region_tag <- results_summary$region_tag[i]
ctwas_gene_res_subset <- ctwas_gene_res[ctwas_gene_res$region_tag==region_tag & ctwas_gene_res$genename!=genename,]
results_summary$twas_fp[i] <- any(ctwas_gene_res_subset$z > sig_thresh & ctwas_gene_res_subset$susie_pip < 0.8)
ctwas_snp_res_subset <- ctwas_snp_res[ctwas_snp_res$region_tag==region_tag,]
chromosome <- unique(ctwas_snp_res_subset$chrom)
lead_position <- ctwas_snp_res_subset$pos[which.max(abs(ctwas_snp_res_subset$z))]
G_list_index <- which(G_list$chromosome_name==chromosome)
distances <- sapply(G_list_index, function(i){
if (lead_position >= G_list$start_position[i] & lead_position <= G_list$end_position[i]){
distance <- 0
} else {
distance <- min(abs(G_list$start_position[i] - lead_position), abs(G_list$end_position[i] - lead_position))
}
distance
})
results_summary$gene_nearest_region_peak[i] <- paste0(G_list$hgnc_symbol[G_list_index[which(distances==min(distances))]], collapse="; ")
}
####################
#GO enrichment of cTWAS genes
# genes <- results_summary$genename
#
# dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
# GO_enrichment <- enrichr(genes, dbs)
#
# save(GO_enrichment, file=paste0(trait_id, "_enrichment_results.RData"))
####################
#enrichment of silver standard genes
# genes <- known_annotations
#
# dbs <- c("GO_Biological_Process_2021", "GO_Cellular_Component_2021", "GO_Molecular_Function_2021")
# GO_enrichment_silver_standard <- enrichr(genes, dbs)
#
# save(GO_enrichment_silver_standard, file=paste0(trait_id, "silver_standard_enrichment_results.RData"))
####################
#report GO cTWAS
load(paste0(trait_id, "_enrichment_results.RData"))
GO_enrichment <- do.call(rbind, GO_enrichment)
GO_enrichment$db <- sapply(rownames(GO_enrichment), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment) <- NULL
GO_enrichment <- GO_enrichment[GO_enrichment$Adjusted.P.value < 0.05,]
GO_enrichment <- GO_enrichment[order(-GO_enrichment$Odds.Ratio),]
results_summary$GO <- sapply(results_summary$genename, function(x){terms <- GO_enrichment$Term[grep(x, GO_enrichment$Genes)];
if (length(terms)>0){terms <- terms[1:min(length(terms),5)]};
paste0(terms, collapse="; ")})
####################
#report GO silver standard
load(paste0(trait_id, "silver_standard_enrichment_results.RData"))
GO_enrichment_silver_standard <- do.call(rbind, GO_enrichment_silver_standard)
GO_enrichment_silver_standard$db <- sapply(rownames(GO_enrichment_silver_standard), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment_silver_standard) <- NULL
GO_enrichment_silver_standard <- GO_enrichment_silver_standard[GO_enrichment_silver_standard$Adjusted.P.value < 0.05,]
GO_enrichment_silver_standard <- GO_enrichment_silver_standard[order(-GO_enrichment_silver_standard$Odds.Ratio),]
#reload GO cTWAS for GO crosswalk
load(paste0(trait_id, "_enrichment_results.RData"))
GO_enrichment <- do.call(rbind, GO_enrichment)
GO_enrichment$db <- sapply(rownames(GO_enrichment), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment) <- NULL
#overlap between sets
GO_enrichment <- GO_enrichment[GO_enrichment$Term %in% GO_enrichment_silver_standard$Term,,drop=F]
GO_enrichment_silver_standard <- GO_enrichment_silver_standard[GO_enrichment_silver_standard$Term %in% GO_enrichment$Term,,drop=F]
GO_enrichment <- GO_enrichment[match(GO_enrichment_silver_standard$Term, GO_enrichment$Term),]
results_summary$GO_silver <- sapply(results_summary$genename, function(x){terms <- GO_enrichment$Term[grep(x, GO_enrichment$Genes)];
if (length(terms)>0){terms <- terms[1:min(length(terms),5)]};
paste0(terms, collapse="; ")})
####################
#report FUMA
FUMA <- data.table::fread(paste0("/project2/xinhe/shengqian/cTWAS/cTWAS_analysis/data/FUMA_output/", trait_id, "/GS.txt"))
FUMA <- FUMA[FUMA$Category %in% c("GO_bp", "GO_cc", "GO_mf"),,drop=F]
FUMA <- FUMA[order(FUMA$p),]
#reload GO cTWAS for GO crosswalk
load(paste0(trait_id, "_enrichment_results.RData"))
GO_enrichment <- do.call(rbind, GO_enrichment)
GO_enrichment$db <- sapply(rownames(GO_enrichment), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment) <- NULL
GO_enrichment$Term_FUMA <- sapply(GO_enrichment$Term, function(x){rev(rev(unlist(strsplit(x, split=" [(]GO")))[-1])})
GO_enrichment$Term_FUMA <- paste0("GO_", toupper(gsub(" ", "_", GO_enrichment$Term_FUMA)))
#overlap between sets
GO_enrichment <- GO_enrichment[GO_enrichment$Term_FUMA %in% FUMA$GeneSet,,drop=F]
FUMA <- FUMA[FUMA$GeneSet %in% GO_enrichment$Term_FUMA]
GO_enrichment <- GO_enrichment[match(FUMA$GeneSet, GO_enrichment$Term_FUMA),]
results_summary$GO_MAGMA <- sapply(results_summary$genename, function(x){terms <- GO_enrichment$Term[grep(x, GO_enrichment$Genes)];
if (length(terms)>0){terms <- terms[1:min(length(terms),5)]};
paste0(terms, collapse="; ")})
####################
#report FUMA + susieGO
gsesusie <- as.data.frame(readxl::read_xlsx("gsesusie_enrichment.xlsx", sheet=trait_id))
gsesusie$GeneSet <- paste0("(", gsesusie$GeneSet, ")")
#reload GO cTWAS for GO crosswalk
load(paste0(trait_id, "_enrichment_results.RData"))
GO_enrichment <- do.call(rbind, GO_enrichment)
GO_enrichment$db <- sapply(rownames(GO_enrichment), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment) <- NULL
GO_enrichment$GeneSet <- sapply(GO_enrichment$Term, function(x){rev(unlist(strsplit(x, " ")))[1]})
#overlap between sets
GO_enrichment <- GO_enrichment[GO_enrichment$GeneSet %in% gsesusie$GeneSet,,drop=F]
gsesusie <- gsesusie[gsesusie$GeneSet %in% GO_enrichment$GeneSet,,drop=F]
GO_enrichment <- GO_enrichment[match(gsesusie$GeneSet, GO_enrichment$GeneSet),]
results_summary$GO_MAGMA_SuSiE <- sapply(results_summary$genename, function(x){terms <- GO_enrichment$Term[grep(x, GO_enrichment$Genes)];
if (length(terms)>0){terms <- terms[1:min(length(terms),5)]};
paste0(terms, collapse="; ")})
write.csv(results_summary, file=paste0("results_summary_LDL_cholesterol.csv"))
library(dplyr, ev)
slimGO_modified <-
function (GO = GO, tool = c("enrichR", "rGREAT", "GOfuncR"),
annoDb = annoDb, plots = FALSE, threshold = 0.7, pval=0.05)
{
if (tool == "enrichR") {
GO <- GO %>% data.table::rbindlist(idcol = "Gene Ontology") %>%
dplyr::as_tibble() %>% dplyr::filter(`Gene Ontology` %in%
c("GO_Biological_Process_2021", "GO_Cellular_Component_2021",
"GO_Molecular_Function_2021")) %>% dplyr::mutate(Term = stringr::str_extract(.$Term,
"\\(GO.*")) %>% dplyr::mutate(Term = stringr::str_replace_all(.$Term,
"[//(//)]", ""), "") %>% dplyr::mutate(`Gene Ontology` = dplyr::case_when(`Gene Ontology` ==
"GO_Biological_Process_2021" ~ "BP", `Gene Ontology` ==
"GO_Cellular_Component_2021" ~ "CC", `Gene Ontology` ==
"GO_Molecular_Function_2021" ~ "MF")) %>% dplyr::select(p = P.value,
go = Term, "Gene Ontology") %>% dplyr::filter(p <=
pval)
}
else if (tool == "rGREAT") {
GO <- GO %>% data.table::rbindlist(idcol = "Gene Ontology") %>%
dplyr::as_tibble() %>% dplyr::mutate(`Gene Ontology` = dplyr::case_when(`Gene Ontology` ==
"GO Biological Process" ~ "BP", `Gene Ontology` ==
"GO Cellular Component" ~ "CC", `Gene Ontology` ==
"GO Molecular Function" ~ "MF")) %>% dplyr::select(p = Hyper_Raw_PValue,
go = ID, "Gene Ontology") %>% dplyr::filter(p <= pval)
}
else if (tool == "GOfuncR") {
GO <- GO$results %>% dplyr::as_tibble() %>% dplyr::mutate(`Gene Ontology` = dplyr::case_when(ontology ==
"biological_process" ~ "BP", ontology == "cellular_component" ~
"CC", ontology == "molecular_function" ~ "MF")) %>%
dplyr::select(p = raw_p_overrep, go = node_id, "Gene Ontology") %>%
dplyr::filter(p <= pval)
}
else {
stop(glue("{tool} is not supported, please choose either enrichR, rGREAT, or GOfuncR [Case Sensitive]"))
}
print(glue::glue("Submiting results from {tool} to rrvgo..."))
.slim <- function(GO = GO, ont = ont, annoDb = annoDb, plots = plots,
tool = tool, threshold = threshold) {
GO <- GO %>% dplyr::filter(`Gene Ontology` == ont)
print(glue::glue("rrvgo is now slimming {ont} GO terms from {tool}"))
simMatrix <- rrvgo::calculateSimMatrix(GO$go, orgdb = annoDb,
ont = ont, method = "Rel")
reducedTerms <- rrvgo::reduceSimMatrix(simMatrix, setNames(-log10(GO$p),
GO$go), threshold = threshold, orgdb = annoDb)
if (plots == TRUE) {
p <- rrvgo::scatterPlot(simMatrix, reducedTerms)
plot(p)
rrvgo::treemapPlot(reducedTerms)
}
print(glue::glue("There are {max(reducedTerms$cluster)} clusters in your GO {ont} terms from {tool}"))
reducedTerms %>% dplyr::as_tibble() %>% return()
}
# slimmed <- GO %>% dplyr::select(`Gene Ontology`) %>% table() %>%
# names() %>% purrr::set_names() %>% purrr::map_dfr(~.slim(GO = GO,
# ont = ., annoDb = annoDb, tool = tool, plots = plots,
# threshold = threshold), .id = "Gene Ontology") %>% dplyr::inner_join(GO) %>%
# dplyr::filter(term == as.character(parentTerm)) %>% dplyr::mutate(`-log10.p-value` = -log10(p)) %>%
# dplyr::mutate(`Gene Ontology` = dplyr::recode_factor(`Gene Ontology`,
# BP = "Biological Process", CC = "Cellular Component",
# MF = "Molecular Function")) %>% dplyr::arrange(dplyr::desc(`-log10.p-value`)) %>%
# dplyr::select("Gene Ontology", Term = term, "-log10.p-value") %>%
# return()
slimmed <- GO %>% dplyr::select(`Gene Ontology`) %>% table() %>%
names() %>% purrr::set_names() %>% purrr::map_dfr(~.slim(GO = GO,
ont = ., annoDb = annoDb, tool = tool, plots = plots,
threshold = threshold), .id = "Gene Ontology") %>% dplyr::inner_join(GO) %>%
dplyr::filter(term == as.character(parentTerm)) %>% dplyr::mutate(`-log10.p-value` = -log10(p)) %>%
dplyr::mutate(`Gene Ontology` = dplyr::recode_factor(`Gene Ontology`,
BP = "Biological Process", CC = "Cellular Component",
MF = "Molecular Function")) %>% dplyr::arrange(dplyr::desc(`-log10.p-value`)) %>%
return()
}
load(paste0(trait_id, "_enrichment_results.RData"))
GO_enrichment_slim <- slimGO_modified(GO=GO_enrichment, tool="enrichR",annoDb = "org.Hs.eg.db", plots=T)
GO_enrichment <- do.call(rbind, GO_enrichment)
GO_enrichment$db <- sapply(rownames(GO_enrichment), function(x){unlist(strsplit(x, split="[.]"))[1]})
rownames(GO_enrichment) <- NULL
#save.image(file="workspace8.RData")
#load("workspace8.RData")
sqlite <- RSQLite::dbDriver("SQLite")
db = RSQLite::dbConnect(sqlite, "/project2/mstephens/wcrouse/predictdb/mashr_Liver_nolnc.db")
query <- function(...) RSQLite::dbGetQuery(db, ...)
weights_table <- query("select * from weights")
extra_table <- query("select * from extra")
RSQLite::dbDisconnect(db)
a <- locus_plot_final(region_tag="16_38", xlim=c(71.6,72.4), return_table=T,
focus="HPR",
label_genes=c("MARVELD3", "PHLPP2", "ATXN1L", "ZNF821", "PKD1L3", "HPR"),
label_pos=c(3,3,3,3,3,3),
plot_eqtl=c("HPR"),
label_panel="cTWAS")
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[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
5234 16 ENSG00000140832.9 71.62616 gene 16 38
366 16 ENSG00000040199.18 71.72470 gene 16 38
10944 16 ENSG00000224470.7 71.80844 gene 16 38
1752 16 ENSG00000102984.14 71.89534 gene 16 38
11471 16 ENSG00000277481.1 72.00040 gene 16 38
11327 16 ENSG00000261701.6 72.06315 gene 16 38
cs_index susie_pip mu2 region_tag PVE genename
5234 0 0.003606116 21.34212 16_38 2.239739e-07 MARVELD3
366 0 0.005990474 51.79995 16_38 9.030481e-07 PHLPP2
10944 0 0.002687601 56.83691 16_38 4.445449e-07 ATXN1L
1752 0 0.002687005 46.09553 16_38 3.604521e-07 ZNF821
11471 0 0.003774771 98.95883 16_38 1.087090e-06 PKD1L3
11327 1 1.000000000 208.67866 16_38 6.072931e-04 HPR
gene_type z focus PVALUE r2max
5234 protein_coding -2.077911 0 1.423456 0.1498616
366 protein_coding -7.224850 0 12.299594 0.1923113
10944 protein_coding -8.126354 0 15.354187 0.1401373
1752 protein_coding 7.585503 0 13.479911 -0.1170924
11471 protein_coding 4.998967 0 6.239288 -0.4999607
11327 protein_coding -17.240252 1 65.877923 1.0000000
weights_table[weights_table$gene=="ENSG00000261701.6",]
gene rsid varID ref_allele
4681 ENSG00000261701.6 rs150367531 chr16_72063820_G_A_b38 G
4682 ENSG00000261701.6 rs3794695 chr16_72063928_C_T_b38 C
eff_allele weight
4681 A 0.1985749
4682 T -0.2215523
a[a$id %in% c("rs150367531", "rs3794695"),]
chrom id pos type region_tag1 region_tag2 cs_index
1067534 16 rs150367531 72.06382 SNP 16 38 0
1067536 16 rs3794695 72.06393 SNP 16 38 0
susie_pip mu2 region_tag PVE genename gene_type
1067534 8.310450e-05 82.84867 16_38 2.003689e-08 <NA> <NA>
1067536 9.362261e-05 130.15248 16_38 3.546121e-08 <NA> <NA>
z focus PVALUE r2max
1067534 8.241055 0 15.76777 -0.6969484
1067536 -16.590426 0 61.08757 0.7660778
a <- locus_plot_final(region_tag="1_114", xlim=c(224,225), return_table=T,
focus="CNIH4",
label_genes=c("CNIH4"),
label_pos=c(3),
plot_eqtl=c("CNIH4"))
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[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
5540 1 ENSG00000143756.11 224.1141 gene 1 114
5537 1 ENSG00000143748.17 224.3302 gene 1 114
5542 1 ENSG00000143771.11 224.3569 gene 1 114
7009 1 ENSG00000162923.14 224.4370 gene 1 114
cs_index susie_pip mu2 region_tag PVE genename
5540 0 0.009319258 6.167836 1_114 1.672763e-07 FBXO28
5537 0 0.009162860 7.076180 1_114 1.886906e-07 NVL
5542 1 0.999642168 48.185144 1_114 1.401774e-04 CNIH4
7009 0 0.009710816 31.078528 1_114 8.782870e-07 WDR26
gene_type z focus PVALUE r2max
5540 protein_coding 0.9428678 0 0.4612397 0.1955294
5537 protein_coding 1.4471149 0 0.8301354 0.2588390
5542 protein_coding 6.7218574 1 10.7461231 1.0000000
7009 protein_coding 5.1224937 0 6.5206821 0.8486802
weights_table[weights_table$gene=="ENSG00000143771.11",]
gene rsid varID ref_allele
10583 ENSG00000143771.11 rs7517754 chr1_224356827_A_G_b38 A
10584 ENSG00000143771.11 rs56105022 chr1_224357044_G_A_b38 G
eff_allele weight
10583 G 0.5299067
10584 A -0.2994661
a[a$id %in% c("rs7517754", "rs56105022"),]
chrom id pos type region_tag1 region_tag2 cs_index
890781 1 rs7517754 224.3568 SNP 1 114 0
890782 1 rs56105022 224.3570 SNP 1 114 0
susie_pip mu2 region_tag PVE genename gene_type
890781 0.0002945536 28.24808 1_114 2.421439e-08 <NA> <NA>
890782 0.0004019460 18.11944 1_114 2.119497e-08 <NA> <NA>
z focus PVALUE r2max
890781 -5.262792 0 6.848066 -0.8579177
890782 3.691305 0 3.651489 0.4164712
a <- locus_plot_final(region_tag="2_94", xlim=c(157.4, NA), return_table=T,
focus="ACVR1C",
label_genes=c("ACVR1C, CYTIP"),
label_pos=c(3,3),
plot_eqtl=c("ACVR1C"))
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[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
2882 2 ENSG00000115165.9 157.4890 gene 2 94
3562 2 ENSG00000123612.15 157.6289 gene 2 94
cs_index susie_pip mu2 region_tag PVE genename
2882 0 0.04567228 23.67603 2_94 3.146892e-06 CYTIP
3562 1 0.94559564 26.22522 2_94 7.216804e-05 ACVR1C
gene_type z focus PVALUE r2max
2882 protein_coding 2.307489 0 1.677211 -0.02666691
3562 protein_coding -4.737778 1 5.665397 1.00000000
weights_table[weights_table$gene=="ENSG00000123612.15",]
gene rsid varID ref_allele
11395 ENSG00000123612.15 rs10164853 chr2_157625480_A_G_b38 A
11396 ENSG00000123612.15 rs114245489 chr2_157628563_G_T_b38 G
eff_allele weight
11395 G 0.16808705
11396 T -0.01849397
a[a$id %in% c("rs10164853", "rs114245489"),]
chrom id pos type region_tag1 region_tag2 cs_index
920769 2 rs10164853 157.6255 SNP 2 94 0
920774 2 rs114245489 157.6286 SNP 2 94 0
susie_pip mu2 region_tag PVE genename gene_type
920769 0.00337613 20.16518 2_94 1.981260e-07 <NA> <NA>
920774 0.02009576 50.23066 2_94 2.937606e-06 <NA> <NA>
z focus PVALUE r2max
920769 4.350108 0 4.866237 -0.9941554
920774 -4.185879 0 4.546583 0.1929425
a <- locus_plot_final(region_tag="2_70", xlim=c(119, 121), return_table=T,
focus="INHBB",
label_genes=c("INHBB"),
label_pos=c(3),
plot_eqtl=c("INHBB"))
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 |
---|---|---|
00235c6 | wesleycrouse | 2022-06-17 |
a[a$type=="gene",]
chrom id pos type region_tag1 region_tag2
7036 2 ENSG00000163083.5 120.3461 gene 2 70
803 2 ENSG00000074047.21 120.7356 gene 2 70
cs_index susie_pip mu2 region_tag PVE genename
7036 1 0.98236339 73.742606 2_70 2.108196e-04 INHBB
803 0 0.01074428 4.946247 2_70 1.546584e-07 GLI2
gene_type z focus PVALUE r2max
7036 protein_coding -8.518936 1 16.79310307 1.00000000
803 protein_coding -0.209499 0 0.07880339 0.03383016
a <- locus_plot_final(region_tag="2_69", return_table=T,
focus="INSIG2",
label_genes=c("INSIG2"),
label_pos=c(3),
plot_eqtl=c("INSIG2"))
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.9 purrr_0.3.4 readr_1.4.0
[7] tidyr_1.1.0 tidyverse_1.3.0 tibble_3.1.7
[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.5.2 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.2 bit_4.0.4
[19] curl_3.3 compiler_3.6.1 git2r_0.26.1
[22] cli_3.3.0 rvest_0.3.5 logging_0.10-108
[25] Cairo_1.5-12.2 xml2_1.3.2 labeling_0.3
[28] scales_1.2.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.5.2 dbplyr_1.4.2
[37] fastmap_1.1.0 rlang_1.0.2 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.3
[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.1 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.7.0 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.6.2
[76] evaluate_0.14 data.table_1.14.0 modelr_0.1.8
[79] vctrs_0.4.1 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