Last updated: 2021-09-09

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 59e5f4d. 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:


Unstaged changes:
    Modified:   analysis/ukb-d-30500_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30500_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30600_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30600_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30610_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30610_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30620_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30620_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30630_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30630_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30640_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30640_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30650_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30650_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30660_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30660_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30670_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30670_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30680_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30690_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30690_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30700_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30700_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30710_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30710_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30720_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30720_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30730_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30740_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30740_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30750_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30750_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30760_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30760_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30770_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30770_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30780_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30780_irnt_Whole_Blood.Rmd
    Modified:   analysis/ukb-d-30790_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30800_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30810_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30820_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30830_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30840_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30850_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30860_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30870_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30880_irnt_Liver.Rmd
    Modified:   analysis/ukb-d-30890_irnt_Liver.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_Whole_Blood.Rmd) and HTML (docs/ukb-d-30780_irnt_Whole_Blood.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd cbf7408 wesleycrouse 2021-09-08 adding enrichment to reports
html cbf7408 wesleycrouse 2021-09-08 adding enrichment to reports
Rmd 4970e3e wesleycrouse 2021-09-08 updating reports
html 4970e3e wesleycrouse 2021-09-08 updating reports
Rmd dfd2b5f wesleycrouse 2021-09-07 regenerating reports
html dfd2b5f wesleycrouse 2021-09-07 regenerating reports
Rmd 61b53b3 wesleycrouse 2021-09-06 updated PVE calculation
html 61b53b3 wesleycrouse 2021-09-06 updated PVE calculation
Rmd 837dd01 wesleycrouse 2021-09-01 adding additional fixedsigma report
Rmd d0a5417 wesleycrouse 2021-08-30 adding new reports to the index
Rmd 0922de7 wesleycrouse 2021-08-18 updating all reports with locus plots
html 0922de7 wesleycrouse 2021-08-18 updating all reports with locus plots
html 1c62980 wesleycrouse 2021-08-11 Updating reports
Rmd 5981e80 wesleycrouse 2021-08-11 Adding more reports
html 5981e80 wesleycrouse 2021-08-11 Adding more reports
Rmd da9f015 wesleycrouse 2021-08-07 adding more reports
html da9f015 wesleycrouse 2021-08-07 adding more reports
Rmd 4068e9b wesleycrouse 2021-07-29 finalizing automation
Rmd 0e62fa9 wesleycrouse 2021-07-29 Automating reports

Overview

These are the results of a ctwas analysis of the UK Biobank trait LDL direct (quantile) using Whole_Blood 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 Whole_Blood eQTL obtained from PredictDB. We performed a full harmonization of the variants, including recovering strand ambiguous variants. This procedure is discussed in a separate document. (TO-DO: add report that describes harmonization)

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

Weight QC

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

qclist_all <- list()

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

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

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

rm(qclist, wgtlist, z_gene_chr)

#number of imputed weights
nrow(qclist_all)
[1] 11095
#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 
1129  747  624  400  479  621  560  383  404  430  682  652  192  362  331 
  16   17   18   19   20   21   22 
 551  725  159  911  313  130  310 
#proportion of imputed weights without missing variants
mean(qclist_all$nmiss==0)
[1] 0.762776

Load ctwas results

#load ctwas results
ctwas_res <- data.table::fread(paste0(results_dir, "/", analysis_id, "_ctwas.susieIrss.txt"))

#make unique identifier for regions
ctwas_res$region_tag <- paste(ctwas_res$region_tag1, ctwas_res$region_tag2, sep="_")

#compute PVE for each gene/SNP
ctwas_res$PVE = ctwas_res$susie_pip*ctwas_res$mu2/sample_size #check PVE calculation

#separate gene and SNP results
ctwas_gene_res <- ctwas_res[ctwas_res$type == "gene", ]
ctwas_gene_res <- data.frame(ctwas_gene_res)
ctwas_snp_res <- ctwas_res[ctwas_res$type == "SNP", ]
ctwas_snp_res <- data.frame(ctwas_snp_res)

#add gene information to results
sqlite <- RSQLite::dbDriver("SQLite")
db = RSQLite::dbConnect(sqlite, paste0("/project2/compbio/predictdb/mashr_models/mashr_", weight, ".db"))
query <- function(...) RSQLite::dbGetQuery(db, ...)
gene_info <- query("select gene, genename from extra")
gene_info <- query("select gene, genename, gene_type from extra")
RSQLite::dbDisconnect(db)

ctwas_gene_res <- cbind(ctwas_gene_res, gene_info[sapply(ctwas_gene_res$id, match, gene_info$gene), c("genename", "gene_type")])

#add z score to results
load(paste0(results_dir, "/", analysis_id, "_expr_z_gene.Rd"))
ctwas_gene_res$z <- z_gene[ctwas_gene_res$id,]$z

#load(paste0(results_dir, "/", analysis_id, "_expr_z_snp.Rd")) #for new version, stored after harmonization
z_snp <- readRDS(paste0(results_dir, "/", trait_id, ".RDS")) #for old version, unharmonized

z_snp <- z_snp[z_snp$id %in% ctwas_snp_res$id,] #subset snps to those included in analysis, note some are duplicated, need to match which allele was used
ctwas_snp_res$z <- z_snp$z[match(ctwas_snp_res$id, z_snp$id)] #for duplicated snps, this arbitrarily uses the first allele
ctwas_snp_res$z_flag <- as.numeric(ctwas_snp_res$id %in% z_snp$id[duplicated(z_snp$id)]) #mark the unclear z scores, flag=1

#formatting and rounding for tables
ctwas_gene_res$z <- round(ctwas_gene_res$z,2)
ctwas_snp_res$z <- round(ctwas_snp_res$z,2)
ctwas_gene_res$susie_pip <- round(ctwas_gene_res$susie_pip,3)
ctwas_snp_res$susie_pip <- round(ctwas_snp_res$susie_pip,3)
ctwas_gene_res$mu2 <- round(ctwas_gene_res$mu2,2)
ctwas_snp_res$mu2 <- round(ctwas_snp_res$mu2,2)
ctwas_gene_res$PVE <- signif(ctwas_gene_res$PVE, 2)
ctwas_snp_res$PVE <- signif(ctwas_snp_res$PVE, 2)

#merge gene and snp results with added information
ctwas_gene_res$z_flag=NA
ctwas_snp_res$genename=NA
ctwas_snp_res$gene_type=NA

ctwas_res <- rbind(ctwas_gene_res,
                   ctwas_snp_res[,colnames(ctwas_gene_res)])

#store columns to report
report_cols <- colnames(ctwas_gene_res)[!(colnames(ctwas_gene_res) %in% c("type", "region_tag1", "region_tag2", "cs_index", "gene_type", "z_flag", "id", "chrom", "pos"))]
first_cols <- c("genename", "region_tag")
report_cols <- c(first_cols, report_cols[!(report_cols %in% first_cols)])

report_cols_snps <- c("id", report_cols[-1])

#get number of SNPs from s1 results; adjust for thin
ctwas_res_s1 <- data.table::fread(paste0(results_dir, "/", analysis_id, "_ctwas.s1.susieIrss.txt"))
n_snps <- sum(ctwas_res_s1$type=="SNP")/thin
rm(ctwas_res_s1)

Check convergence of parameters

library(ggplot2)
library(cowplot)

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

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

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

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

plot_grid(p_pi, p_sigma2)

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#estimated group prior
estimated_group_prior <- group_prior_rec[,ncol(group_prior_rec)]
names(estimated_group_prior) <- c("gene", "snp")
estimated_group_prior["snp"] <- estimated_group_prior["snp"]*thin #adjust parameter to account for thin argument
print(estimated_group_prior)
        gene          snp 
0.0022909820 0.0001025144 
#estimated group prior variance
estimated_group_prior_var <- group_prior_var_rec[,ncol(group_prior_var_rec)]
names(estimated_group_prior_var) <- c("gene", "snp")
print(estimated_group_prior_var)
     gene       snp 
188.10618  26.40187 
#report sample size
print(sample_size)
[1] 343621
#report group size
group_size <- c(nrow(ctwas_gene_res), n_snps)
print(group_size)
[1]   11095 8697330
#estimated group PVE
estimated_group_pve <- estimated_group_prior_var*estimated_group_prior*group_size/sample_size #check PVE calculation
names(estimated_group_pve) <- c("gene", "snp")
print(estimated_group_pve)
      gene        snp 
0.01391465 0.06850552 
#compare sum(PIP*mu2/sample_size) with above PVE calculation
c(sum(ctwas_gene_res$PVE),sum(ctwas_snp_res$PVE))
[1] 0.01390607 0.42873726

Genes with highest PIPs

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

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#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
8166       PCSK9       1_34     1.000  165.35 4.8e-04  21.99
4564       PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
4151        LDLR       19_9     1.000  653.66 1.9e-03 -24.71
5665       CNIH4      1_114     0.999   50.71 1.5e-04   6.79
6892        PKN3       9_66     0.976   53.27 1.5e-04  -6.97
5839       TIMD4       5_92     0.960  189.84 5.3e-04  13.88
7128        ACP6       1_73     0.924   27.03 7.3e-05   4.67
7089        USP1       1_39     0.862  265.34 6.7e-04  16.26
4096       MPDU1       17_7     0.796   28.39 6.6e-05   4.63
7462       DAGLB        7_9     0.792   32.03 7.4e-05   5.20
12535     PKD1L3      16_38     0.782  144.07 3.3e-04  -3.78
6089       FADS1      11_34     0.739  160.92 3.5e-04 -12.59
10343      ZFP28      19_38     0.733   31.66 6.7e-05  -5.16
9109     CD163L1       12_7     0.636   26.92 5.0e-05  -4.67
11362 AC011747.3        2_6     0.583   26.76 4.5e-05   4.56
12392   HIST1H4K       6_21     0.544   34.81 5.5e-05   3.59
1975       SARS2      19_26     0.523   26.48 4.0e-05   4.48
9198       GRINA       8_94     0.499   49.27 7.2e-05  -6.68
405        ADRB1      10_71     0.490   42.70 6.1e-05  -6.18
3979        VIL1      2_129     0.464   30.46 4.1e-05   4.73

Genes with largest effect sizes

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

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#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
4691          SRPK2       7_65     0.000 3464.46 0.0e+00  -1.72
73            KMT2E       7_65     0.000 2120.21 0.0e+00  -0.10
11489 RP11-325F22.2       7_65     0.000 2089.28 0.0e+00   0.70
11441         APOC2      19_31     0.000 1857.93 9.6e-09  45.63
4564          PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
4151           LDLR       19_9     1.000  653.66 1.9e-03 -24.71
4137           MAU2      19_15     0.004  358.06 4.1e-06  18.78
331            SARS       1_67     0.002  346.85 1.6e-06 -18.23
7089           USP1       1_39     0.862  265.34 6.7e-04  16.26
2131        ATP13A1      19_15     0.012  265.32 9.0e-06 -16.07
4159        NECTIN2      19_31     0.000  264.46 1.6e-09  16.37
3102          DOCK7       1_39     0.001  225.94 6.0e-07  14.99
5562         CELSR2       1_67     0.001  196.05 5.7e-07  13.74
7053           BSND       1_34     0.000  190.03 1.3e-10  21.19
5839          TIMD4       5_92     0.960  189.84 5.3e-04  13.88
8166          PCSK9       1_34     1.000  165.35 4.8e-04  21.99
6089          FADS1      11_34     0.739  160.92 3.5e-04 -12.59
5511         TIMM29       19_9     0.000  158.82 0.0e+00 -10.55
2496           ZPR1      11_70     0.017  157.03 7.9e-06 -11.85
12254  CTC-366B18.4       5_44     0.001  155.22 2.3e-07 -15.55

Genes with highest PVE

#genes with 20 highest pve
head(ctwas_gene_res[order(-ctwas_gene_res$PVE),report_cols],20)
        genename region_tag susie_pip     mu2     PVE      z
4564       PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
4151        LDLR       19_9     1.000  653.66 1.9e-03 -24.71
7089        USP1       1_39     0.862  265.34 6.7e-04  16.26
5839       TIMD4       5_92     0.960  189.84 5.3e-04  13.88
8166       PCSK9       1_34     1.000  165.35 4.8e-04  21.99
6089       FADS1      11_34     0.739  160.92 3.5e-04 -12.59
12535     PKD1L3      16_38     0.782  144.07 3.3e-04  -3.78
5665       CNIH4      1_114     0.999   50.71 1.5e-04   6.79
6892        PKN3       9_66     0.976   53.27 1.5e-04  -6.97
7462       DAGLB        7_9     0.792   32.03 7.4e-05   5.20
7128        ACP6       1_73     0.924   27.03 7.3e-05   4.67
9198       GRINA       8_94     0.499   49.27 7.2e-05  -6.68
10343      ZFP28      19_38     0.733   31.66 6.7e-05  -5.16
4096       MPDU1       17_7     0.796   28.39 6.6e-05   4.63
405        ADRB1      10_71     0.490   42.70 6.1e-05  -6.18
12392   HIST1H4K       6_21     0.544   34.81 5.5e-05   3.59
9109     CD163L1       12_7     0.636   26.92 5.0e-05  -4.67
11362 AC011747.3        2_6     0.583   26.76 4.5e-05   4.56
3979        VIL1      2_129     0.464   30.46 4.1e-05   4.73
1975       SARS2      19_26     0.523   26.48 4.0e-05   4.48

Genes with largest z scores

#genes with 20 largest z scores
head(ctwas_gene_res[order(-abs(ctwas_gene_res$z)),report_cols],20)
          genename region_tag susie_pip     mu2     PVE      z
11441        APOC2      19_31     0.000 1857.93 9.6e-09  45.63
4564         PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
4151          LDLR       19_9     1.000  653.66 1.9e-03 -24.71
8166         PCSK9       1_34     1.000  165.35 4.8e-04  21.99
7053          BSND       1_34     0.000  190.03 1.3e-10  21.19
4137          MAU2      19_15     0.004  358.06 4.1e-06  18.78
331           SARS       1_67     0.002  346.85 1.6e-06 -18.23
4159       NECTIN2      19_31     0.000  264.46 1.6e-09  16.37
7089          USP1       1_39     0.862  265.34 6.7e-04  16.26
2131       ATP13A1      19_15     0.012  265.32 9.0e-06 -16.07
12254 CTC-366B18.4       5_44     0.001  155.22 2.3e-07 -15.55
3102         DOCK7       1_39     0.001  225.94 6.0e-07  14.99
2793      COL4A3BP       5_44     0.000  143.00 2.0e-07  14.79
5839         TIMD4       5_92     0.960  189.84 5.3e-04  13.88
5562        CELSR2       1_67     0.001  196.05 5.7e-07  13.74
6089         FADS1      11_34     0.739  160.92 3.5e-04 -12.59
5512         CARM1       19_9     0.000  150.89 0.0e+00 -12.26
2496          ZPR1      11_70     0.017  157.03 7.9e-06 -11.85
5511        TIMM29       19_9     0.000  158.82 0.0e+00 -10.55
10121         RHCE       1_18     0.025  105.96 7.6e-06  10.26

Comparing z scores and PIPs

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

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

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

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

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#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
dfd2b5f wesleycrouse 2021-09-07
#proportion of significant z scores
mean(abs(ctwas_gene_res$z) > sig_thresh)
[1] 0.01883731
#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
11441        APOC2      19_31     0.000 1857.93 9.6e-09  45.63
4564         PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
4151          LDLR       19_9     1.000  653.66 1.9e-03 -24.71
8166         PCSK9       1_34     1.000  165.35 4.8e-04  21.99
7053          BSND       1_34     0.000  190.03 1.3e-10  21.19
4137          MAU2      19_15     0.004  358.06 4.1e-06  18.78
331           SARS       1_67     0.002  346.85 1.6e-06 -18.23
4159       NECTIN2      19_31     0.000  264.46 1.6e-09  16.37
7089          USP1       1_39     0.862  265.34 6.7e-04  16.26
2131       ATP13A1      19_15     0.012  265.32 9.0e-06 -16.07
12254 CTC-366B18.4       5_44     0.001  155.22 2.3e-07 -15.55
3102         DOCK7       1_39     0.001  225.94 6.0e-07  14.99
2793      COL4A3BP       5_44     0.000  143.00 2.0e-07  14.79
5839         TIMD4       5_92     0.960  189.84 5.3e-04  13.88
5562        CELSR2       1_67     0.001  196.05 5.7e-07  13.74
6089         FADS1      11_34     0.739  160.92 3.5e-04 -12.59
5512         CARM1       19_9     0.000  150.89 0.0e+00 -12.26
2496          ZPR1      11_70     0.017  157.03 7.9e-06 -11.85
5511        TIMM29       19_9     0.000  158.82 0.0e+00 -10.55
10121         RHCE       1_18     0.025  105.96 7.6e-06  10.26

Locus plots for genes and SNPs

ctwas_gene_res_sortz <- ctwas_gene_res[order(-abs(ctwas_gene_res$z)),]

n_plots <- 5
for (region_tag_plot in head(unique(ctwas_gene_res_sortz$region_tag), n_plots)){
  ctwas_res_region <-  ctwas_res[ctwas_res$region_tag==region_tag_plot,]
  start <- min(ctwas_res_region$pos)
  end <- max(ctwas_res_region$pos)
  
  ctwas_res_region <- ctwas_res_region[order(ctwas_res_region$pos),]
  ctwas_res_region_gene <- ctwas_res_region[ctwas_res_region$type=="gene",]
  ctwas_res_region_snp <- ctwas_res_region[ctwas_res_region$type=="SNP",]
  
  #region name
  print(paste0("Region: ", region_tag_plot))
  
  #table of genes in region
  print(ctwas_res_region_gene[,report_cols])
  
  par(mfrow=c(4,1))
  
  #gene z scores
  plot(ctwas_res_region_gene$pos, abs(ctwas_res_region_gene$z), xlab="Position", ylab="abs(gene_z)", xlim=c(start,end),
   ylim=c(0,max(sig_thresh, abs(ctwas_res_region_gene$z))),
   main=paste0("Region: ", region_tag_plot))
  abline(h=sig_thresh,col="red",lty=2)
  
  #significance threshold for SNPs
  alpha_snp <- 5*10^(-8)
  sig_thresh_snp <- qnorm(1-alpha_snp/2, lower=T)
  
  #snp z scores
  plot(ctwas_res_region_snp$pos, abs(ctwas_res_region_snp$z), xlab="Position", ylab="abs(snp_z)",xlim=c(start,end),
   ylim=c(0,max(sig_thresh_snp, max(abs(ctwas_res_region_snp$z)))))
  abline(h=sig_thresh_snp,col="purple",lty=2)
  
  #gene pips
  plot(ctwas_res_region_gene$pos, ctwas_res_region_gene$susie_pip, xlab="Position", ylab="Gene PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
  
  #snp pips
  plot(ctwas_res_region_snp$pos, ctwas_res_region_snp$susie_pip, xlab="Position", ylab="SNP PIP", xlim=c(start,end), ylim=c(0,1))
  abline(h=0.8,col="blue",lty=2)
}
[1] "Region: 19_31"
      genename region_tag susie_pip     mu2     PVE     z
6822    ZNF235      19_31         0   53.10 2.5e-10 -6.60
12136   ZNF285      19_31         0   12.18 9.5e-11 -0.66
7892    ZNF180      19_31         0   36.77 1.6e-09  2.29
820        PVR      19_31         0   45.86 2.2e-10 -9.55
11152   IGSF23      19_31         0   25.71 1.3e-10 -2.76
9941  CEACAM19      19_31         0   56.03 7.8e-10  8.62
4159   NECTIN2      19_31         0  264.46 1.6e-09 16.37
4161    TOMM40      19_31         0   40.68 2.0e-10 -1.40
12134    APOC4      19_31         0  108.73 2.0e-09  8.73
11441    APOC2      19_31         0 1857.93 9.6e-09 45.63
1977    CLPTM1      19_31         0   19.41 9.1e-11 -3.28
8368    ZNF296      19_31         0  103.95 7.7e-09 -7.47
5505    GEMIN7      19_31         0   31.92 7.0e-10  2.65
1979   PPP1R37      19_31         0   80.94 7.7e-09 -2.08
10171  BLOC1S3      19_31         0   10.52 4.8e-11  2.97
116   TRAPPC6A      19_31         0   30.00 2.2e-10  1.92
12615  EXOC3L2      19_31         0    8.14 5.0e-11 -1.34
111      MARK4      19_31         0   13.05 1.4e-10 -2.10
1988      KLC3      19_31         0   32.78 5.0e-09 -3.64
1982  PPP1R13L      19_31         0   18.34 1.3e-10 -3.08
3230    CD3EAP      19_31         0   18.34 1.3e-10 -3.08
213      ERCC1      19_31         0   10.01 4.6e-11 -2.30
11059    PPM1N      19_31         0    7.30 3.4e-11 -2.94
3830      RTN2      19_31         0   54.63 3.6e-10  5.73
3831      VASP      19_31         0   28.55 7.2e-10  4.57

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 1_67"
          genename region_tag susie_pip     mu2     PVE      z
11280 RP11-356N1.2       1_67     0.001   11.90 4.6e-08  -1.96
1102      SLC25A24       1_67     0.001   10.97 4.6e-08   1.59
7095       FAM102B       1_67     0.002   27.95 1.6e-07  -4.14
7096        HENMT1       1_67     0.003   18.47 1.8e-07  -1.85
3080        STXBP3       1_67     0.002   19.79 1.2e-07   2.99
3522         GPSM2       1_67     0.001    8.10 3.0e-08   0.59
3521         CLCC1       1_67     0.001   16.94 5.1e-08  -3.37
10487        TAF13       1_67     0.001   61.31 2.5e-07  -7.05
11143     TMEM167B       1_67     0.001    9.21 3.2e-08   1.57
9291      C1orf194       1_67     0.001   10.46 3.1e-08  -1.03
1099         WDR47       1_67     0.001   11.56 3.5e-08  -1.30
3084      KIAA1324       1_67     0.001   38.00 1.3e-07   5.29
331           SARS       1_67     0.002  346.85 1.6e-06 -18.23
5562        CELSR2       1_67     0.001  196.05 5.7e-07  13.74
4564         PSRC1       1_67     1.000 1741.33 5.1e-03 -41.79
7099       ATXN7L2       1_67     0.001   12.15 3.4e-08   2.57
8776      CYB561D1       1_67     0.007   42.02 8.4e-07   4.60
9435        AMIGO1       1_67     0.003   38.97 3.0e-07  -4.99
617          GNAI3       1_67     0.001   41.56 1.7e-07   5.91
11016        GSTM2       1_67     0.002   12.41 7.0e-08   1.28
8107         GSTM4       1_67     0.001   36.61 1.0e-07  -5.50
4559         GSTM1       1_67     0.020   63.21 3.7e-06   5.90
4561         GSTM5       1_67     0.001   11.02 2.9e-08   2.40
4562         GSTM3       1_67     0.001   21.44 6.5e-08  -3.83

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 19_9"
           genename region_tag susie_pip    mu2    PVE      z
4240         ZNF317       19_9         0   6.37 0.0000  -0.86
10208        ZNF699       19_9         0  37.05 0.0000  -2.16
10092        ZNF559       19_9         0   6.26 0.0000   0.80
8818         ZNF266       19_9         0   9.51 0.0000  -0.97
4245         ZNF426       19_9         0  18.05 0.0000  -1.11
12567  CTC-543D15.8       19_9         0  32.49 0.0000   2.01
10522        ZNF121       19_9         0  18.05 0.0000  -1.12
8463         ZNF561       19_9         0   6.54 0.0000  -0.81
8461         ZNF562       19_9         0  18.82 0.0000  -1.30
12539 CTD-3116E22.8       19_9         0   6.20 0.0000  -0.06
10303        ZNF846       19_9         0   6.39 0.0000   0.03
3954         FBXL12       19_9         0  12.10 0.0000   0.73
10572          UBL5       19_9         0  17.98 0.0000  -1.28
1004         COL5A3       19_9         0  11.02 0.0000   0.78
4243        ANGPTL6       19_9         0   9.67 0.0000  -0.78
11635        P2RY11       19_9         0   6.80 0.0000  -0.54
4241           PPAN       19_9         0  23.35 0.0000  -2.35
4244       C19orf66       19_9         0  11.60 0.0000   2.02
4242          EIF3G       19_9         0   8.47 0.0000   1.54
2062          MRPL4       19_9         0  14.18 0.0000   0.51
1256          ICAM1       19_9         0  25.15 0.0000  -1.15
2068          ICAM5       19_9         0  11.27 0.0000  -1.21
11171         ZGLP1       19_9         0   8.36 0.0000  -1.02
12143          FDX2       19_9         0  52.67 0.0000  -5.44
6996         RAVER1       19_9         0  12.30 0.0000   1.58
913           ICAM3       19_9         0  25.71 0.0000  -0.60
2072           TYK2       19_9         0  76.00 0.0000   2.45
650           PDE4A       19_9         0  30.30 0.0000   0.25
9357          S1PR5       19_9         0  23.06 0.0000   1.85
4228          ATG4D       19_9         0  54.84 0.0000  -5.45
4101           KRI1       19_9         0  13.32 0.0000   0.70
4104         CDKN2D       19_9         0  59.95 0.0000   3.63
4103          AP1M2       19_9         0 110.95 0.0000  -5.56
4102        SLC44A2       19_9         0 126.92 0.0000  -3.86
12119      ILF3-AS1       19_9         0  54.00 0.0000  -1.02
1398          TMED1       19_9         0  23.72 0.0000  -2.07
11089      C19orf38       19_9         0  23.72 0.0000  -2.07
5512          CARM1       19_9         0 150.89 0.0000 -12.26
5511         TIMM29       19_9         0 158.82 0.0000 -10.55
4227          YIPF2       19_9         0  11.06 0.0000  -3.10
3972        SMARCA4       19_9         0  12.03 0.0000   3.84
4151           LDLR       19_9         1 653.66 0.0019 -24.71
6998          SPC24       19_9         0  78.12 0.0000   8.96

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 1_34"
      genename region_tag susie_pip    mu2     PVE     z
528       NDC1       1_34         0  34.97 6.8e-20 -2.46
527      YIPF1       1_34         0  19.81 6.4e-21 -1.50
10976     DIO1       1_34         0  32.15 5.2e-20 -2.28
1028    HSPB11       1_34         0   5.95 0.0e+00 -0.23
3074    LRRC42       1_34         0   5.95 0.0e+00  0.23
3072   TCEANC2       1_34         0   5.09 0.0e+00  0.01
3073    TMEM59       1_34         0   5.10 0.0e+00 -0.23
11148   CYB5RL       1_34         0  16.54 5.3e-21  1.16
3076    MRPL37       1_34         0   7.80 0.0e+00  0.45
6603     SSBP3       1_34         0   5.31 0.0e+00 -0.60
9687     MROH7       1_34         0   6.36 0.0e+00  0.86
11620     TTC4       1_34         0   5.15 0.0e+00  1.01
7051     PARS2       1_34         0  17.69 5.7e-21 -1.46
97       TTC22       1_34         0   5.66 0.0e+00  0.15
7052      LEXM       1_34         0  21.49 1.4e-20  2.10
3062    DHCR24       1_34         0  24.65 2.4e-20 -1.93
7053      BSND       1_34         0 190.03 1.3e-10 21.19
8166     PCSK9       1_34         1 165.35 4.8e-04 21.99

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
[1] "Region: 19_15"
      genename region_tag susie_pip    mu2     PVE      z
4199      LSM4      19_15     0.001   9.82 2.4e-08  -0.73
4197    PGPEP1      19_15     0.001   6.55 1.1e-08   0.44
8907    LRRC25      19_15     0.001   7.78 1.3e-08  -1.18
4196     SSBP4      19_15     0.001  11.28 2.9e-08  -1.37
2112    ISYNA1      19_15     0.001   5.80 8.9e-09   0.43
2113       ELL      19_15     0.001   8.42 1.6e-08   1.21
2123      KXD1      19_15     0.001   5.46 8.1e-09   0.25
11192    UBA52      19_15     0.000   5.00 7.1e-09  -0.04
7904    KLHL26      19_15     0.001  14.29 4.4e-08   1.71
52        UPF1      19_15     0.001  15.88 5.3e-08  -2.03
2115      COPE      19_15     0.001  12.54 4.4e-08  -0.70
2116     DDX49      19_15     0.001   9.30 2.1e-08  -0.27
2118     ARMC6      19_15     0.001   7.07 1.2e-08  -1.09
599      SUGP2      19_15     0.001   8.84 1.8e-08  -0.87
596   TMEM161A      19_15     0.002  19.78 1.1e-07  -2.06
11075    MEF2B      19_15     0.001  27.48 8.2e-08   4.30
11817   BORCS8      19_15     0.004  64.00 7.6e-07   6.33
595     RFXANK      19_15     0.001   6.04 9.0e-09   0.53
4137      MAU2      19_15     0.004 358.06 4.1e-06  18.78
7905   GATAD2A      19_15     0.001  97.39 1.7e-07  -9.03
9879   NDUFA13      19_15     0.001  97.08 1.6e-07  -9.01
9152     TSSK6      19_15     0.001  14.18 2.7e-08   1.60
11726   YJEFN3      19_15     0.001  85.05 1.5e-07  -8.02
6840     CILP2      19_15     0.001  13.95 2.5e-08  -1.70
2128      PBX4      19_15     0.000   6.79 9.8e-09  -0.66
597      LPAR2      19_15     0.001  25.70 4.7e-08  -4.50
1235      GMIP      19_15     0.001  23.47 6.1e-08  -4.16
2131   ATP13A1      19_15     0.012 265.32 9.0e-06 -16.07
9450    ZNF101      19_15     0.003  18.28 1.3e-07  -0.06
2126     ZNF14      19_15     0.001  21.47 4.8e-08   4.25

Version Author Date
dfd2b5f wesleycrouse 2021-09-07

SNPs with highest PIPs

#snps with PIP>0.8 or 20 highest PIPs
head(ctwas_snp_res[order(-ctwas_snp_res$susie_pip),report_cols_snps],
max(sum(ctwas_snp_res$susie_pip>0.8), 20))
                id region_tag susie_pip      mu2     PVE       z
54358    rs2807848      1_112     1.000    61.73 1.8e-04   -7.88
57978    rs6663780      1_122     1.000    89.52 2.6e-04    7.90
57983     rs822928      1_122     1.000   125.00 3.6e-04   12.37
70604   rs11679386       2_12     1.000   163.31 4.8e-04   11.91
70653    rs1042034       2_13     1.000   260.23 7.6e-04   16.57
70659     rs934197       2_13     1.000   413.20 1.2e-03   33.06
70662     rs548145       2_13     1.000   710.09 2.1e-03   33.09
70739    rs1848922       2_13     1.000   241.50 7.0e-04   25.41
72389     rs780093       2_16     1.000   190.40 5.5e-04  -14.14
78454   rs72800939       2_28     1.000    60.65 1.8e-04   -7.85
164505 rs768688512       3_58     1.000   669.21 1.9e-03    2.62
323219  rs11376017       6_13     1.000    71.46 2.1e-04   -8.51
326927  rs72834643       6_20     1.000    50.03 1.5e-04   -6.05
326948 rs115740542       6_20     1.000   173.55 5.1e-04  -12.53
327681    rs454182       6_22     1.000   149.15 4.3e-04    4.78
353792   rs9496567       6_67     1.000    42.05 1.2e-04   -6.34
372359  rs12208357      6_103     1.000   284.06 8.3e-04   12.28
372507 rs117733303      6_104     1.000    98.31 2.9e-04   10.10
372543  rs56393506      6_104     1.000   134.29 3.9e-04   14.09
393542    rs217396       7_32     1.000    84.57 2.5e-04   -9.43
411387 rs763798411       7_65     1.000 25578.54 7.4e-02   -3.27
433233   rs7012814       8_12     1.000   100.27 2.9e-04   10.91
448024 rs140753685       8_42     1.000    60.75 1.8e-04    7.80
449420   rs4738679       8_45     1.000   118.42 3.4e-04  -11.70
469083  rs13252684       8_83     1.000   291.25 8.5e-04   11.96
502680   rs2437818       9_53     1.000    80.87 2.4e-04    6.33
510897 rs115478735       9_70     1.000   337.53 9.8e-04   19.01
595822   rs4937122      11_77     1.000    81.31 2.4e-04   12.15
711375   rs2070895      15_27     1.000    63.74 1.9e-04    7.73
743069  rs57186116      16_38     1.000    75.20 2.2e-04    7.71
767670   rs1801689      17_38     1.000    87.38 2.5e-04    9.40
768586 rs113408695      17_39     1.000   161.76 4.7e-04   12.77
768612   rs8070232      17_39     1.000   194.46 5.7e-04   -8.09
801833   rs4804149      19_11     1.000    50.02 1.5e-04    6.52
801886    rs322144      19_11     1.000    69.16 2.0e-04    3.95
804604   rs3794991      19_15     1.000   501.38 1.5e-03  -21.49
804635 rs113619686      19_15     1.000    73.79 2.1e-04    0.59
811975  rs73036721      19_30     1.000    64.26 1.9e-04   -7.79
812020  rs62115478      19_30     1.000   200.19 5.8e-04  -14.33
812173 rs150262789      19_32     1.000    79.57 2.3e-04  -10.90
822914   rs6075251      20_13     1.000    69.01 2.0e-04   -2.33
822915  rs34507316      20_13     1.000    96.37 2.8e-04   -6.81
864220  rs11591147       1_34     1.000  1332.31 3.9e-03  -39.16
864283    rs499883       1_34     1.000   121.17 3.5e-04   16.11
946065  rs10422256       19_9     1.000   254.15 7.4e-04   12.77
948906    rs429358      19_31     1.000  2262.01 6.6e-03   59.27
948909   rs1065853      19_31     1.000 11025.86 3.2e-02 -110.92
948959      rs5112      19_31     1.000   408.32 1.2e-03   11.30
948976  rs35136575      19_31     1.000   435.82 1.3e-03   -6.36
57933    rs6586405      1_122     0.999    49.84 1.4e-04    8.96
78318  rs139029940       2_27     0.999    40.79 1.2e-04    6.81
284670   rs7701166       5_44     0.999    39.33 1.1e-04   -2.48
411398   rs4997569       7_65     0.999 25615.84 7.4e-02   -2.98
437751   rs1495743       8_20     0.999    44.25 1.3e-04   -6.52
502653   rs2297400       9_53     0.999    43.82 1.3e-04    6.61
742802   rs4396539      16_37     0.999    41.85 1.2e-04   -5.23
804244   rs2302209      19_14     0.999    46.12 1.3e-04    6.64
385740  rs56130071       7_19     0.998   105.41 3.1e-04   10.98
615811   rs7397189      12_36     0.998    36.72 1.1e-04   -5.77
328903  rs28780090       6_26     0.997    62.42 1.8e-04    6.87
592754  rs75542613      11_70     0.997    38.30 1.1e-04   -6.53
748521   rs2255451      16_49     0.997    42.09 1.2e-04   -6.36
409921   rs3197597       7_61     0.996    35.99 1.0e-04   -5.05
827868  rs76981217      20_24     0.996    36.71 1.1e-04    7.69
632397    rs653178      12_67     0.995   109.91 3.2e-04   11.05
30346    rs1730862       1_66     0.993    30.94 8.9e-05   -5.28
469072  rs79658059       8_83     0.993   337.24 9.8e-04  -16.02
671912   rs3934835      13_62     0.993    62.55 1.8e-04    7.94
812157  rs58701309      19_32     0.993    60.50 1.7e-04    1.22
141257    rs709149        3_9     0.990    38.69 1.1e-04   -6.78
620177 rs148481241      12_44     0.987    29.27 8.4e-05    5.10
284611  rs10062361       5_44     0.986   227.06 6.5e-04   20.32
827819   rs6029132      20_24     0.986    42.18 1.2e-04   -6.76
148267   rs9834932       3_24     0.985    71.75 2.1e-04   -8.48
592749   rs3135506      11_70     0.980   160.02 4.6e-04   12.37
610898   rs2638250      12_25     0.979    28.65 8.2e-05   -5.04
328118   rs3130253       6_23     0.976    29.71 8.4e-05    5.64
57980    rs4920269      1_122     0.974    71.91 2.0e-04    2.04
328926  rs62407548       6_26     0.974    82.00 2.3e-04    8.26
248024 rs114756490      4_100     0.973    27.60 7.8e-05    4.99
78331   rs13430143       2_27     0.971    98.94 2.8e-04   -3.34
636487  rs11057830      12_76     0.970    27.67 7.8e-05    4.93
328089  rs28986304       6_23     0.968    47.00 1.3e-04    7.38
225294   rs1458038       4_54     0.966    56.36 1.6e-04   -7.42
485002   rs1556516       9_16     0.966    79.68 2.2e-04   -8.99
8327    rs79598313       1_18     0.965    50.49 1.4e-04    7.02
78334    rs4076834       2_27     0.963   478.39 1.3e-03  -20.11
827872  rs73124945      20_24     0.963    32.99 9.2e-05   -7.78
635352   rs1169300      12_74     0.962    72.78 2.0e-04    8.69
326766  rs75080831       6_19     0.961    62.45 1.7e-04   -7.91
393592 rs141379002       7_33     0.959    27.52 7.7e-05    4.90
771745   rs4969183      17_44     0.957    52.71 1.5e-04    7.17
477136   rs7024888        9_3     0.954    27.44 7.6e-05   -5.06
836509  rs62219001       21_2     0.954    27.89 7.7e-05   -4.95
449388  rs56386732       8_45     0.951    36.27 1.0e-04   -7.01
576375   rs6591179      11_36     0.948    27.35 7.5e-05    4.89
630490   rs1196760      12_63     0.942    27.48 7.5e-05   -4.87
743067   rs9652628      16_38     0.935   137.80 3.8e-04   11.95
816370  rs34003091      19_39     0.935   110.82 3.0e-04  -10.42
812073 rs377297589      19_32     0.934    54.07 1.5e-04   -6.79
563392   rs7943121      11_13     0.927    33.16 8.9e-05    5.56
645374   rs1012130      13_10     0.925    47.90 1.3e-04   -2.78
356528  rs12199109       6_73     0.911    26.89 7.1e-05    4.86
515847  rs10905277       10_8     0.910    29.68 7.9e-05    5.13
548965  rs12244851      10_70     0.909    40.03 1.1e-04   -4.88
738910    rs821840      16_31     0.907   179.39 4.7e-04  -13.48
198705  rs36205397        4_4     0.904    42.89 1.1e-04    6.16
173261    rs189174       3_74     0.903    47.49 1.2e-04    6.77
70656   rs78610189       2_13     0.902    63.59 1.7e-04   -8.39
801874    rs322125      19_11     0.901   118.70 3.1e-04   -7.47
502673   rs2777788       9_53     0.893    66.98 1.7e-04   -5.74
711374 rs139823028      15_27     0.890    25.53 6.6e-05    3.99
589018 rs201912654      11_59     0.889    42.87 1.1e-04   -6.31
832007  rs10641149      20_32     0.886    29.15 7.5e-05    5.08
278218   rs1499279       5_31     0.882    68.00 1.7e-04   -8.37
362733   rs9321207       6_86     0.874    32.58 8.3e-05    5.40
196918   rs5855544      3_120     0.873    26.27 6.7e-05   -4.59
99022  rs138192199       2_69     0.871    26.16 6.6e-05    4.67
492989  rs11144506       9_35     0.871    28.66 7.3e-05    5.04
843752   rs2835302      21_16     0.870    27.14 6.9e-05   -4.65
123354   rs7569317      2_120     0.866    49.31 1.2e-04    7.90
822895  rs78348000      20_13     0.861    32.04 8.0e-05    5.22
284634   rs3843482       5_44     0.859   441.67 1.1e-03   25.03
39085    rs1795240       1_84     0.844    27.64 6.8e-05   -4.85
70456    rs6531234       2_12     0.843    43.93 1.1e-04   -7.17
595825  rs74612335      11_77     0.843    78.50 1.9e-04   11.90
768597   rs9303012      17_39     0.842   193.16 4.7e-04    2.26
827837   rs6102034      20_24     0.840   103.55 2.5e-04  -11.19
763257   rs4793601      17_28     0.838    32.48 7.9e-05   -6.21
645366   rs1799955      13_10     0.833    81.36 2.0e-04   -6.69
200930   rs2002574       4_10     0.831    27.08 6.5e-05   -4.56
743007  rs12708919      16_38     0.831   162.79 3.9e-04   11.30
818560  rs74273659       20_5     0.831    27.38 6.6e-05    4.65
826613  rs11167269      20_21     0.831    62.58 1.5e-04   -7.80
801843  rs58495388      19_11     0.825    36.28 8.7e-05    5.53
543144  rs10882161      10_59     0.819    31.42 7.5e-05   -5.48
844889 rs149577713      21_19     0.816    33.68 8.0e-05    3.32
730366  rs35782593      16_12     0.815    25.52 6.1e-05   -4.32
505251   rs2762469       9_57     0.813    26.43 6.3e-05   -4.53
828013  rs11086801      20_25     0.811   117.02 2.8e-04   10.98
237190 rs138204164       4_77     0.809    28.06 6.6e-05   -4.85
433202 rs117037226       8_11     0.808    26.51 6.2e-05    4.19
433244  rs13265179       8_12     0.808    38.83 9.1e-05   -7.41

SNPs with largest effect sizes

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

Version Author Date
dfd2b5f wesleycrouse 2021-09-07
#SNPs with 50 largest effect sizes
head(ctwas_snp_res[order(-ctwas_snp_res$mu2),report_cols_snps],50)
                id region_tag susie_pip      mu2     PVE       z
411398   rs4997569       7_65     0.999 25615.84 7.4e-02   -2.98
411387 rs763798411       7_65     1.000 25578.54 7.4e-02   -3.27
411390  rs10274607       7_65     0.057 25551.86 4.2e-03   -2.87
411405   rs6952534       7_65     0.000 25524.97 3.7e-11   -2.89
411393  rs13230660       7_65     0.006 25512.94 4.4e-04   -2.95
411404   rs4730069       7_65     0.000 25502.68 1.6e-13   -2.87
411397  rs10242713       7_65     0.000 25406.49 0.0e+00   -2.81
411400  rs10249965       7_65     0.000 25205.04 0.0e+00   -2.85
411412   rs1013016       7_65     0.000 24157.93 0.0e+00    2.40
411437   rs8180737       7_65     0.000 22943.03 0.0e+00   -2.83
411430  rs17778396       7_65     0.000 22936.62 0.0e+00   -2.80
411431   rs2237621       7_65     0.000 22926.47 0.0e+00   -2.80
411402  rs71562637       7_65     0.000 22909.09 0.0e+00   -2.66
411464  rs10224564       7_65     0.000 22884.54 0.0e+00   -2.79
411449  rs10255779       7_65     0.000 22873.21 0.0e+00   -2.81
411466  rs78132606       7_65     0.000 22763.39 0.0e+00   -2.77
411469   rs4610671       7_65     0.000 22733.74 0.0e+00   -2.72
411471  rs12669532       7_65     0.000 21790.31 0.0e+00   -2.77
411428   rs2237618       7_65     0.000 21432.07 0.0e+00   -2.47
411473 rs118089279       7_65     0.000 21221.07 0.0e+00   -2.67
411460  rs73188303       7_65     0.000 21203.08 0.0e+00   -2.42
411470 rs560364150       7_65     0.000 16814.94 0.0e+00   -1.87
411456  rs10261738       7_65     0.000 13751.38 0.0e+00   -2.67
948909   rs1065853      19_31     1.000 11025.86 3.2e-02 -110.92
948907      rs7412      19_31     0.004 10998.74 1.1e-04 -110.75
411411 rs368909701       7_65     0.000 10532.03 0.0e+00   -0.78
411410   rs2299297       7_65     0.000  8303.06 0.0e+00    0.80
948913  rs72654473      19_31     0.000  7760.24 8.3e-07  -83.44
948924    rs390082      19_31     0.000  7712.56 9.5e-07  -83.03
948916    rs445925      19_31     0.000  7711.77 8.8e-07  -83.03
411396   rs6961668       7_65     0.000  7634.42 0.0e+00   -3.23
948947 rs190712692      19_31     0.005  7100.87 9.3e-05  -86.50
948950 rs141622900      19_31     0.000  6858.67 4.9e-06  -85.06
411454  rs56384866       7_65     0.000  6845.23 0.0e+00   -1.88
411478 rs147367948       7_65     0.000  5746.37 0.0e+00    0.14
948800  rs41290120      19_31     0.000  5527.16 4.7e-09  -79.87
411382 rs145194740       7_65     0.000  5503.63 0.0e+00    0.27
411378  rs11762333       7_65     0.000  5402.79 0.0e+00    0.05
411459  rs34356406       7_65     0.000  4921.85 0.0e+00   -2.11
948503 rs118147862      19_31     0.000  4606.05 5.2e-09  -72.73
948911  rs75627662      19_31     0.000  4155.62 2.9e-09  -30.77
948920    rs483082      19_31     0.000  3942.48 2.6e-09  -19.81
948923    rs438811      19_31     0.000  3940.96 2.6e-09  -19.85
948928      rs5117      19_31     0.000  3924.81 2.6e-09  -19.87
948879 rs111784051      19_31     0.000  3778.97 2.3e-06  -63.81
948874  rs61679753      19_31     0.000  3778.35 1.9e-06  -63.80
411452 rs143717474       7_65     0.000  3778.17 0.0e+00    1.56
411455   rs2385557       7_65     0.000  3759.07 0.0e+00    1.59
948857   rs1160983      19_31     0.000  3753.96 1.6e-06  -63.59
411379  rs12333765       7_65     0.000  3717.99 0.0e+00   -2.65

SNPs with highest PVE

#SNPs with 50 highest pve
head(ctwas_snp_res[order(-ctwas_snp_res$PVE),report_cols_snps],50)
                id region_tag susie_pip      mu2     PVE       z
411387 rs763798411       7_65     1.000 25578.54 0.07400   -3.27
411398   rs4997569       7_65     0.999 25615.84 0.07400   -2.98
948909   rs1065853      19_31     1.000 11025.86 0.03200 -110.92
948906    rs429358      19_31     1.000  2262.01 0.00660   59.27
411390  rs10274607       7_65     0.057 25551.86 0.00420   -2.87
864220  rs11591147       1_34     1.000  1332.31 0.00390  -39.16
946025  rs12151108       19_9     0.481  2633.57 0.00370  -48.96
946026  rs73015024       19_9     0.321  2632.74 0.00250  -48.96
70662     rs548145       2_13     1.000   710.09 0.00210   33.09
164505 rs768688512       3_58     1.000   669.21 0.00190    2.62
804604   rs3794991      19_15     1.000   501.38 0.00150  -21.49
78334    rs4076834       2_27     0.963   478.39 0.00130  -20.11
948976  rs35136575      19_31     1.000   435.82 0.00130   -6.36
70659     rs934197       2_13     1.000   413.20 0.00120   33.06
948959      rs5112      19_31     1.000   408.32 0.00120   11.30
284634   rs3843482       5_44     0.859   441.67 0.00110   25.03
469072  rs79658059       8_83     0.993   337.24 0.00098  -16.02
510897 rs115478735       9_70     1.000   337.53 0.00098   19.01
469083  rs13252684       8_83     1.000   291.25 0.00085   11.96
372359  rs12208357      6_103     1.000   284.06 0.00083   12.28
946027 rs147985405       19_9     0.103  2630.73 0.00079  -48.94
70653    rs1042034       2_13     1.000   260.23 0.00076   16.57
946065  rs10422256       19_9     1.000   254.15 0.00074   12.77
164501  rs73141241       3_58     0.346   702.07 0.00071    2.80
946198   rs2738464       19_9     0.590   411.92 0.00071    6.87
70739    rs1848922       2_13     1.000   241.50 0.00070   25.41
284611  rs10062361       5_44     0.986   227.06 0.00065   20.32
812020  rs62115478      19_30     1.000   200.19 0.00058  -14.33
768612   rs8070232      17_39     1.000   194.46 0.00057   -8.09
72389     rs780093       2_16     1.000   190.40 0.00055  -14.14
372373   rs3818678      6_103     0.791   232.15 0.00053   -9.95
326948 rs115740542       6_20     1.000   173.55 0.00051  -12.53
164500 rs138503435       3_58     0.239   703.78 0.00049    2.73
70604   rs11679386       2_12     1.000   163.31 0.00048   11.91
738910    rs821840      16_31     0.907   179.39 0.00047  -13.48
768586 rs113408695      17_39     1.000   161.76 0.00047   12.77
768597   rs9303012      17_39     0.842   193.16 0.00047    2.26
592749   rs3135506      11_70     0.980   160.02 0.00046   12.37
946029  rs17248727       19_9     0.060  2629.43 0.00046  -48.92
411393  rs13230660       7_65     0.006 25512.94 0.00044   -2.95
327681    rs454182       6_22     1.000   149.15 0.00043    4.78
372543  rs56393506      6_104     1.000   134.29 0.00039   14.09
743007  rs12708919      16_38     0.831   162.79 0.00039   11.30
743067   rs9652628      16_38     0.935   137.80 0.00038   11.95
57983     rs822928      1_122     1.000   125.00 0.00036   12.37
864283    rs499883       1_34     1.000   121.17 0.00035   16.11
946057  rs28493980       19_9     0.508   239.63 0.00035    9.30
449420   rs4738679       8_45     1.000   118.42 0.00034  -11.70
946056   rs3745677       19_9     0.491   239.31 0.00034    9.34
946204   rs2915966       19_9     0.287   411.00 0.00034    6.85

SNPs with largest z scores

#SNPs with 50 largest z scores
head(ctwas_snp_res[order(-abs(ctwas_snp_res$z)),report_cols_snps],50)
                id region_tag susie_pip      mu2     PVE       z
948909   rs1065853      19_31     1.000 11025.86 3.2e-02 -110.92
948907      rs7412      19_31     0.004 10998.74 1.1e-04 -110.75
948947 rs190712692      19_31     0.005  7100.87 9.3e-05  -86.50
948950 rs141622900      19_31     0.000  6858.67 4.9e-06  -85.06
948913  rs72654473      19_31     0.000  7760.24 8.3e-07  -83.44
948916    rs445925      19_31     0.000  7711.77 8.8e-07  -83.03
948924    rs390082      19_31     0.000  7712.56 9.5e-07  -83.03
948800  rs41290120      19_31     0.000  5527.16 4.7e-09  -79.87
948503 rs118147862      19_31     0.000  4606.05 5.2e-09  -72.73
948879 rs111784051      19_31     0.000  3778.97 2.3e-06  -63.81
948874  rs61679753      19_31     0.000  3778.35 1.9e-06  -63.80
948857   rs1160983      19_31     0.000  3753.96 1.6e-06  -63.59
948836   rs7254892      19_31     0.000  3542.52 5.8e-07  -61.87
948906    rs429358      19_31     1.000  2262.01 6.6e-03   59.27
948209  rs62117160      19_31     0.000  2877.39 1.6e-09  -57.31
948937  rs12721051      19_31     0.000  1775.54 2.3e-09   56.30
948939  rs56131196      19_31     0.000  1762.20 2.1e-09   56.10
948942 rs144311893      19_31     0.000  3048.00 2.0e-08  -56.10
948940   rs4420638      19_31     0.000  1753.41 2.1e-09   56.01
948943    rs814573      19_31     0.000  1755.08 1.6e-09   55.54
948944    rs157592      19_31     0.000  1647.74 1.5e-09   54.36
948828    rs283809      19_31     0.000  2721.15 1.2e-06  -53.96
948827    rs283808      19_31     0.000  2718.63 1.1e-06  -53.94
948838      rs6857      19_31     0.000  1651.48 1.2e-09   52.66
948904    rs769449      19_31     0.000  1786.53 3.3e-09   51.90
948917  rs10414043      19_31     0.000  1768.12 3.0e-09   51.68
948918   rs7256200      19_31     0.000  1765.75 2.9e-09   51.66
948446 rs148933445      19_31     0.000  2122.75 1.3e-09  -51.20
948899    rs449647      19_31     0.000  1658.72 3.7e-09  -50.93
948690    rs365653      19_31     0.000  1857.56 1.3e-09  -50.92
948951 rs111789331      19_31     0.000  1372.77 1.1e-09   49.44
948933  rs12721046      19_31     0.000  1362.87 1.0e-09   49.38
948955  rs66626994      19_31     0.000  1362.06 1.1e-09   49.26
948863  rs11668327      19_31     0.000  1432.16 1.6e-09  -49.25
948735 rs112422902      19_31     0.000  2155.65 4.9e-08  -48.98
946025  rs12151108       19_9     0.481  2633.57 3.7e-03  -48.96
946026  rs73015024       19_9     0.321  2632.74 2.5e-03  -48.96
946036   rs6511720       19_9     0.031  2629.84 2.4e-04  -48.95
946027 rs147985405       19_9     0.103  2630.73 7.9e-04  -48.94
946029  rs17248727       19_9     0.060  2629.43 4.6e-04  -48.92
946035  rs57217136       19_9     0.003  2624.39 2.4e-05  -48.89
946028  rs17248720       19_9     0.000  2609.41 4.4e-09  -48.81
946011  rs73015020       19_9     0.000  2614.28 1.9e-07  -48.80
945991 rs138175288       19_9     0.000  2613.18 1.1e-07  -48.78
946002  rs73015013       19_9     0.000  2613.12 1.1e-07  -48.78
945990 rs114821903       19_9     0.000  2612.47 7.9e-08  -48.77
945992 rs112107114       19_9     0.000  2612.35 7.5e-08  -48.77
945993 rs115594766       19_9     0.000  2612.63 8.6e-08  -48.77
946009  rs61194703       19_9     0.000  2610.06 2.5e-08  -48.76
946008 rs138294113       19_9     0.000  2609.98 2.5e-08  -48.75

Gene set enrichment for genes with PIP>0.8

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

#number of genes for gene set enrichment
length(genes)
[1] 8
if (length(genes)>0){
  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")]
    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"
                                                                                            Term
1                                                           cholesterol homeostasis (GO:0042632)
2                                                                sterol homeostasis (GO:0055092)
3                                               alditol phosphate metabolic process (GO:0052646)
4                   positive regulation of protein catabolic process in the vacuole (GO:1904352)
5                                                regulation of astrocyte activation (GO:0061888)
6         regulation of low-density lipoprotein particle receptor catabolic process (GO:0032803)
7                                  negative regulation of astrocyte differentiation (GO:0048712)
8                             negative regulation of lipoprotein particle clearance (GO:0010985)
9                                                                     sterol import (GO:0035376)
10                                       monoubiquitinated protein deubiquitination (GO:0035520)
11                                                               cholesterol import (GO:0070508)
12                           negative regulation of macromolecule metabolic process (GO:0010605)
13                 negative regulation of low-density lipoprotein receptor activity (GO:1905598)
14                                positive regulation of receptor catabolic process (GO:2000646)
15                                                    chylomicron remnant clearance (GO:0034382)
16                                regulation of lysosomal protein catabolic process (GO:1905165)
17                                negative regulation of microglial cell activation (GO:1903979)
18                                regulation of nitrogen compound metabolic process (GO:0051171)
19                       negative regulation of nitrogen compound metabolic process (GO:0051172)
20                                                intestinal cholesterol absorption (GO:0030299)
21                        negative regulation of sodium ion transmembrane transport (GO:1902306)
22             negative regulation of sodium ion transmembrane transporter activity (GO:2000650)
23                      low-density lipoprotein particle receptor catabolic process (GO:0032802)
24                      low-density lipoprotein receptor particle metabolic process (GO:0032799)
25                         regulation of low-density lipoprotein particle clearance (GO:0010988)
26                                          negative regulation of receptor binding (GO:1900121)
27                         positive regulation of triglyceride biosynthetic process (GO:0010867)
28                                                      intestinal lipid absorption (GO:0098856)
29                                  negative regulation of amyloid fibril formation (GO:1905907)
30                   cellular response to low-density lipoprotein particle stimulus (GO:0071404)
31                                           negative regulation of cell activation (GO:0050866)
32                                negative regulation of neuroinflammatory response (GO:0150079)
33                                           regulation of amyloid fibril formation (GO:1905906)
34                                  regulation of triglyceride biosynthetic process (GO:0010866)
35                                              intracellular cholesterol transport (GO:0032367)
36                                         regulation of microglial cell activation (GO:1903978)
37                                     negative regulation of macrophage activation (GO:0043031)
38                                                 regulation of receptor recycling (GO:0001919)
39                                                           protein autoprocessing (GO:0016540)
40 positive regulation of cyclin-dependent protein serine/threonine kinase activity (GO:0045737)
41                                               regulation of spindle organization (GO:0090224)
42                            positive regulation of triglyceride metabolic process (GO:0090208)
43                                                                 long-term memory (GO:0007616)
44                        positive regulation of cellular protein catabolic process (GO:1903364)
45                                               hepaticobiliary system development (GO:0061008)
46                  positive regulation of cyclin-dependent protein kinase activity (GO:1904031)
47                    negative regulation of ion transmembrane transporter activity (GO:0032413)
48                                                                 sterol transport (GO:0015918)
49                                  positive regulation of receptor internalization (GO:0002092)
50                                  positive regulation of neuron apoptotic process (GO:0043525)
51                                                 negative regulation of signaling (GO:0023057)
52                                                  organophosphate ester transport (GO:0015748)
53                                                       receptor catabolic process (GO:0032801)
54            positive regulation of microtubule polymerization or depolymerization (GO:0031112)
55                             negative regulation of receptor-mediated endocytosis (GO:0048261)
56                                positive regulation of microtubule polymerization (GO:0031116)
57                                                                liver development (GO:0001889)
58                                       regulation of mitotic spindle organization (GO:0060236)
59                                positive regulation of lipid biosynthetic process (GO:0046889)
60                                           regulation of receptor internalization (GO:0002090)
61                                negative regulation of cellular metabolic process (GO:0031324)
62                                         regulation of microtubule polymerization (GO:0031113)
63                      regulation of sodium ion transmembrane transporter activity (GO:2000649)
64                                                        epithelial cell migration (GO:0010631)
65                                    regulation of response to DNA damage stimulus (GO:2001020)
66                                                                     neurogenesis (GO:0022008)
67                             positive regulation of receptor-mediated endocytosis (GO:0048260)
68                                                     microtubule bundle formation (GO:0001578)
69                                                         regulation of DNA repair (GO:0006282)
70                                              regulation of DNA metabolic process (GO:0051052)
71                                              positive regulation of neuron death (GO:1901216)
72                                           phosphatidic acid biosynthetic process (GO:0006654)
73                                          regulation of protein metabolic process (GO:0051246)
74                                              phosphatidic acid metabolic process (GO:0046473)
75                                              mitotic metaphase plate congression (GO:0007080)
76                                                            cholesterol transport (GO:0030301)
77                                                    ameboidal-type cell migration (GO:0001667)
78                                 negative regulation of protein metabolic process (GO:0051248)
79                                                    interstrand cross-link repair (GO:0036297)
80                                                         renal system development (GO:0072001)
81                                                           phospholipid transport (GO:0015914)
82                                               cellular protein catabolic process (GO:0044257)
83                                                       response to light stimulus (GO:0009416)
84                                             cellular response to nutrient levels (GO:0031669)
85                                                positive regulation of cell cycle (GO:0045787)
86                                    positive regulation of protein polymerization (GO:0032273)
87                                                               kidney development (GO:0001822)
88                                                                gland development (GO:0048732)
89                         negative regulation of supramolecular fiber organization (GO:1902904)
90                                                   phospholipid metabolic process (GO:0006644)
91                                            glycerophospholipid metabolic process (GO:0006650)
92          regulation of cyclin-dependent protein serine/threonine kinase activity (GO:0000079)
93                                                              response to insulin (GO:0032868)
94                                                       regulation of neuron death (GO:1901214)
   Overlap Adjusted.P.value      Genes
1     2/71       0.02104344 PCSK9;LDLR
2     2/72       0.02104344 PCSK9;LDLR
3      1/5       0.02104344       ACP6
4      1/5       0.02104344       LDLR
5      1/5       0.02104344       LDLR
6      1/5       0.02104344      PCSK9
7      1/6       0.02104344       LDLR
8      1/6       0.02104344      PCSK9
9      1/6       0.02104344       LDLR
10     1/6       0.02104344       USP1
11     1/6       0.02104344       LDLR
12   2/194       0.02104344 PCSK9;LDLR
13     1/7       0.02104344      PCSK9
14     1/7       0.02104344      PCSK9
15     1/7       0.02104344       LDLR
16     1/7       0.02104344       LDLR
17     1/8       0.02104344       LDLR
18     1/8       0.02104344       LDLR
19     1/8       0.02104344       LDLR
20     1/9       0.02104344       LDLR
21    1/10       0.02104344      PCSK9
22    1/10       0.02104344      PCSK9
23    1/10       0.02104344      PCSK9
24    1/10       0.02104344      PCSK9
25    1/10       0.02104344      PCSK9
26    1/10       0.02104344      PCSK9
27    1/11       0.02149062       LDLR
28    1/11       0.02149062       LDLR
29    1/12       0.02263194       LDLR
30    1/14       0.02277717       LDLR
31    1/14       0.02277717       LDLR
32    1/14       0.02277717       LDLR
33    1/15       0.02277717       LDLR
34    1/15       0.02277717       LDLR
35    1/15       0.02277717       LDLR
36    1/15       0.02277717       LDLR
37    1/16       0.02322460       LDLR
38    1/17       0.02322460      PCSK9
39    1/17       0.02322460      PCSK9
40    1/17       0.02322460      PSRC1
41    1/18       0.02358895      PSRC1
42    1/19       0.02358895       LDLR
43    1/19       0.02358895       LDLR
44    1/19       0.02358895      PCSK9
45    1/20       0.02374674      PCSK9
46    1/20       0.02374674      PSRC1
47    1/21       0.02389098      PCSK9
48    1/21       0.02389098       LDLR
49    1/23       0.02562335      PCSK9
50    1/24       0.02574047      PCSK9
51    1/25       0.02574047      PCSK9
52    1/25       0.02574047       LDLR
53    1/25       0.02574047      PCSK9
54    1/26       0.02579212      PSRC1
55    1/26       0.02579212      PCSK9
56    1/28       0.02727060      PSRC1
57    1/32       0.03059822      PCSK9
58    1/35       0.03231539      PSRC1
59    1/35       0.03231539       LDLR
60    1/36       0.03267899      PCSK9
61    1/39       0.03432483      PCSK9
62    1/40       0.03432483      PSRC1
63    1/40       0.03432483      PCSK9
64    1/41       0.03432483       PKN3
65    1/41       0.03432483       USP1
66    1/44       0.03546482      PCSK9
67    1/44       0.03546482      PCSK9
68    1/45       0.03546482      PSRC1
69    1/45       0.03546482       USP1
70    1/46       0.03572879       USP1
71    1/47       0.03573757      PCSK9
72    1/48       0.03573757       ACP6
73    1/48       0.03573757       LDLR
74    1/50       0.03620861       ACP6
75    1/51       0.03620861      PSRC1
76    1/51       0.03620861       LDLR
77    1/52       0.03620861       PKN3
78    1/52       0.03620861       LDLR
79    1/55       0.03779298       USP1
80    1/57       0.03866416      PCSK9
81    1/59       0.03951290       LDLR
82    1/60       0.03968565      PCSK9
83    1/61       0.03985400       USP1
84    1/66       0.04206936      PCSK9
85    1/66       0.04206936      PSRC1
86    1/69       0.04344741      PSRC1
87    1/70       0.04356284      PCSK9
88    1/71       0.04367543      PCSK9
89    1/72       0.04378528       LDLR
90    1/76       0.04567235       ACP6
91    1/80       0.04751464       ACP6
92    1/82       0.04815631      PSRC1
93    1/84       0.04878338      PCSK9
94    1/86       0.04939630      PCSK9
[1] "GO_Cellular_Component_2021"
                                                                  Term
1                                   endolysosome membrane (GO:0036020)
2                                            endolysosome (GO:0036019)
3                                           late endosome (GO:0005770)
4 extrinsic component of external side of plasma membrane (GO:0031232)
5                                           lytic vacuole (GO:0000323)
6                                          early endosome (GO:0005769)
7                                       endosome membrane (GO:0010008)
8                                      lysosomal membrane (GO:0005765)
  Overlap Adjusted.P.value      Genes
1    2/17     0.0006074504 PCSK9;LDLR
2    2/25     0.0006689158 PCSK9;LDLR
3   2/189     0.0204793401 PCSK9;LDLR
4     1/8     0.0204793401      PCSK9
5   2/219     0.0204793401 PCSK9;LDLR
6   2/266     0.0249613074 PCSK9;LDLR
7   2/325     0.0284663503 PCSK9;LDLR
8   2/330     0.0284663503 PCSK9;LDLR
[1] "GO_Molecular_Function_2021"
                                                             Term Overlap
1           low-density lipoprotein particle binding (GO:0030169)    2/17
2                       lipoprotein particle binding (GO:0071813)    2/24
3                    CCR5 chemokine receptor binding (GO:0031730)     1/5
4                    apolipoprotein receptor binding (GO:0034190)     1/6
5                  sodium channel inhibitor activity (GO:0019871)     1/8
6                       clathrin heavy chain binding (GO:0032050)     1/9
7                             endopeptidase activity (GO:0004175)   2/315
8  low-density lipoprotein particle receptor binding (GO:0050750)    1/23
9              lipoprotein particle receptor binding (GO:0070325)    1/28
10                    ion channel inhibitor activity (GO:0008200)    1/37
11                 sodium channel regulator activity (GO:0017080)    1/37
12                    CCR chemokine receptor binding (GO:0048020)    1/42
13               phosphoric ester hydrolase activity (GO:0042578)    1/53
   Adjusted.P.value      Genes
1      0.0005125363 PCSK9;LDLR
2      0.0005193493 PCSK9;LDLR
3      0.0161770890      CNIH4
4      0.0161770890      PCSK9
5      0.0161770890      PCSK9
6      0.0161770890       LDLR
7      0.0250827929 USP1;PCSK9
8      0.0309303723      PCSK9
9      0.0334413153      PCSK9
10     0.0360988841      PCSK9
11     0.0360988841      PCSK9
12     0.0375295445      CNIH4
13     0.0436317835       ACP6
USP1 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 CURATEDACP6 gene(s) from the input list not found in DisGeNET CURATEDPSRC1 gene(s) from the input list not found in DisGeNET CURATED
                                   Description          FDR Ratio BgRatio
7               Hypercholesterolemia, Familial 0.0003020913   2/3 18/9703
6                         Hypercholesterolemia 0.0007304778   2/3 39/9703
2                    Coronary Arteriosclerosis 0.0010233951   2/3 65/9703
26                     Coronary Artery Disease 0.0010233951   2/3 65/9703
25 HYPERCHOLESTEROLEMIA, AUTOSOMAL DOMINANT, 3 0.0019171305   1/3  1/9703
12                                     Q Fever 0.0053231669   1/3  5/9703
16                               Acute Q fever 0.0053231669   1/3  5/9703
19                             Chronic Q Fever 0.0053231669   1/3  5/9703
29                 Coxiella burnetii Infection 0.0053231669   1/3  5/9703
21               Hyperlipoproteinemia Type IIb 0.0124459395   1/3 13/9703
******************************************

*                                        *

*          Welcome to WebGestaltR !      *

*                                        *

******************************************
Loading the functional categories...
Loading the ID list...
Loading the reference list...
Performing the enrichment analysis...
                         description size overlap          FDR
1                      Dyslipidaemia   81       4 0.0002923723
2                   Coronary Disease  185       4 0.0040657497
3                    Hyperlipidemias   62       3 0.0060093303
4          Hypo-beta-lipoproteinemia   10       2 0.0088596345
5           Hypobetalipoproteinemias   10       2 0.0088596345
6  Hyperlipidemia, Familial Combined   16       2 0.0196494267
7       Hyperlipoproteinemia Type II   18       2 0.0209796969
8              Hyperlipoproteinemias   19       2 0.0209796969
9              Myocardial Infarction  139       3 0.0213248137
10                        Infarction  141       3 0.0213248137
11           Coronary Artery Disease  169       3 0.0332386412
12            Cholesterol metabolism   31       2 0.0336133098
13       Arterial Occlusive Diseases  182       3 0.0336133098
14                  Arteriosclerosis  184       3 0.0336133098
15               Myocardial Ischemia  195       3 0.0372616478
16     familial hypercholesterolemia   41       2 0.0499407514
         database                 userId
1  disease_GLAD4U PCSK9;PSRC1;TIMD4;LDLR
2  disease_GLAD4U PCSK9;PSRC1;TIMD4;LDLR
3  disease_GLAD4U       PCSK9;TIMD4;LDLR
4  disease_GLAD4U             PCSK9;LDLR
5  disease_GLAD4U             PCSK9;LDLR
6  disease_GLAD4U             PCSK9;LDLR
7  disease_GLAD4U             PCSK9;LDLR
8  disease_GLAD4U             PCSK9;LDLR
9  disease_GLAD4U       PCSK9;PSRC1;LDLR
10 disease_GLAD4U       PCSK9;PSRC1;LDLR
11 disease_GLAD4U       PCSK9;PSRC1;LDLR
12   pathway_KEGG             PCSK9;LDLR
13 disease_GLAD4U       PCSK9;PSRC1;LDLR
14 disease_GLAD4U       PCSK9;PSRC1;LDLR
15 disease_GLAD4U       PCSK9;PSRC1;LDLR
16 disease_GLAD4U             PCSK9;LDLR

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] WebGestaltR_0.4.4 disgenet2r_0.99.2 enrichR_3.0       cowplot_1.0.0    
[5] ggplot2_3.3.3    

loaded via a namespace (and not attached):
  [1] bitops_1.0-6                matrixStats_0.57.0         
  [3] fs_1.3.1                    bit64_4.0.5                
  [5] doParallel_1.0.16           progress_1.2.2             
  [7] httr_1.4.1                  rprojroot_2.0.2            
  [9] GenomeInfoDb_1.20.0         doRNG_1.8.2                
 [11] tools_3.6.1                 utf8_1.2.1                 
 [13] R6_2.5.0                    DBI_1.1.1                  
 [15] BiocGenerics_0.30.0         colorspace_1.4-1           
 [17] withr_2.4.1                 tidyselect_1.1.0           
 [19] prettyunits_1.0.2           bit_4.0.4                  
 [21] curl_3.3                    compiler_3.6.1             
 [23] git2r_0.26.1                Biobase_2.44.0             
 [25] DelayedArray_0.10.0         rtracklayer_1.44.0         
 [27] labeling_0.3                scales_1.1.0               
 [29] readr_1.4.0                 apcluster_1.4.8            
 [31] stringr_1.4.0               digest_0.6.20              
 [33] Rsamtools_2.0.0             svglite_1.2.2              
 [35] rmarkdown_1.13              XVector_0.24.0             
 [37] pkgconfig_2.0.3             htmltools_0.3.6            
 [39] fastmap_1.1.0               BSgenome_1.52.0            
 [41] rlang_0.4.11                RSQLite_2.2.7              
 [43] generics_0.0.2              farver_2.1.0               
 [45] jsonlite_1.6                BiocParallel_1.18.0        
 [47] dplyr_1.0.7                 VariantAnnotation_1.30.1   
 [49] RCurl_1.98-1.1              magrittr_2.0.1             
 [51] GenomeInfoDbData_1.2.1      Matrix_1.2-18              
 [53] Rcpp_1.0.6                  munsell_0.5.0              
 [55] S4Vectors_0.22.1            fansi_0.5.0                
 [57] gdtools_0.1.9               lifecycle_1.0.0            
 [59] stringi_1.4.3               whisker_0.3-2              
 [61] yaml_2.2.0                  SummarizedExperiment_1.14.1
 [63] zlibbioc_1.30.0             plyr_1.8.4                 
 [65] grid_3.6.1                  blob_1.2.1                 
 [67] parallel_3.6.1              promises_1.0.1             
 [69] crayon_1.4.1                lattice_0.20-38            
 [71] Biostrings_2.52.0           GenomicFeatures_1.36.3     
 [73] hms_1.1.0                   knitr_1.23                 
 [75] pillar_1.6.1                igraph_1.2.4.1             
 [77] GenomicRanges_1.36.0        rjson_0.2.20               
 [79] rngtools_1.5                codetools_0.2-16           
 [81] reshape2_1.4.3              biomaRt_2.40.1             
 [83] stats4_3.6.1                XML_3.98-1.20              
 [85] glue_1.4.2                  evaluate_0.14              
 [87] data.table_1.14.0           foreach_1.5.1              
 [89] vctrs_0.3.8                 httpuv_1.5.1               
 [91] gtable_0.3.0                purrr_0.3.4                
 [93] assertthat_0.2.1            cachem_1.0.5               
 [95] xfun_0.8                    later_0.8.0                
 [97] tibble_3.1.2                iterators_1.0.13           
 [99] GenomicAlignments_1.20.1    AnnotationDbi_1.46.0       
[101] memoise_2.0.0               IRanges_2.18.1             
[103] workflowr_1.6.2             ellipsis_0.3.2